Parsing mplayer output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



I've got a semi-automatic script that helps me with mencoder.  It's based
on zenity, a sort of x-dialog clone.

I've been struggling with getting the output of mencoder to make sense to
zenity.

Basically, mencoder outputs a status line about 10 times / sec.  Those
lines are separated by a \r, so they overwrite on the screen.

Ideally I'd like to filter this two ways:

1.  1 status line posted every minute, to show it's still alive.
2.  A status line posted for every 'Skipping frame' or 'Duplicate frame'
message.

I've been struggling with this and I can't get it to work; something
always screws up.

No combination of

mencoder ... 2>&1 | tr '\r' '\n' | grep -v '^Pos'
or
mencoder ... 2>&1 | sed -e s/\r/\n\r/g | grep -v '^Pos'

seems to do the trick.




-- 
If you have eight hours to chop down a tree
spend six sharpening your axe.
--Abraham Lincoln



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux