Android library based on libmpv for video playback and thumbnail generation.
This library provides Android bindings for the mpv media player, allowing developers to integrate mpv's powerful video playback capabilities and thumbnail generation into their Android applications.
- Full mpv media player integration
- Video thumbnail generation
- Support for multiple ABIs: armeabi-v7a, arm64-v8a, x86, x86_64
- Kotlin-friendly API
- Android 5.0 (API level 21) or higher
- Android Studio with Gradle support
Just one simple step:
- Download the pre-built AAR from the releases page
- Create a
libsdirectory in your app module if it doesn't exist - Copy the AAR file (e.g.,
mpv-android-lib-v0.0.1.aar) to thelibsdirectory - Add this single line to your module-level build.gradle:
dependencies {
implementation(files("libs/mpv-android-lib-v0.0.1.aar"))
}That's it! No other configuration is needed.
Basic implementation example:
// Import the mpv library
import is.xyz.mpv.MPVLib
// Initialize the player
MPVLib.initialize(context)
// Load and play a video file
MPVLib.loadFile("path/to/video.mp4")
// Handle playback controls
MPVLib.play()
MPVLib.pause()The library can be built using the provided build scripts:
./buildscripts/buildall.shDocker build is also supported:
./buildscripts/docker-build.shThis project is licensed under the MIT License - see the LICENSE file for details.
- mpv - The underlying media player
- Original authors: Ilya Zhuravlev and sfan5