[Ffmpeg-devel] Any suggestions about "press [q] to stop encoding" with "using-stdin"?
Michel Bardiaux
mbardiaux
Mon May 9 11:20:45 CEST 2005
Bo Xie wrote:
> Hi,
>
> I know if I use stdin I can not "press [q] to stop encoding". But I
> really want to use this feature. Any suggestions are welcome and
> appreciated!
>
> Best Regards,
> Xie Bo
You will have to modify the keyboard interrupt management code in ffmpeg
so that it opens /dev/tty if there is one, and uses that instead of
fileno(stdin). AAMOF I thingk this patch could be effective even if
stdin is not a pipe but the tty too, so publish it.
>
> PS. Problem Describtion
> I modify mplayer to pipe mplayer and ffmpeg like "mplayer dvd://1 -of
> mpeg -oac copy -ovc copy | ffmpeg -i - ... -f 3gp a.3gp" (ffmpeg can
> not DeCSS DVD, while mplayer can do it. MPlayer can not create .3gp,
> while ffmpeg can do it.). It works well. But I want to pause ffmpeg
> sometimes. If I Ctrl+C or kill ffmpeg process, the result .3gp file
> crashes. Then I want to pause it and let the result .3gp works (with
> correct index). One of my stupid idea is let ffmpeg check a file(eg.
> pause.txt) every 5 seconds, if the content of pause.txt is YES, it
> stops encoding. Looking forward to better idea.
>
--
Michel Bardiaux
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41
More information about the ffmpeg-devel
mailing list