[MPlayer-users] MEncoder problem with 1.0pre3, audio track too fast

Karl Wood mplayer at shevek.f9.co.uk
Fri Dec 26 21:45:51 CET 2003



Symptoms
========

Using mencoder to encode a movie captured by lavrec, then playing back,
video looks and plays OK, but the audio plays twice as fast as normal.

This happens with 1.0pre3, but versions 1.0pre2 and 0.92 work perfectly. 

I believe mencoder could be the culprit, because the playback problems
are the same when using mplayer, xine, avidemux2 and aviplay.

Here's all the details. I'm new here, so please be patient if I missed
anything, I did RTFM, honestly ...


                                oooOOOooo

I encoded the same Quicktime file with three versions of mencoder on
the same machine and saved the resulting avi files.

Notice how the 1.0pre3 version is slightly smaller than the others?

av/MPlayer-Problems> ls -ol *avi
-r--------    1 shevek   15335274 2003-12-23 16:17 mplayer-0.92.avi
-r--------    1 shevek   15339748 2003-12-23 15:38 mplayer-1.0pre2.avi
-r--------    1 shevek   13819298 2003-12-23 14:33 mplayer-1.0pre3.avi

                                oooOOOooo

Look using some other tools, indeed, the 1.0pre3 version is smaller
than the others (look at the number of chunks) ...

av/MPlayer-Problems> avitype mplayer-0.92.avi | & grep chunks
<AVI reader> : Stream 0 vids : DIVX (0x58564944) 1848 chunks (7.22KB)
<AVI reader> : Stream 1 auds : MPEG Layer-3 (0x55) 149 chunks (1.16KB)
av/MPlayer-Problems> avitype mplayer-1.0pre2.avi  | & grep chunks
<AVI reader> : Stream 0 vids : DIVX (0x58564944) 1848 chunks (7.22KB)
<AVI reader> : Stream 1 auds : MPEG Layer-3 (0x55) 149 chunks (1.16KB)
av/MPlayer-Problems> avitype mplayer-1.0pre3.avi | & grep chunks
<AVI reader> : Stream 0 vids : DIVX (0x58564944) 1667 chunks (6.51KB)
<AVI reader> : Stream 1 auds : MPEG Layer-3 (0x55) 135 chunks (1.05KB)

                                oooOOOooo

Here's the script I used for encoding, $1 is my Quicktiome movie, $2
is the bitrate, 1500, $3 set to 768:576, also $4 set to 768:576

rm -f frameno.avi
mencoder $1 -ovc frameno -ovc frameno -oac mp3lame -lameopts cbr:br=160 -o frameno.avi
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=$2 -vop crop=$3,scale=$4 -oac copy -o movie.avi
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=$2 -vop crop=$3,scale=$4 -oac copy -o movie.avi
rm -f frameno.avi divx2pass.log

                                oooOOOooo

Here's the stuff requested in bugreports.html

> uname -a
Linux xxxxxx 2.4.20-4GB-athlon #1 Wed Dec 3 10:32:29 UTC 2003 i686 unknown unknown GNU/Linux
> ls -l /lib/libc[.-]*
-rwxr-xr-x    1 root     root      1491599 2003-03-13 23:33 /lib/libc.so.6
> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
> ld -v
GNU ld version 2.13.90.0.18 20030121 (SuSE Linux)
> as --version
GNU assembler 2.13.90.0.18 20030121 (SuSE Linux)
This assembler was configured for a target of `i486-suse-linux'.

                                oooOOOooo

Playing mplayer-1.0pre2.avi
===========================

AVI file format detected.
VIDEO:  [DIVX]  768x576  24bpp  25.000 fps  1493.5 kbps (182.3 kbyte/s)
Clip info:
 Software: MEncoder 1.0pre2-3.3
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 20000->176400 (160.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
SDL: Using driver: x11
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int 
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
SDL: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
AO: [sdl] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...

                                oooOOOooo

Playing mplayer-1.0pre3.avi
===========================

AVI file format detected.
VIDEO:  [DIVX]  768x576  24bpp  25.000 fps  1491.3 kbps (182.0 kbyte/s)
Clip info:
 Software: MEncoder 1.0pre3-3.3
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 20000->176400 (160.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
SDL: Using driver: x11
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int 
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
SDL: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
AO: [sdl] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...

                                oooOOOooo


Reading the list I notice you folks don't like mp3lib, so I tried a
version of 1.0pre3 using mp3lib from 1.0pre2 as a quick hack.

It built OK, but didn't play back correctly with the same symptoms.

                                oooOOOooo

I'm trying the CVS version now.

Karl




More information about the MPlayer-users mailing list