[MEncoder-users] Can you feed a named pipe into mencoder?
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Nov 12 08:24:02 CET 2010
On Thu, Nov 11, 2010 at 05:30:28PM -0800, David Liontooth wrote:
> 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?
I don't think so. I suspect that with your shell mencoder does not
get a signal with ctrl+c. mencoder should quit as soon as "tee"
quits though, although there could be some missing EOF checks in
the MPEG-parsing code.
More information about the MEncoder-users
mailing list