ffmpeg - java Runtime.exec() programm and pass character to getch() -


i want run ffmpeg java external process. after several minutes want stop it. asks me click 'q', , works in console, when try write 'q' stdin (process.getoutputstream() using java -- not work.

i take "c", convert byte using ascii charset, write stream, flush , close it. ffmpeg not stop.

i briefly looked in sources, , found uses getch() function (according manual) "reads character associated terminal".

ffmpeg stop signal, not work in windows too.

does know how solve issue?

and yes: want run ffmpeg external program. know xuggle, not work me, need bare ffmpeg, , not want write jni myself now.

thank you!

see, readch() reads 1 character terminal keyboard, not input stream! in *nix uses ioctl, in windows (i believe) kind of console api.

looks can't stop ffmpeg java out of jni:(


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -