I want to run ffmpeg from java as an external process. In a few minutes I want to stop this. He asks me to press "q" and it works in the console, but when I try to write "q" to my stdin (process.getOutputStream () using java - it does not work.
I just take "c", convert it to byte, using ASCII encoding, write it to the stream, clear and close it. Ffmpeg does not stop.
I briefly looked at its sources and found that it uses the getch () function, which (according to the manual) "reads a character from a connected terminal."
ffmpeg may also stop on signal, but it also does not work in windows.
Does anyone know how to solve my problem?
And yes: I really want to run ffmpeg as an external program. I know about xuggle, but it doesnβt work for me, I need naked ffmpeg and I donβt want to write JNI right now.
Thank!
java ffmpeg
Ilya Sep 23 '10 at 1:58 2010-09-23 01:58
source share