Hi there 👋 I am a passionate and experienced Android Developer with a profound interest to innovate and love pushing mobile technologies to their limits.
Senior Android Developer
Senior Android Developer
Android Developer
FFmpeg is a powerful multimedia framework which allows us to decode, encode, transcode, stream, filter and play most of the media content available now. With the help of these tools, you can develop and application that can manipulate any form of media to the desired output. Sky is not the limit when using FFmpeg. I prefer FFmpeg-all which is a Bible for FFmpeg but it is difficult to read if you do not know what you are looking for. To make it easy, I will summarise the basics of video manipulations using FFmpeg which, then you can use in your own applications or libraries that you are working on. I have developed a simple library that enables you to trim and crop a video, additionally you can compress any video and convert it into any format that you desire.
License: MIT License
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
can we see a preview of the video before the video is processed
Hi, thank you for your great lib. I have one question, how do you compress video using the lib.
Getting the below exception when trimming the video
java.io.IOException: Cannot run program "/data/user/0/***/files/ffmpeg": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
at java.lang.Runtime.exec(Runtime.java:698)
at java.lang.Runtime.exec(Runtime.java:563)
at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
at java.lang.ProcessImpl.start(ProcessImpl.java:141)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:698)
at java.lang.Runtime.exec(Runtime.java:563)
at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
E/VideoOptions: onProgress: CANNOT LINK EXECUTABLE "/data/user/0/***/files/ffmpeg": "/data/data/***/files/ffmpeg" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)
E/VideoTrimmingActivity: onError CANNOT LINK EXECUTABLE "/data/user/0/***/files/ffmpeg": "/data/data/***/files/ffmpeg" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)
E/VideoOptions: onFailure: CANNOT LINK EXECUTABLE "/data/user/0/***/files/ffmpeg": "/data/data/***/files/ffmpeg" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)
videoTrimmer.setTextTimeSelectionTypeface(mediumTypeface)
.setOnTrimVideoListener(this)
.setOnVideoListener(this)
.setVideoURI(Uri.parse(videoPath))
.setVideoInformationVisibility(true)
.setMaxDuration(30)
// .setMinDuration(2)
.setDestinationPath(destVideoPath);
Device Details
Android Version : v10.0
As soon as the video selected is more than 2 seconds, the fragments of the video don't get reversed and there's no logs at all. In case the video has got one fragment, it does not crash but the logs say the video wasn't reversed, although it actually was.
OS: Android 11
Device: Pixel2
Is there any other FFmpeg repository I could use for Android 11? I've not found anything updated :(
I'm using this lib, its working fine for me.
But my APK increased upto 20mb+.
How can i reduce this?
I am trying to implement this library in my java app
But i cannot instantiate the VideoTrimmer variable and it is also not stated in the docs how to do this and i am getting a null pointer exception when trying to run the code
Got an compile time error:
.../.gradle/caches/transforms-2/files-2.1/2ba319b94b8ddc5e4b0c4d87a893d154/jetified-videoeditor-1.0.8/res/values/values.xml:15:5-51: AAPT: error: resource dimen/_10sdp (aka my.packagename:dimen/_10sdp) not found.
Maybe to exclude androidx dependencies or to migrate to androidx
I am getting this error when trying to use the video trimmer feature using the sample app code.
java.io.IOException: Cannot run program "/data/user/0/com.video.sample/files/ffmpeg": error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:141) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
Getting below error:
jetified-videoeditor-1.0.8\res\values\values.xml:15:5-51: AAPT: error: resource dimen/_10sdp (aka com.app.xyz:dimen/_10sdp) not found.
Thanks for this great project.
if i set minimum duration 10 sec and move bar towards each other, it collapse, max duration working fine.
Android resource linking failed
.gradle\caches\transforms-2\files-2.1\440c0d5adabe4db2640b6ca8533c3582\jetified-videoeditor-1.0.8\res\values\values.xml:15:5-51: AAPT: error: resource dimen/_10sdp (aka com.example.practical:dimen/_10sdp) not found.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.