This is a Kotlin Multiplatform library project targeting Android, Desktop (JVM).
| X86 | X64 | Arm32 | Arm64 | |
|---|---|---|---|---|
| Android | ✅ | ✅ | ✅ | |
| iOS | ||||
| Windows | ✅ | |||
| Linux | ✅ | |||
| MacOS | ✅ |
I can't test the macOS and iOS version. Therefore, there is no iOS release. PRs are welcome.
iOS support is planned, but not soon.
NOTICE: This version is subject to GPL-3.0,
namely bundle-video_hw-shared-gpl-release.
commonMain.dependencies {
implementation("io.github.sor2171:ffmpeg-kit-kmp:0.11.4")
}If you want to replace the FFmpeg libraries, they are located in
shared/src/jvmMain/resources /
ffmpeg-aar-wrapper/libs.
./gradlew :shared:assembleThe built artifacts will be in shared/build/libs /
shared/build/outputs/aar.
To run an FFmpeg command:
fun testFFmpegCreateColorBar() {
val output = FFmpegRunner.execute(
"-re",
"-f lavfi",
"-i testsrc=duration=10:size=1920x1080:rate=60",
"-f null -"
)
println(output)
}To run an FFprobe command:
fun ffprobe() {
val json = FFmpegRunner.ffprobe(
"-v quiet",
"-print_format json",
"-show_format",
"-show_streams",
"/path/to/your/video"
)
println(json)
}The Kotlin code in this repository is MIT licensed (see LICENSE).
This project uses FFmpeg Kit from
akashskypatel/ffmpeg-kit-builders
(release v0.11.0). The upstream project is generally licensed under
LGPL-3.0,
but the Maven artifact io.github.sor2171:ffmpeg-kit-kmp:0.11.4 bundles
bundle-video_hw-shared-gpl-release, so that artifact is subject to GPL-3.0.
FFmpeg / FFmpeg Kit components may be subject to LGPL-3.0 or GPL-3.0 depending
on the build variant. Full texts are in LICENSE-LGPL and LICENSE-GPL.
Whether you use the Maven artifact or build a JAR/AAR from this repository, you must comply with the applicable LGPL/GPL terms when distributing. The MIT license only applies to the Kotlin code in this repository and does not replace your own compliance obligations for the bundled FFmpeg components.