[Ffmpeg-devel] Any suggestions about "press [q] to stop encoding" with "using-stdin"?

Philip Gladstone philip
Mon May 9 23:32:49 CEST 2005

Michel Bardiaux wrote:
> 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.

Please make sure that if stdin is not being used as an input, then the 
press [q] stuff still tries to use stdin. Note that the current behavior 
is that if stdin is connected to /dev/null, then the 'press [q]' logic 
is effectively disabled. This is by design. It is also used by ffserver 
when it fires up ffmpeg to do encoding.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3322 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050509/82a83e01/attachment.bin>

More information about the ffmpeg-devel mailing list