From 07dc931125d45133dcc1461353b005220bf5208c Mon Sep 17 00:00:00 2001 From: Silas Della Contrada Date: Mon, 14 Oct 2024 22:18:08 +0200 Subject: [PATCH] docs: update readme --- README.md | 58 ++++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index f3830e0..e8ecbeb 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,23 @@ # compose-av -A kotlin library for av processing -**Disclaimer**: This library is in very early stage of development, so it might not work as expected. +A kotlin library for audio and video playback in Jetpack Compose. +It is based on [libmpv](https://github.com/mpv-player/mpv) and +[compose-gl](https://github.com/silenium-dev/compose-gl). +**Disclaimer**: This library is in a very early stage of development, so it might not work as expected. ## Features -### Core - -- [ ] Demuxing (🚧) -- [ ] Muxing -- [ ] Video decoding (🚧) -- [ ] Video playback (🚧) -- [ ] Video processing -- [ ] Video encoding -- [ ] Audio decoding -- [ ] Audio playback -- [ ] Audio processing -- [ ] Audio encoding - -### Compose - - [ ] Compose video player (🚧) - [ ] Compose audio player ## Platforms -- [ ] Linux VAAPI (🚧) -- [ ] Linux V4L2 M2M -- [ ] Linux AMF -- [ ] Linux NVDEC/NVENC -- [ ] Linux QSV -- [ ] Windows DXVA2 -- [ ] Windows D3D11 -- [ ] Windows QSV -- [ ] Windows NVDEC/NVENC -- [ ] Windows AMF -- [ ] Android MediaCodec +- [x] Linux +- [ ] Windows +- [ ] Android -*Note: macOS/iOS support won't be implemented because of lack of development hardware.* +*Note: macOS/iOS support won't be implemented because of lack of development hardware. +If you want to contribute, feel free to do so.* ## Usage @@ -52,18 +32,18 @@ repositories { } dependencies { - implementation("dev.silenium.compose:compose-av:0.1.0") + implementation("dev.silenium.compose.av:compose-av:0.1.0") } ``` -### Video player - -Demuxer is currently very experimental, so it might not work with files that can be played with other players. +The library currently requires the `libmpv` shared library to be installed on the system. +On Linux, you can install it using your package manager, e.g. on Ubuntu: -```kotlin -@Composable -fun App() { - val file = remember { Path("path/to/video.mp4") } - VideoPlayer(file, modifier = Modifier.aspectRatio(16f / 9)) -} +```shell +sudo apt install libmpv2 ``` + +### Example + +See the [Main.kt](src/test/kotlin/dev/silenium/multimedia/compose/Main.kt) in the test sources +on how to use the library.