I personally would not prefer to add the full FFMPEG SDK, as it increases the app size exponentially, however using Arthenica's FFMPEG-KIT seems the easiest way to get FFMPEG into a project

implementation "com.arthenica:ffmpeg-kit-min-gpl:5.1.LTS"

This new FFMPEG-KIT not only has a reduction in size, but the commands also execute quicker and have better async support and much easier implementation.

To use you just have to import

import com.arthenica.ffmpegkit.FFmpegKit
import com.arthenica.ffmpegkit.ReturnCode

and then :

FFmpegKit.executeAsync(cmdString , {
    when {
        ReturnCode.isSuccess(it.returnCode) -> {
            println("FFMPEG SUCCESS :${it.state.name}")
        }

        ReturnCode.isCancel(it.returnCode) -> {
            println("FFMPEG CANCELLED :${it.returnCode}")
        }

        it.returnCode.isValueError -> {
            println("FFMPEG ERROR :${it.logs.last()}")
        }
    }
} , {
    println("FFMEPG LOG :${it.message}")
} , {
    println("FFMEPG STATS :${it.speed}")
})

here cmdString, is a string of commands, your commands should work but the only issue I ran into was that I had to use -y -i instead of -f which seemed to run the commands.

Answer from ibrhm117 on Stack Overflow
๐ŸŒ
GitHub
github.com โ€บ umair13adil โ€บ KotlinFFMpeg
GitHub - umair13adil/KotlinFFMpeg: Examples of using FFMpeg library on Android with Kotlin ยท GitHub
fun isRunning(): Boolean { return FFmpeg.getInstance(this).isFFmpegCommandRunning } Following permissions must be added to avoid IO exceptions: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Starred by 225 users
Forked by 56 users
Languages ย  Kotlin 99.0% | Java 1.0%
๐ŸŒ
GitHub
github.com โ€บ fourtalk โ€บ ffmpeg-android-kotlin
GitHub - fourtalk/ffmpeg-android-kotlin: FFmpeg for Android compiled with LGPL license, openh264 & aac encoding only (Supports Android 4.1+), contains Kotlin wrapper module
FFmpeg for Android compiled with LGPL license, openh264 & aac encoding only (Supports Android 4.1+), contains Kotlin wrapper module - fourtalk/ffmpeg-android-kotlin
Starred by 12 users
Forked by 6 users
Languages ย  Kotlin 54.7% | Shell 43.2% | C 1.5% | Makefile 0.6% | Kotlin 54.7% | Shell 43.2% | C 1.5% | Makefile 0.6%
Discussions

