[FFmpeg-devel] ffmpeg doesn't accept named pipes?

"René J.V. Bertin" rjvbertin at gmail.com
Mon Mar 11 18:32:51 CET 2013


On Mar 11, 2013, at 17:44, Xidorn Quan wrote:

>> 
>> ffmpeg -f video4linux2 -i /dev/video0 -i record.ssa -scodec ass foo.mkv
>> 
>> here, record.ssa is a named pipe (mkfifo record.ssa) and some other
>> application is continuously writing to this named pipe.

>> Please, correct me if  I am wrong at the concept of pipes in ffmpeg but as
>> i read in the documentation, ffmpeg can accept input in form of pipes also.

I can confirm that ffmpeg can read from stdin, whether one constructs a piped command on the command line or by calling ffmpeg through the popen function (and using fwrite, without fflush), on Mac OS X and MS Windows. Although I've never tried to do this with an additional input like you have.

You could try to let your other application write to stdout instead of a named pipe, and then do

SomeOtherApplication | ffmpeg -f video4linux2 -i - -i record.ssa -scodec ass foo.mkv .

Does that command work as you expect? What are you writing to the pipe - a whole video sequence at once? Single frames (or less)? Fragments consisting of a couple frames? 

René


More information about the ffmpeg-devel mailing list