These two AVI files play back correctly when decoding audio with mp3lib or libmad, but when using FFmpeg's MP3 decoder (afm=ffmpeg) there are problems. In bad-mp3-audio-with-ffmpeg_slow.avi, the audio is played too slowly - more specifically, it appears to be played at three-fourths the speed of the video. In bad-mp3-audio-with-ffmpeg_worse.avi, the audio appears to be played back at varying and sometimes negative rates - judging by the status-line output, it starts out at 0.7 seconds (when the video is 0.0), goes up to 1.3, drops to 0.2, rises again, then fluctuates considerably thereafter. It looks bloody weird. Just on the offchance that the problem is not reproducible, here is the -v output from the two files, in order (the only thing snipped being the bulk of the aforementioned status lines): --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MPlayer dev-CVS-050717-19:47-3.3.5 (C) 2000-2005 MPlayer Team CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 0) Detected cache-line size is 64 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE CommandLine: '-v' '-afm' 'ffmpeg' 'bad-mp3-audio-with-ffmpeg_slow.avi' init_freetype get_path('font/font.desc') -> '/home/wanderer/.mplayer/font/font.desc' font: can't open file: /home/wanderer/.mplayer/font/font.desc Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars) Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay Using Linux hardware RTC timing (1024Hz). get_path('input.conf') -> '/home/wanderer/.mplayer/input.conf' Can't open input config file /home/wanderer/.mplayer/input.conf: No such file or directory Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory Falling back on default (hardcoded) input config get_path('bad-mp3-audio-with-ffmpeg_slow.avi.conf') -> '/home/wanderer/.mplayer/bad-mp3-audio-with-ffmpeg_slow.avi.conf' Playing bad-mp3-audio-with-ffmpeg_slow.avi. [file] File size is 5242880 bytes STREAM: [file] bad-mp3-audio-with-ffmpeg_slow.avi STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) AVI file format detected. list_end=0x22D6 ======= AVI Header ======= us/frame: 41708 (fps=23.976) max bytes/sec: 0 padding: 0 MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED frames total: 37278 initial: 0 streams: 2 Suggested BufferSize: 0 Size: 640 x 480 ========================== list_end=0x1138 ==> Found video stream: 0 ====== STREAM Header ===== Type: vids FCC: fvfw (77667666) Flags: 0 Priority: 0 Language: 0 InitialFrames: 0 Rate: 2997/125 = 23.976 Start: 0 Len: 37278 Suggested BufferSize: 79203 Quality 10000 Sample size: 0 ========================== found 'bih', 108 bytes of 40 ======= VIDEO Format ====== biSize 40 biWidth 640 biHeight 480 biPlanes 1 biBitCount 24 biCompression 1145656920='XVID' biSizeImage 921600 =========================== Regenerating keyframe table for MPEG4 video list_end=0x21CA ==> Found audio stream: 1 ====== STREAM Header ===== Type: auds FCC: U (55) Flags: 0 Priority: 0 Language: 0 InitialFrames: 1 Rate: 20000/1 = 20000.000 Start: 0 Len: 31095763 Suggested BufferSize: 10000 Quality 0 Sample size: 1 ========================== found 'wf', 30 bytes of 18 ======= WAVE Format ======= Format Tag: 85 (0x55) Channels: 2 Samplerate: 48000 avg byte/sec: 20000 Block align: 1 bits/sample: 0 cbSize: 12 mp3.wID=1 mp3.fdwFlags=0x2 mp3.nBlockSize=480 mp3.nFramesPerBlock=1 mp3.nCodecDelay=1393 =========================== list_end=0x22D6 AVI: dmlh found (size=248) (total_frames=37278) list_end=0xCD2DAD4 Found movie at 0x280C - 0xCD2DAD4 stream_seek: WARNING! Can't seek to 0xCD2DAD4 ! Auto-selected AVI audio ID = 1 Auto-selected AVI video ID = 0 AVI: Searching for audio stream (id:1) AVI video size=183740933 (37278) audio size=31095763 VIDEO: [XVID] 640x480 24bpp 23.976 fps 945.4 kbps (115.4 kbyte/s) [V] filefmt:3 fourcc:0x44495658 size:640x480 fps:23.98 ftime:=0.0417 get_path('sub/') -> '/home/wanderer/.mplayer/sub/' SUB: Could not determine file format Cannot load subtitles: ./bad-mp3-audio-with-ffmpeg_slow.txt dvdsublang...bad mp3 audio with ffmpeg slow en get_path('default.sub') -> '/home/wanderer/.mplayer/default.sub' ========================================================================== Trying to force audio codec driver family ffmpeg... Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders dec_audio: Allocating 131072 + 65536 = 196608 bytes for output buffer. FFmpeg's libavcodec audio codec INFO: libavcodec init OK! AUDIO: 32000 Hz, 2 ch, s16le, 160.0 kbit/15.62% (ratio: 20000->128000) Selected audio codec: [ffmp3] afm:ffmpeg (FFmpeg MPEG layer-3 audio decoder) ========================================================================== X11 opening display: :0.0 vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF) vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0.0" => local display) [x11] Detected wm supports layers. [x11] Detected wm supports NetWM. [x11] Detected wm supports FULLSCREEN state. [x11] Detected wm supports ABOVE state. [x11] Detected wm supports BELOW state. [x11] Current fstype setting honours LAYER FULLSCREEN ABOVE BELOW X atoms [xv common] Drawing colorkey manually. [xv common] Using colorkey from Xv (0x0101fe). ========================================================================== Trying to force video codec driver family ffmpeg... Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family INFO: libavcodec init OK! Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4) ========================================================================== Building audio filter chain for 32000Hz/2ch/s16le -> 0Hz/0ch/??... [libaf] Adding filter dummy [dummy] Was reinitialized: 32000Hz/2ch/s16le [dummy] Was reinitialized: 32000Hz/2ch/s16le alsa-init: requested format: 32000 Hz, 2 channels, 9 alsa-init: compiled for ALSA-1.0.9 alsa-init: setup for 1/2 channel(s) alsa-init: 1 soundcard found, using: default alsa-init: pcm opend in block-mode alsa-init: chunksize set to 682 alsa-init: fragcount=16 alsa-init: got buffersize=43688 alsa: 32000 Hz/2 channels/4 bpf/43688 bytes buffer/Signed 16 bit Little Endian AO: [alsa] 32000Hz 2ch s16le (2 bps) AO: Description: ALSA-0.9.x-1.x audio output AO: Author: Alex Beregszaszi, Zsolt Barat AO: Comment: under developement Building audio filter chain for 32000Hz/2ch/s16le -> 32000Hz/2ch/s16le... [dummy] Was reinitialized: 32000Hz/2ch/s16le [dummy] Was reinitialized: 32000Hz/2ch/s16le Starting playback... alsa-space: free space = 43688, prepared -- [ffmpeg] aspect_ratio: 1.333333 VDec: vo config request - 640 x 480 (preferred csp: Planar YV12) Trying filter chain: vo VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO Config (640x480->640x480,flags=0,'MPlayer',0x32315659) VO: [xv] 640x480 => 640x480 Planar YV12 VO: Description: X11/Xv VO: Author: Gerd Knorr and others Xvideo image format: 0x32595559 (YUY2) packed Xvideo image format: 0x32315659 (YV12) planar Xvideo image format: 0x59565955 (UYVY) packed Xvideo image format: 0x30323449 (I420) planar using Xvideo port 238 for hw scaling [xv] dx: 0 dy: 0 dw: 640 dh: 480 *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes [xv] dx: 0 dy: 0 dw: 640 dh: 481 A: 0.1 V: 0.0 A-V: 0.061 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0 XXX initial v_pts=0.000 a_pos=10000 (0.500) *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes A: 0.0 V: 0.0 A-V: -0.005 ct: -0.000 2/ 2 ??% ??% ??,?% 0 0 A: 24.1 V: 32.9 A-V: -8.759 ct: -3.281 789/789 7% 4% 1.2% 0 0 [mpeg4 @ 0x85efde0]cbpc damaged at 22 7 [mpeg4 @ 0x85efde0]Error at MB: 309 [mpeg4 @ 0x85efde0]concealing 1021 DC, 1021 AC, 1021 MV errors A: 24.1 V: 32.9 A-V: -8.770 ct: -3.285 790/790 7% 4% 1.2% 0 0 ds_fill_buffer: EOF reached (stream: video) A: 24.1 V: 32.9 A-V: -8.782 ct: -3.289 790/790 7% 4% 1.2% 0 0 EOF code: 1 Uninit audio filters... [libaf] Removing filter dummy uninit audio: ffmpeg uninit video: ffmpeg alsa-uninit: pcm closed vo: uninit ... Exiting... (End of file) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MPlayer dev-CVS-050717-19:47-3.3.5 (C) 2000-2005 MPlayer Team CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 0) Detected cache-line size is 64 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE CommandLine: '-v' '-afm' 'ffmpeg' 'bad-mp3-audio-with-ffmpeg_worse.avi' init_freetype get_path('font/font.desc') -> '/home/wanderer/.mplayer/font/font.desc' font: can't open file: /home/wanderer/.mplayer/font/font.desc Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars) Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay Using Linux hardware RTC timing (1024Hz). get_path('input.conf') -> '/home/wanderer/.mplayer/input.conf' Can't open input config file /home/wanderer/.mplayer/input.conf: No such file or directory Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory Falling back on default (hardcoded) input config get_path('bad-mp3-audio-with-ffmpeg_worse.avi.conf') -> '/home/wanderer/.mplayer/bad-mp3-audio-with-ffmpeg_worse.avi.conf' Playing bad-mp3-audio-with-ffmpeg_worse.avi. [file] File size is 5242880 bytes STREAM: [file] bad-mp3-audio-with-ffmpeg_worse.avi STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) AVI file format detected. list_end=0x22D6 ======= AVI Header ======= us/frame: 41708 (fps=23.976) max bytes/sec: 0 padding: 0 MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED frames total: 37258 initial: 0 streams: 2 Suggested BufferSize: 0 Size: 640 x 480 ========================== list_end=0x1138 ==> Found video stream: 0 ====== STREAM Header ===== Type: vids FCC: xvid (64697678) Flags: 0 Priority: 0 Language: 0 InitialFrames: 0 Rate: 119880/5000 = 23.976 Start: 0 Len: 37258 Suggested BufferSize: 59365 Quality 10000 Sample size: 0 ========================== found 'bih', 108 bytes of 40 ======= VIDEO Format ====== biSize 40 biWidth 640 biHeight 480 biPlanes 1 biBitCount 24 biCompression 1145656920='XVID' biSizeImage 921600 =========================== Regenerating keyframe table for MPEG4 video list_end=0x21CA ==> Found audio stream: 1 ====== STREAM Header ===== Type: auds FCC: (0) Flags: 0 Priority: 0 Language: 0 InitialFrames: 1 Rate: 20000/1 = 20000.000 Start: 0 Len: 31079133 Suggested BufferSize: 10000 Quality -1 Sample size: 1 ========================== found 'wf', 30 bytes of 18 ======= WAVE Format ======= Format Tag: 85 (0x55) Channels: 2 Samplerate: 48000 avg byte/sec: 20000 Block align: 1 bits/sample: 0 cbSize: 12 mp3.wID=1 mp3.fdwFlags=0x2 mp3.nBlockSize=480 mp3.nFramesPerBlock=1 mp3.nCodecDelay=1393 =========================== list_end=0x22D6 AVI: dmlh found (size=248) (total_frames=37258) list_end=0xB9A4A14 Found movie at 0x280C - 0xB9A4A14 stream_seek: WARNING! Can't seek to 0xB9A4A14 ! Auto-selected AVI audio ID = 1 Auto-selected AVI video ID = 0 AVI: Searching for audio stream (id:1) AVI video size=163273435 (37258) audio size=31079133 VIDEO: [XVID] 640x480 24bpp 23.976 fps 840.5 kbps (102.6 kbyte/s) [V] filefmt:3 fourcc:0x44495658 size:640x480 fps:23.98 ftime:=0.0417 get_path('sub/') -> '/home/wanderer/.mplayer/sub/' SUB: Could not determine file format Cannot load subtitles: ./bad-mp3-audio-with-ffmpeg_worse.txt dvdsublang...bad mp3 audio with ffmpeg worse en dvdsublang...bad mp3 audio with ffmpeg worse en dvdsublang...bad mp3 audio with ffmpeg worse en get_path('default.sub') -> '/home/wanderer/.mplayer/default.sub' ========================================================================== Trying to force audio codec driver family ffmpeg... Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders dec_audio: Allocating 131072 + 65536 = 196608 bytes for output buffer. FFmpeg's libavcodec audio codec INFO: libavcodec init OK! AUDIO: 11025 Hz, 2 ch, s16le, 48.0 kbit/13.61% (ratio: 6000->44100) Selected audio codec: [ffmp3] afm:ffmpeg (FFmpeg MPEG layer-3 audio decoder) ========================================================================== X11 opening display: :0.0 vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF) vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0.0" => local display) [x11] Detected wm supports layers. [x11] Detected wm supports NetWM. [x11] Detected wm supports FULLSCREEN state. [x11] Detected wm supports ABOVE state. [x11] Detected wm supports BELOW state. [x11] Current fstype setting honours LAYER FULLSCREEN ABOVE BELOW X atoms [xv common] Drawing colorkey manually. [xv common] Using colorkey from Xv (0x0101fe). ========================================================================== Trying to force video codec driver family ffmpeg... Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family INFO: libavcodec init OK! Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4) ========================================================================== Building audio filter chain for 11025Hz/2ch/s16le -> 0Hz/0ch/??... [libaf] Adding filter dummy [dummy] Was reinitialized: 11025Hz/2ch/s16le [dummy] Was reinitialized: 11025Hz/2ch/s16le alsa-init: requested format: 11025 Hz, 2 channels, 9 alsa-init: compiled for ALSA-1.0.9 alsa-init: setup for 1/2 channel(s) alsa-init: 1 soundcard found, using: default alsa-init: pcm opend in block-mode alsa-init: chunksize set to 235 alsa-init: fragcount=16 alsa-init: got buffersize=15052 alsa: 11025 Hz/2 channels/4 bpf/15052 bytes buffer/Signed 16 bit Little Endian AO: [alsa] 11025Hz 2ch s16le (2 bps) AO: Description: ALSA-0.9.x-1.x audio output AO: Author: Alex Beregszaszi, Zsolt Barat AO: Comment: under developement Building audio filter chain for 11025Hz/2ch/s16le -> 11025Hz/2ch/s16le... [dummy] Was reinitialized: 11025Hz/2ch/s16le [dummy] Was reinitialized: 11025Hz/2ch/s16le Starting playback... alsa-space: free space = 15052, prepared -- [ffmpeg] aspect_ratio: 1.333333 VDec: vo config request - 640 x 480 (preferred csp: Planar YV12) Trying filter chain: vo VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO Config (640x480->640x480,flags=0,'MPlayer',0x32315659) VO: [xv] 640x480 => 640x480 Planar YV12 VO: Description: X11/Xv VO: Author: Gerd Knorr and others Xvideo image format: 0x32595559 (YUY2) packed Xvideo image format: 0x32315659 (YV12) planar Xvideo image format: 0x59565955 (UYVY) packed Xvideo image format: 0x30323449 (I420) planar using Xvideo port 238 for hw scaling [xv] dx: 0 dy: 0 dw: 640 dh: 480 *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes [xv] dx: 0 dy: 0 dw: 640 dh: 481 A: 0.6 V: 0.0 A-V: 0.610 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0 XXX initial v_pts=0.000 a_pos=10000 (0.500) *** [vo] Allocating (slices) mp_image_t, 640x480x12bpp YUV planar, 460800 bytes A: 0.7 V: 0.0 A-V: 0.633 ct: 0.004 2/ 2 ??% ??% ??,?% 0 0 A: 7.9 V: 31.9 A-V:-23.946 ct: -2.995 765/765 8% 4% 0.4% 0 0 [mpeg4 @ 0x85efde0]ac-tex damaged at 0 13 [mpeg4 @ 0x85efde0]Error at MB: 533 [mpeg4 @ 0x85efde0]concealing 729 DC, 729 AC, 729 MV errors A: 8.0 V: 31.9 A-V:-23.945 ct: -2.999 766/766 8% 4% 0.4% 0 0 ds_fill_buffer: EOF reached (stream: video) A: 8.0 V: 31.9 A-V:-23.924 ct: -3.003 766/766 8% 4% 0.4% 0 0 EOF code: 1 Uninit audio filters... [libaf] Removing filter dummy uninit audio: ffmpeg uninit video: ffmpeg alsa-uninit: pcm closed vo: uninit ... Exiting... (End of file)