kotlin - FFmpeg Android Errors - Stack Overflow
Ok so im making a kotlin android app and for file conversion from 3gp to wav i added the android ffmpeg library with implementation 'com.arthenica:mobile-ffmpeg-full:4.4' then i added this code to More on stackoverflow.com
๐ŸŒ stackoverflow.com
java - How to import FFmpeg into Android project - Stack Overflow
I'm trying to convert series of images into video. For that I'm adding FFmpeg into my Android project. However it is not adding properly, so I can't import class FFmpeg into the code. in the statem... More on stackoverflow.com
๐ŸŒ stackoverflow.com
kotlin - FFmpeg not working on Android version 10(Q) - Stack Overflow
I am using FFmpeg for the Video compress & audio video merge & to making the duet with the help of FFmpeg.it's working well on all lower version of Android. but not working on ANDROID 10(Q)... More on stackoverflow.com
๐ŸŒ stackoverflow.com
android - Play video using FFmpeg library in androidNDK - Stack Overflow
I have all required .so libraries and header files to play a video. I want to play video from the Raw folder. I am struck at CPP code. Unable to pass a video file path to CPP code. The following is... More on stackoverflow.com
๐ŸŒ stackoverflow.com
May 13, 2020
๐ŸŒ
GitHub
github.com โ€บ topics โ€บ ffmpeg-android
ffmpeg-android ยท GitHub Topics ยท GitHub
This is a library of FFmpeg for android... ๐Ÿ“ธ ๐ŸŽž ๐Ÿš‘ ยท android kotlin photos image compression video ffmpeg mp4 multimedia mpeg image-processing kotlin-android kotlin-library gif mp3-converter video-processing frame video-streaming ffmpeg-android
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 76878027 โ€บ ffmpeg-android-errors
kotlin - FFmpeg Android Errors - Stack Overflow
Ok so im making a kotlin android app and for file conversion from 3gp to wav i added the android ffmpeg library with implementation 'com.arthenica:mobile-ffmpeg-full:4.4' then i added this code to convert the files FFmpeg.execute("-i" + f2 +"/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.wav") for further context f2 is /storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.3gp
๐ŸŒ
Medium
medium.com โ€บ @eeddeellee โ€บ how-to-use-ffmpeg-in-android-37b1d732c31b
How to Use FFmpeg in Android. FFmpeg is an open-source project fullโ€ฆ | by eeddeellee | Medium
April 20, 2022 - How to Use FFmpeg in Android FFmpeg is an open-source project full of useful libraries for processing video/audio. You can change a file format, adjust quality through compression, extract audio โ€ฆ
๐ŸŒ
Medium
medium.com โ€บ simform-engineering โ€บ multimedia-operations-for-android-using-ffmpeg-78f1fb480a83
Multimedia Operations for Android using FFmpeg | by Ashwin Vavaliya | Simform Engineering | Medium
March 22, 2021 - To integrate FFmpeg in your android application you can use pre-compiled libraries like FFmpeg, which provide multiple predefined multimedia operations(Queries) and which is easy to integrate by adding FFmpeg dependency in app module gradle ...
Find elsewhere
๐ŸŒ
Medium
proandroiddev.com โ€บ a-story-about-ffmpeg-in-android-part-ii-integration-55fb217251f0
A Story about FFmpeg on Android. Part II: Integration. | by Oleksandr Berezhnyi | ProAndroidDev
January 3, 2020 - In this article I would like to cover shared libraries integration, actual data reading from FFmpeg and Android-specific issues that I faced during the development. In order to execute a function inside a shared library from the JVM part (or vice versa) we need a Java Native Interface (JNI) layer. That mechanism consists of 2 things: A JVM class with a method specially marked: with native keyword in Java or external in Kotlin.
๐ŸŒ
IMG.LY
img.ly โ€บ blog โ€บ how-to-crop-and-trim-videos-in-kotlin-for-android
How To Crop and Trim Videos In Kotlin for Android | IMG.LY Blog
September 17, 2025 - In this beginner-friendly tutorial you will learn how to crop and trim videos in Android with FFmpeg.
๐ŸŒ
LogRocket
blog.logrocket.com โ€บ home โ€บ converting videos to gifs using ffmpeg on android
Converting videos to GIFs using FFMPEG on Android - LogRocket Blog
June 4, 2024 - In this article, our goal is to convert a video file into a GIF using FFMPEG on Android. We will learn how to request media content from Android Storage Providers in the process. To effectively follow through, you will need a basic understanding of Kotlin and Android development and be ready ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ how-to-use-ffmpeg-in-android-with-example
How to Use FFmpeg in Android with Example? - GeeksforGeeks
August 8, 2024 - Android doesnโ€™t have efficient and robust APIs for multimedia which could provide functionalities like FFmpeg.
๐ŸŒ
HackerNoon
hackernoon.com โ€บ android-ndk-my-experience-with-ffmpeg-93dd7e4b9269
My Experience with FFmpeg on Android | HackerNoon
January 24, 2018 - Android SDK provides APIs for most of the common work which a developer uses every day like direct share, app linking, fingerprint authentication and so on.Sometimes we might need to work on low-level functionality which mostly are available as C/C++ libraries.With Android NDK we can use these pre-built libraries by creating a C/C++ wrapper around it and the use JNI to invoke the native code from Kotlin/Java.
๐ŸŒ
Appscms
appscms.com โ€บ library โ€บ ffmpeg-android-library
Android ffmpeg libraries for use in your project
This is a library of FFmpeg for android... ๐Ÿ“ธ ๐ŸŽž ๐Ÿš‘ ยท 355 ยท Kotlin ยท Apache License 2.0 ยท Updated ยท 16 Oct 2024 ยท Rate this tool ยท 1.00/5 2 votes ยท
Rating: 1 โ€‹ - โ€‹ 2 votes
๐ŸŒ
GitHub
github.com โ€บ fourtalk โ€บ ffmpeg-android-kotlin โ€บ blob โ€บ master โ€บ README.md
ffmpeg-android-kotlin/README.md at master ยท fourtalk/ffmpeg-android-kotlin
FFmpeg for Android compiled with LGPL license, openh264 & aac encoding only (Supports Android 4.1+), contains Kotlin wrapper module - fourtalk/ffmpeg-android-kotlin
Author ย  fourtalk
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 61767209 โ€บ play-video-using-ffmpeg-library-in-androidndk
android - Play video using FFmpeg library in androidNDK - Stack Overflow
May 13, 2020 - const char *file = env->GetStringUTFChars(path, 0); if (file == NULL) { printf("The file is a null object."); } av_register_all(); int ret = 0; char errbuf[256]; AVFormatContext *fmt_ctx = avformat_alloc_context(); int ret12 = avformat_open_input(&fmt_ctx, file, NULL, NULL); if (ret12 < 0) { av_strerror(ret, errbuf, sizeof(errbuf)); __android_log_print(ANDROID_LOG_ERROR, "ffmpeg", "%s", errbuf); __android_log_print(ANDROID_LOG_ERROR, "ffmpeg", "%i", ret12); return; } The above ret12 returning -ve value and it is returning the control out ยท android ยท kotlin ยท
๐ŸŒ
Reddit
reddit.com โ€บ r/androiddev โ€บ running ffmpeg on android 10
r/androiddev on Reddit: Running ffmpeg on Android 10
February 15, 2020 -

