[MPlayer-users] Fixing non-interleaved AVI with mencoder breaks av sync

Dominik Mierzejewski dominik at rangers.eu.org
Mon Apr 28 16:22:59 CEST 2003


Hello list.
Recently I came across a most peculiar problem. I have a non-interleaved
AVI file. MPlayer plays it more or less correctly and maintains good audio
sync. I'd like to burn it on a CD, so naturally I tried

mencoder -ovc copy -oac copy -o fixed.avi non-interleaved.avi

The resulting file is bad. For the first 10 minutes av sync is good, then
it goes off to about 17 seconds (and stays up to the end of the movie) and
no use of -delay seems to fix it. Any ideas? I tried searching the
archives, but nothing really relevant came up. Should I upload first 15
minutes of this movie? I'm using MPlayer-0.90.

mplayer -identify says this about the original file:

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale


MPlayer 0.90-RPM-3.1 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Advanced Micro Devices Duron SF Spitfire (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx

Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/dominik/.mplayer/config
Reading /home/dominik/.mplayer/codecs.conf: Reading /etc/mplayer/codecs.conf: 50 audio & 136 video codecs
CommandLine: '-v' '-identify' '-frames' '0' 'avalon.avi'
get_path('font/font.desc') -> '/home/dominik/.mplayer/font/font.desc'
font: can't open file: /home/dominik/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/home/dominik/.mplayer/input.conf'
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed : 52 binds
get_path('avalon.avi.conf') -> '/home/dominik/.mplayer/avalon.avi.conf'

Playing avalon.avi
Not an URL!
File size is 729956352 bytes
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:0
Cache fill:  0,00% (0 bytes)    AVI file format detected.
list_end=0x2292
======= AVI Header =======
us/frame: 41708  (fps=23,976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (16) HAS_INDEX
frames  total: 153529   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  640 x 368
list_end=0x10F4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC: div3 (33766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 23976/1000 = 23,976
Start: 0   Len: 153529
Suggested BufferSize: 60774
Quality 5000
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 640
  biHeight 368
  biPlanes 1
  biBitCount 24
  biCompression 861292868='DIV3'
  biSizeImage 706560
===========================
Regenerating keyframe table for DIVX 3 video
list_end=0x2186
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 11982/1 = 11982,000
Start: 0   Len: 76725389
Suggested BufferSize: 5991
Quality -1
Sample size: 1
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 11982
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=313
mp3.nFramesPerBlock=1
mp3.nCodecDelay=1393
list_end=0x2292
Broken chunk?  chunksize=1382  (id=JUNK)
list_end=0x2B4A7504
Found movie at 0x280C - 0x2B4A7504
Reading INDEX block, 228452 chunks for 153529 frames (fpos=0x2b4a750c)
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x1774)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
Detected NON-INTERLEAVED AVI file format.
AVI: Searching for audio stream (id:1)
XXX initial  v_pts=0,000  a_pos=0 (0,000)
AVI video size=647660122 (153529) audio size=76725389 (76725389)
VIDEO:  [DIV3]  640x368  24bpp  23,98 fps  809,1 kbps (98,8 kbyte/s)
[V] filefmt:3  fourcc:0x33564944  size:640x368  fps:23,98  ftime:=0,0417
get_path('sub/') -> '/home/dominik/.mplayer/sub/'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 96 kbit Joint-Stereo, BPF: 313
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 12000->176400 (96,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=avalon.avi
ID_VIDEO_FORMAT=DIV3
ID_VIDEO_BITRATE=809136
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=368
ID_VIDEO_FPS=23,976
ID_VIDEO_ASPECT=0,0000
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=96000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=6403

uninit audio: mp3lib
DEMUXER: freeing demuxer at 0x83fb378
vo: x11 uninit called but X11 not inited..

Exiting... (End of file)

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"



More information about the MPlayer-users mailing list