[MEncoder-users] Can you feed a named pipe into mencoder?

David Liontooth lionteeth at cogweb.net
Fri Nov 12 02:30:28 CET 2010


On 11/11/2010 03:57 PM, Angel wrote:
> David Liontooth<lionteeth at cogweb.net>  wrote:
>>   cat /dev/dvb/adapter0/dvr0 | tee p1>  p2 | paste p1>  $FIL.mpeg | \
>> zvbi-atsc-cc --atsc -T -C $FIL.txt CBS-HD<  p2
>>
> That seems an awfully complex line ... isn't it equivalent to something like
>
> cat /dev/dvb/adapter0/dvr0 | tee $FIL.mpeg | zvbi-atsc-cc --atsc -T -C $FIL.txt CBS-HD
>
> (Just off the top of my head ... but redirecting the output from tee is normally redundant IME, as is using>  or<  in the middle of a pipeline)
You're right; the simpler version does exactly the same thing; cool.

This also works -- one named pipe is enough, unnamed pipes work great 
with mencoder:

cat /dev/dvb/adapter0/dvr0 | tee p1 | mencoder - -cache 2048 -ovc copy 
-oac copy -o out.avi & zvbi-atsc-cc --atsc -T -m -C out.txt CBS-HD < p1

> As far as using mencoder goes, I know of no reason the input can't be a named pipe

Now, the named pipe works with mencoder too, but doesn't exit cleanly on 
Ctrl-c and has to be killed:

cat /dev/dvb/adapter0/dvr0 | tee p1 | zvbi-atsc-cc --atsc -T -m -C 
out.txt CBS-HD & mencoder p1 -cache 2048 -ovc copy -oac copy -o out.avi

All I did was invert the position of mencoder and zvbi-atsc-cc. Looks 
like a bug?

Dave





More information about the MEncoder-users mailing list