ffmpeg-android-java
ffmpeg-android-java copied to clipboard
Memory leak fixes and proper killing of processes
I managed to fix some of the common issues on my fork, leaking Context and non working kill command to be specific.
Steps to install if this doesn't get merged:
- Edit your project's build.gradle (not app) like this. (important line is jitpack)
allprojects {
repositories {
jcenter()
mavenCentral()
...
maven {
url 'https://jitpack.io'
}
}
}
- Add below line to your app's
build.gradledependencies.
compile 'com.github.diegoperini:ffmpeg-android-java:v0.4.6'
Link for the fork: https://github.com/diegoperini/ffmpeg-android-java
Changelog:
- Added
whenFFmpegIsReady()to properly wait for ffmpeg state. - Fixed
killRunningProcesses()to properly kill the execution. - Added a
FFmpeg.getInstance()overload to work with aContextProviderinstead of a context. It is a fix for a common memory leak caused by storing the context internally. Old factory method is still supported but marked as deprecated.
nice :)
How do you instantiate correctly the ffmpeg(FFmpeg.getInstance())?
https://github.com/WritingMinds/ffmpeg-android-java/issues/107#issuecomment-324685367
Here is the example.