I am running ffmpeg in Java. Using p = Runtime.getRuntime().exec(command);
It is used to stream video through a red5 server.
My problem is that ffmpeg requires "q" to be pressed in order to stop. How can I do that? How can I send the q character to the running process so it will execute p.destroy();
or something similar? At the moment it runs forever until I kill the process in the task manager. I am using Windows7.
To inject the 'q' key into the running process, you can do something like this:
This should successfully 'quit' the running ffmpeg process.