[MPlayer-users] second pass producing the same file as first pass with avcodec, why ?

Rémi Guyomarch rguyom at pobox.com
Mon Apr 15 05:53:02 CEST 2002


Hi,

It seems the second pass in a 2 pass encoding session with avcodec
produce the exact same output file (down to the byte level) than the
first one.
Is there some lack of support for 2 pass encoding in avcodec or is it
a bug ? Is it a DivX4/XviD-only feature ? Am I a fool ? :-)

PS: tested with latest cvs of both mplayer/mencoder and ffmpeg's
libavcodec.

Little script used :
(resulting files movie-pass1.avi and movie-pass2.avi are the same)


#!/bin/sh

FILTERS="-vop scale=704:298,crop=704:424:8:76"
VBITRATE="785"
ABITRATE="96"
STARTEND="-endpos 05:00"

ENCODER="/home/rguyom/src/mplayer/mencoder"
AUDIO="-oac mp3lame -lameopts br=$ABITRATE:vbr=3:q=2"
VIDEO="-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$VBITRATE:vhq:vme=5:v4mv=1"
#VIDEO="-ovc divx4 -divx4opts br=$VBITRATE:min_quant=2"

# victor, nettoyeur
rm -f frameno.avi movie.avi analyse.log divx2pass.log

# passe audio
$ENCODER -ovc frameno $AUDIO $STARTEND $FILTERS -o frameno.avi "$1"

# passe vidéo n°1
$ENCODER $VIDEO -oac copy $STARTEND $FILTERS -o movie.avi -pass 1 "$1"
cp -f movie.avi movie-pass1.avi

# passe vidéo n°2
$ENCODER $VIDEO -oac copy $STARTEND $FILTERS -o movie.avi -pass 2 "$1"
mv -f movie.avi movie-pass2.avi

-- 
Rémi




More information about the MPlayer-users mailing list