[MEncoder-users] Encodes for slow laptop
Stella-Terra Clemens
stellaterraclemens at gmail.com
Wed Jun 11 18:16:43 CEST 2008
Wow, what a lot of responses! Thanks everyone for all of your help and
opinions.
I tried simply encoding in libavcodec without resizing and the result was
definitely too slow to watch, so I started trying to go through and figure
out the right combination of codec/resolution/bitrate for my needs, but then
I came up with a better idea (I think.)
Tell me if this seems like a plausible idea:
I've created a simple double-for-loop shell script that encodes the first
two minutes of a DVD into libavcodec, xvid, and h.264, at 4 different
resolutions, in 5 different bitrates. Then, I'm going to create another
shell script (though I'm having a little trouble with this) that will run
each file in mplayer using the -vo null -nosound -noskip -benchmark and
parsing out the results in second and storing them in a CSV file which I can
then import into a spreadsheat and graph. I think theoretically I should be
able to say something like, "no 2 minute file should take longer than 75
seconds to decode" and then be able to have a selection of encodings that do
that and be able to go through and select the best looking.
So far I got the encoding script working, but, because of my inexperience
with shell scripting I haven't been able to create a CSV file with the
benchmark data.
Thanks for all of your help,
Stella
Oh, and in case there's anything glaringly wrong with my encode parameters,
here is the script:
#!/bin/bash
for resolution in '704:480' '576:432' '512:384' '448:336'
do
for bitrate in 0400 0800 1000 1200 1600
do
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc lavc -lavcopts
autoaspect:vcodec=mpeg4:vbitrate=${bitrate}:vhq:vpass=1:vqmin=1:vqmax=31 \
-alang en -oac copy \
-o /dev/null && \
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc lavc -lavcopts
autoaspect:vcodec=mpeg4:vbitrate=${bitrate}:vhq:vpass=1:vqmin=1:vqmax=31 \
-alang en -oac mp3lame -lameopts vbr=3 \
-o autotest/mp4-${resolution}-${bitrate}.avi
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc xvid -xvidencopts pass=1 \
-alang en -oac copy \
-o /dev/null && \
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc xvid -xvidencopts pass=2:bitrate=${bitrate} \
-alang en -oac mp3lame -lameopts vbr=3 \
-o autotest/xvid-${resolution}-${bitrate}.avi
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc x264 -x264encopts
bitrate=${bitrate}:frameref=6:analyse=all:me=umh:subme=7:trellis=2:bframes=1:subq=7:brdo:mixed_refs:weight_b:bime:no_fast_pskip:direct_pred=auto:mixed_refs:nr=200:threads=auto:turbo=2:pass=1
\
-alang en -oac copy \
-o /dev/null && \
mencoder ep05.vob -endpos 120 \
-vf yadif,crop=704:480:12:0,scale=${resolution} \
-ovc x264 -x264encopts
bitrate=${bitrate}:frameref=6:analyse=all:me=umh:subme=7:trellis=2:bframes=1:subq=7:brdo:mixed_refs:weight_b:bime:no_fast_pskip:direct_pred=auto:mixed_refs:nr=200:threads=auto:pass=2
\
-alang en -oac mp3lame -lameopts vbr=3 \
-o autotest/h264-${resolution}-${bitrate}.avi
done
done
More information about the MEncoder-users
mailing list