Any tips on how to run ffmpeg on Android 10? (Without rooting the device) I searched a lot, but I didn't find anything useful.

Edit: I found this library and it worked well on Android 10 https://github.com/tanersener/mobile-ffmpeg

๐ŸŒ
GitHub
github.com โ€บ SimformSolutionsPvtLtd โ€บ SSffmpegVideoOperation
GitHub - SimformSolutionsPvtLtd/SSffmpegVideoOperation: This is a library of FFmpeg for android... ๐Ÿ“ธ ๐ŸŽž ๐Ÿš‘
val startTimeString = "00:01:00" (HH:MM:SS) val endTimeString = "00:02:00" (HH:MM:SS) val query:Array<String> = FFmpegQueryExtension().cutVideo(inputPath, startTimeString, endTimeString, outputPath) CallBackOfQuery().callQuery(query, object : FFmpegCallBack { override fun statisticsProcess(statistics: Statistics) { Log.i("FFMPEG LOG : ", statistics.videoFrameNumber) } override fun process(logMessage: LogMessage) { Log.i("FFMPEG LOG : ", logMessage.text) } override fun success() { //Output = outputPath } override fun cancel() { } override fun failed() { } }) same for other queries. And you can apply your query also ยท For more info go to Multimedia Operations for Android using FFmpeg
Starred by 374 users
Forked by 89 users
Languages ย  Kotlin 100.0% | Kotlin 100.0%
๐ŸŒ
GitHub
github.com โ€บ arthenica โ€บ ffmpeg-kit
GitHub - arthenica/ffmpeg-kit: FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg. ยท GitHub
FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg. - arthenica/ffmpeg-kit
Starred by 5.8K users
Forked by 2.5K users
Languages ย  C 54.3% | Shell 15.8% | Java 9.3% | Objective-C 7.4% | C++ 4.9% | Makefile 3.4%
๐ŸŒ
Medium
medium.com โ€บ droid-log โ€บ video-editor-18a96261077a
How to create your own video editor โ€” powered by FFmpeg Android? | by Deepan Elango | Tech Log | Medium
August 22, 2019 - Droid Log focuses on sharing the ... ... FFmpeg is a powerful multimedia framework which allows us to decode, encode, transcode, stream, filter and play most of the media content available now....