Open mertakkartal opened 1 year ago
I'm having the same issue. I think I'm going to just call on the shell to kill any process with the name ffmpeg. It's not ideal, but it'll work for my project.
You'll have to execute ffmpeg manually and get a Process object that you can then read streams or kill as needed. Similar to what https://github.com/bramp/ffmpeg-cli-wrapper/blob/e47b3e9bd009c9aafd765610948b8dd1cd582cbc/src/main/java/net/bramp/ffmpeg/FFcommon.java#L100 and https://github.com/bramp/ffmpeg-cli-wrapper/blob/master/src/main/java/net/bramp/ffmpeg/RunProcessFunction.java do.
Yeah, that's working for me. If there was a way to get the PID for the ffmpeg job, then I could narrow the kill command to that.
The current API doesn't make it easy to get the Process object / PID. So that's why I suggest executing ffmpeg yourself.
Meh, I'm queuing up tasks anyway so there will only be one ffmpeg process running at a time. My personal project is just shrinking video files from blu-ray quality to x265 and moving them to a new folder so not exactly needing production quality.
I appreciate this cli wrapper! Thanks for your work making this.
Hi folks ,
I wrote a simple UDP stream recorder application with using this library in Java 11. Everything works fine except stopping FFMPEG record process before the duration time. (i.e The duration time is 60 seconds but want to stop FFMPEG process like in 30th second.)
What should I do for solving this problem ? Any ideas would be appreciated .
Thanks, Mert