Closed diegoperini closed 6 years ago
I would like to express my thank you to all of you guys for the hard work you've put into this. I've been trying to rebuild the inFullMobile's FFmpeg library to a newer version without much success. Part of that is because that library have better performance than the WritingMinds' FFmpeg library. I would assume that's because of all the optimization in the newer FFmpeg version (3.2.4 vs 3.0.1).
However, inFullMobile's library seem to be abandoned and there's no way to properly kill a running process which can bring a lot of issues based on my experience with the original WritingMinds' library. I've been playing around with @diegoperini fork for a while, but then again killRunningProcesses()
doesn't seem to work properly as well (no disrespect mate).
I believe the proper way to kill the process is by keeping the communication with the running FFmpeg process in order to send the q
signal to stop it. The AsyncTask's cancel()
method is not a guaranteed way to kill the thread because there's no implementation on the C part of the library to stop the process.
This feature has been integrated in version 1.1.0
dependencies {
implementation 'nl.bravobit:android-ffmpeg:1.1.0'
}
Checkout the wiki: Send 'Q' signal to FFmpeg/FFprobe process
I think this is a fairly common use case so I'm going to make a PR with an addition to the README so people don't have to go hunting for it...
https://github.com/diegoperini/ffmpeg-android-java/issues/3 This issue remains here as well.
I have two suggestions. Either we can expose the
pid
for advanced use cases and/or we can encapsulateProcess.sendSignal
in an easy to use interface with good naming.