[MPlayer-users] Mencoder and avi file with zero frames

petr.adamek at bilysklep.cz petr.adamek at bilysklep.cz
Wed Nov 13 03:55:02 CET 2002


Hello,

I have (probably broken) avi file, which I want convert by mencoder. When
I try it encode using 3-pass encoding, destination file has audio delayed
(and video is some seconds shorter). Mencoder doesn't writes any warning
or error messages.

mencoder -ovc frameno -o frameno.avi -oac copy  zeroframes.avi
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=650 -oac copy
zeroframes.avi -o zeroframes.avi.out.avi
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=650 -oac copy
zeroframes.avi -o zeroframes.avi.out.avi

When I try use one-pass encoding, destination file has audio OK, but
mencoder at some few positions at begin of file reports
"duplicate 1 frame(s)!!!" message for 5 - 30 frames consecutive.
(These places are exactly in positions of black screen between titles,
therefore it may not be the error, but empty frames with zero length
in source file.) When I take destination file and encode it by mencoder
again, messages about duplicated frames are the same and at the same
places.

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=650 -v -oac copy
zeroframes.avi -o zeroframes.avi.out.avi

I think, that mencoder can't correctly process empty frames (with zero
length) in source avi file when 3-pass encoding is in progress. And in
one-pass encoding it copies zero length frames to destination file correctly, but
it writes message about duplicating frame.

I am not sure, that my ideas are right, but I can't find other
explanation.

ftp://mplayerhq.hu/MPlayer/incoming/zeroframes.avi
ftp://mplayerhq.hu/MPlayer/incoming/zeroframes.txt

Petr Adamek

------------------------------------------------------------------------------

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=650 -oac copy
zeroframes.avi -o zeroframes.avi.out.avi
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MEncoder 0.90pre10-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices Duron SF Spitfire (Family: 6, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Reading /home/petr/.mplayer/codecs.conf: can't open
'/home/petr/.mplayer/codecs.conf': nenReading
/usr/local/etc/mplayer/codecs.conf: 44 audio & 110 video codecs
Detected AVI file format!
VIDEO:  [FrNo]  720x416  24bpp  25,00 fps    0,8 kbps ( 0,1 kbyte/s)
Using pass3 control file: frameno.avi
get_path('font/font.desc') -> '/home/petr/.mplayer/font/font.desc'
font: can't open file: /home/petr/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206
chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 17150878 bytes
success: format: 0  data: 0x0 - 0x105B39E
Detected AVI file format!
list_end=0x144
======= AVI Header =======
us/frame: 40000  (fps=25,000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 4500   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 416
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25,000
Start: 0   Len: 4500
Suggested BufferSize: 22750
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 416
  biPlanes 1
  biBitCount 24
  biCompression 861292868='DIV3'
  biSizeImage 898560
===========================
Regenerating keyframe table for DIVX 3 video
list_end=0x144
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 7000/1 = 7000,000
Start: 0   Len: 1263500
Suggested BufferSize: 3500
Quality 0
Sample size: 1
found 'wf', 28 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 24000
avg byte/sec: 7000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=168
mp3.nFramesPerBlock=1
mp3.nCodecDelay=1889
list_end=0x174
hdr=Software  size=27
Software  : MEncoder 0.90pre10-2.95.3
Broken chunk?  chunksize=1668  (id=JUNK)
list_end=0x10483C6
Found movie at 0x80C - 0x10483C6
Reading INDEX block, 4861 chunks for 4500 frames (fpos=0x10483ce)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0xDB8)
Auto-selected AVI video ID = 0
AVI_NI: No Audio stream found...  ->  no sound
AVI video length=17032154
VIDEO:  [DIV3]  720x416  24bpp  25,00 fps  757,0 kbps (92,4 kbyte/s)
[V] filefmt:3  fourcc:0x33564944  size:720x416  fps:25,00  ftime:=0,0400
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=24000 bits=0 bps=7000
sample=1)
Writing AVI header...
XXX initial  v_pts=0,000  a_pos=3500 (0,500)
VDec: vo config request - 720 x 416 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x416->720x416,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0
videocodec: libavcodec (720x416 fourcc=58564944 [DIVX])
*** [lavc] Allocating mp_image_t, 720x416x12bpp YUV planar, 449280 bytes
*** [expand] Direct Rendering mp_image_t, 720x416x12bpp YUV planar, 449280
bytes
*** [lavc] Allocating mp_image_t, 720x416x12bpp YUV planar, 449280 bytesms
0/46 D/B/S 0/29/0
*** [expand] Direct Rendering mp_image_t, 720x416x12bpp YUV planar, 449280
bytes
ds_fill_buffer: EOF reached (stream: video)    14mb  A-V:0,000 [654:56]
A/Vms 0/30 D/B/S 0/228/0
Pos: 170,9s   4500f (99%)  31fps Trem:   0min  14mb  A-V:0,000 [654:56]
A/Vms 0/30 D/B/S 0/228/0
Writing AVI index...
Fixup AVI header...

