[MPlayer-users] Bad quality ("horizontal lines on movement") an mpeg2->divx

Corey Hickey bugfood-ml at fatooh.org
Sun Jul 14 23:40:02 CEST 2002


Corey Hickey wrote:
> As far as I know, you need to parse the mencoder output. I could tell
> you a way to do that, but I don't know enough about scripting to write
> a nice, clean method. Perhaps someone else here can help you out with
> that.

On second thought, I just checked the output, and the parsing is easier
than I thought. You just need to have something like this:

#---snip---
#do the first pass, redirect stderr to stdout,
#and copy stdout into output.log
mencoder -whateveroptionsyouwant 2>&1 | tee output.log

#extract the recommendation line. Change $3 to suit your purposes
RECOMMEND=$(grep "$3MB CD" output.log)

#strip the longest instance of anything that starts with R and ends
#with (space) from the beginning of the variable
BITRATE=${RECOMMEND##R* }

#do whatever you want
mencoder -allyourotheroptions -lavcopts vbitrate=$BITRATE
#---snip---

-Corey




More information about the MPlayer-users mailing list