[MEncoder-users] Broken AVI files???

Charles Wilcox willo at wpi.edu
Sun Feb 6 17:51:21 CET 2005


I have experienced problems playing some 'mencoder' produced AVI files in
Windows Media Player, and Real Player.  I have narrowed down the problem
to be files I created using a 2-pass (video & audio) encode, whereas files
created with a 3-pass (audio separate, then 2-pass video) play fine.

Specifics:
 - MPlayer-1.0pre6a, xvid-1.0.3, and lame-3.96.1, all manually compiled.
 - I've varied the encoding linux computer from a p4-3.2GHz to a AMD
   Opteron 2.0GHz, which does not affect playability of the files.
 - Using DivX vs. Xvid vs. ffdshow codecs on clients does not affect
   playability of the files.
 - The DivX player is always able to play the files.

Example of a 3-pass command set that works:

 mencoder dvd://1 -aid 128 -ofps 23.976 \
   -oac mp3lame -lameopts q=8:aq=0:lowpassfreq=-1 -af volume=15 \
   -ovc frameno -o frameno.avi

 mencoder dvd://1 -aid 128 -ofps 23.976 -oac copy \
   -ovc xvid -xvidencopts vhq=4:chroma_me:chroma_opt:hq_ac:trellis:pass=1 \
   -vf crop=720:366:0:54,scale=560:240 -o /dev/null

 mencoder dvd://1 -aid 128 -ofps 23.976 -oac copy \
   -ovc xvid -xvidencopts vhq=4:chroma_me:chroma_opt:hq_ac:trellis:bitrate=-645293:pass=2 \
   -vf crop=720:366:0:54,scale=560:240 -o Equilibrium.avi

Example of a 2-pass command set that creates the troublesome AVI files:

 mencoder dvd://1 -aid 128 -ofps 23.976 \
   -oac mp3lame -lameopts q=8:aq=0:lowpassfreq=-1 -af volume=15 \
   -ovc xvid -xvidencopts vhq=4:chroma_me:chroma_opt:hq_ac:trellis:pass=1 \
   -vf crop=720:366:0:54,scale=560:240 -o /dev/null

 mencoder dvd://1 -aid 128 -ofps 23.976 \
   -oac mp3lame -lameopts q=8:aq=0:lowpassfreq=-1 -af volume=15 \
   -ovc xvid -xvidencopts vhq=4:chroma_me:chroma_opt:hq_ac:trellis:bitrate=-645293:pass=2 \
   -vf crop=720:366:0:54,scale=560:240 -o Equilibrium.avi

I used to use 3-pass encoding, but the frameno code is apparently broken,
in that audio-video desync occurs, depending allot on the source material.
Now I'm using 2-pass encoding, which solves all A-V sync issues.
However, I recently discovered this windows software issue.

Windows Media Player seems to think it does not have an appropriate codec,
tries to find a codec online, fails, and then procedes to just play the
audio track.  Real Player does a similiar thing... although Real Player
will eventually crash with DivX; with Xvid and ffdshow, it will start to
play the file, but the audio and video will become horribly out of sync,
and some video decoding artifacts appear on seeks.

So, I'm wondering if anyone can provide some insight on this problem.  I
perceive it as a problem because I want my files to play on as many
platforms as possible, and not being able to play these files on Windows
Media or Real Players is annoying at best, especially when other files
generated with other encoders work fine with the same client software.

 -- Charles Wilcox




More information about the MEncoder-users mailing list