Video stream:  654,967 kbit/s  (81870 bps)  size: 13990086 bytes  170,880
secs  4500 frames

Audio stream:   56,000 kbit/s  (7000 bps)  size: 1200500 bytes  171,500
secs
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x82e4148

------------------------------------------------------------------------------
------------------------------------------------------------------------------

mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=650 -v -oac copy
zeroframes.avi -o zeroframes.avi.out.avi
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MEncoder 0.90pre10-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices Duron SF Spitfire (Family: 6, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Reading /home/petr/.mplayer/codecs.conf: can't open
'/home/petr/.mplayer/codecs.conf': nenReading
/usr/local/etc/mplayer/codecs.conf: 44 audio & 110 video codecs
File not found: 'frameno.avi'
get_path('font/font.desc') -> '/home/petr/.mplayer/font/font.desc'
font: can't open file: /home/petr/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206
chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 17150878 bytes
success: format: 0  data: 0x0 - 0x105B39E
Detected AVI file format!
list_end=0x144
======= AVI Header =======
us/frame: 40000  (fps=25,000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 4500   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 416
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25,000
Start: 0   Len: 4500
Suggested BufferSize: 22750
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 416
  biPlanes 1
  biBitCount 24
  biCompression 861292868='DIV3'
  biSizeImage 898560
===========================
Regenerating keyframe table for DIVX 3 video
list_end=0x144
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 7000/1 = 7000,000
Start: 0   Len: 1263500
Suggested BufferSize: 3500
Quality 0
Sample size: 1
found 'wf', 28 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 24000
avg byte/sec: 7000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=168
mp3.nFramesPerBlock=1
mp3.nCodecDelay=801
list_end=0x174
hdr=Software  size=27
Software  : MEncoder 0.90pre10-2.95.3
Broken chunk?  chunksize=1668  (id=JUNK)
list_end=0x10483C6
Found movie at 0x80C - 0x10483C6
Reading INDEX block, 4861 chunks for 4500 frames (fpos=0x10483ce)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0xDB8)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=15768654
VIDEO:  [DIV3]  720x416  24bpp  25,00 fps  700,8 kbps (85,5 kbyte/s)
[V] filefmt:3  fourcc:0x33564944  size:720x416  fps:25,00  ftime:=0,0400
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=24000 bits=0 bps=7000
sample=1)
Writing AVI header...
VDec: vo config request - 720 x 416 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x416->720x416,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0
videocodec: libavcodec (720x416 fourcc=58564944 [DIVX])
*** [lavc] Allocating mp_image_t, 720x416x12bpp YUV planar, 449280 bytes
*** [expand] Direct Rendering mp_image_t, 720x416x12bpp YUV planar, 449280
bytes
XXX initial  v_pts=0,000  a_pos=3500 (0,500)    0mb  A-V:0,000 [0:0] A/Vms
0/40 D/B/S 0/0/0
*** [lavc] Allocating mp_image_t, 720x416x12bpp YUV planar, 449280
bytes/Vms 0/2 D/B/S 27/29/0
*** [expand] Direct Rendering mp_image_t, 720x416x12bpp YUV planar, 449280
bytes
ds_fill_buffer: EOF reached (stream: video)    14mb  A-V:0,040 [632:56]
A/Vms 0/25 D/B/S 227/228/0

Writing AVI index...
Fixup AVI header...

Video stream:  632,064 kbit/s  (79008 bps)  size: 14218282 bytes  179,960
secs  4500 frames

Audio stream:   56,000 kbit/s  (7000 bps)  size: 1263500 bytes  180,500
secs
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x82e2150

------------------------------------------------------------------------------
------------------------------------------------------------------------------






More information about the MPlayer-users mailing list