video-recorder-java icon indicating copy to clipboard operation
video-recorder-java copied to clipboard

Remove SendSignalCtrlC.exe dependancy

Open eliduvid opened this issue 5 years ago • 2 comments

As you can see here instead of keyboard interrupt (Ctrl + C) you can send letter q to ffmpeg console. This should be cross platform, does not require starting a new process and most importantly - now you don't need SendSignalCtrlC.exe dependency for windows.

It is pretty straightforward to do in java:

Process process =  new ProcessBuilder().command(command).start();
//...
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(process.getOutputStream());
outputStreamWriter.write("q\n");
outputStreamWriter.flush();

I can try and implement it, but I can't test it on my machine for unrelated reasons.

eliduvid avatar Sep 30 '20 19:09 eliduvid

Please provide a pr

SergeyPirogov avatar Sep 30 '20 19:09 SergeyPirogov

Here you go 😃

eliduvid avatar Sep 30 '20 20:09 eliduvid