[MPlayer-users] mencoder, libavcodec, high-motion scenes jerky
Dominik Mierzejewski
dominik at rangers.eu.org
Wed May 29 16:56:01 CEST 2002
Hi.
I've encoded a movie with the following script, using latest
mencoder (20020528).
---BEGIN---
#!/bin/sh
# $1=source $2=output
rm -f frameno.avi lavc_stats.txt
# video options
CODEC=mpeg4 # video codec type
VBR=1000000 # video bitrate
BFR=0 # max B-frames number
KI=48 # keyframe interval in frames
VQMIN=2 # min quantizer
VQMAX=12 # max quantizer
VQDIFF=3 # max quantizer diff between frames
OFPS=24 # output frame rate
CROP="crop=464:352:5:66"
SCALE="scale=640:352"
LAVCOPTS="vcodec=$CODEC:vbitrate=$VBR:vhq:vqmin=$VQMIN:vqmax=$VQMAX:vmax_b_frames=$BFR:keyint=$KI"
VOPTS="-ofps $OFPS -sws 2 -vop $SCALE,$CROP"
# audio options
BR_TYPE="abr" # bitrate encoding type
VBR_Q=2 # variable bitrate quality
AVG_ABR=128 # average/constant bitrate
mencoder -v $OPTS \
-ovc frameno $VOPTS \
-oac mp3lame -lameopts $BR_TYPE:br=$AVG_ABR:q=$VBR_Q \
-o frameno.avi $1
mencoder -v $OPTS \
-ovc lavc -lavcopts $LAVCOPTS:vqdiff=$VQDIFF:vpass=1 $VOPTS \
-oac mp3lame -lameopts $BR_TYPE:br=$AVG_ABR:q=$VBR_Q \
-o $2 $1
mencoder -v -nosound $OPTS \
-ovc lavc -lavcopts $LAVCOPTS:vpass=2 $VOPTS \
-oac copy -lameopts $BR_TYPE:br=$AVG_ABR:q=$VBR_Q \
-o $2 $1
---END---
Original material is MPEG2, 480x480, 5100 seconds. I'm cropping out the
black bars from top and bottom and a few pixels from left and right. While
the overall quality is great (would B-frames help more?) and filesize
matching (I was aiming at 686MB, got 692MB) is almost perfect, the high
motion scenes look jerky. I'm sure there's some parameter I haven't thought
of that could help when tweaked. The question is, which one? vme, vqcomp,
vqdiff? As you have probably noticed, I'm changing FPS to 24 (original is
29.976), is that an issue? Have I done something wrong?
--
MPlayer RPMs: http://msp-190.man.olsztyn.pl/~dominik/linux/pkgs/mplayer.html
"The Universe doesn't give you any points for doing things that are easy."
-- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
Dominik 'Rathann' Mierzejewski <rathann(at)rangers.eu.org>
More information about the MPlayer-users
mailing list