Home

Awesome

FFMPEG video operations

Kotlin Version Platform API Android Arsenal

FFmpeg compiled for Android. Execute FFmpeg commands with ease in your Android app.

Getting Started

This project is provide in-build FFmpeg operation queries:

<table> <tr> <td><img src="https://user-images.githubusercontent.com/16113993/111145681-86f5ee00-85ae-11eb-9057-c54955819459.png" width=270 height=480></td> <td><img src="https://user-images.githubusercontent.com/16113993/111145695-8a897500-85ae-11eb-9c92-625865c0bfd4.png" width=270 height=480></td> <td><img src="https://user-images.githubusercontent.com/16113993/111145578-6cbc1000-85ae-11eb-90a6-3550842db092.gif" width=270 height=480></td> </tr> </table>

Video operation ffmpeg queries like

Other extra operation FFmpeg queries like

Architectures

FFmpeg Android runs on the following architectures:

Features

Support target sdk

Dependency

Gradle Dependency

This is all you have to do to load the FFmpeg library.

Run FFmpeg command

In this sample code we will run the FFmpeg -version command in background call.

  val query:Array<String> = "-i, input,....,...., outout"
        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() {
            }

            override fun cancel() {
            }

            override fun failed() {
            }
        })

In-build query example

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

Medium Blog

For more info go to Multimedia Operations for Android using FFmpeg

Find this library useful? :heart:

Support it by joining stargazers for this repository. :star:

Awesome Mobile Libraries

License

Copyright 2021 Simform Solutions

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.