[MPlayer-users] Re: Reading raw audio/video streams

Geoffrey Hausheer b3zknt8xu02 at sneakemail.com
Thu Aug 14 03:42:35 CEST 2003


Richard Felker wrote:
>> Does anyone have a suggestion as to how I can make this work without
>> generating intermediate files (either using fifos or a muxed stream to
>> stdout?).  I don't want to deal with the complexity of adding a
>> container...that is what I'm using mencoder for in the first place.
>
>Uhh, why not just use -audiofile audout.fifo instead of a file?!?!

Well, the problem is that mencoder reads from -audiofile at a different
rate than stdin.
So if I have a program writing to two fifos, and mencoder reading from
two fifos, and since fifos are always blocking, eventually mencoder ends
up blocking on a read from one stream, while the writer ends up blocking
on writing to the other stream, and everything deadlocks.  I was able to
partially alleviate this problem using multiple threads and caches in my
writing program, but eventually, I always run into the same problem.

So it appears that I either need mencoder to read from both streams at
the same rate, or I need to find a way to mux/demux the raw data and send
it on a single stream.

.Geoff



More information about the MPlayer-users mailing list