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
Post a Comment