[MPlayer-users] muxing vorbis audio with mencoder?

D Richard Felker III dalias at aerifal.cx
Sat Jul 20 08:47:01 CEST 2002


Anyone had success muxing vorbis audio into an avi file with mencoder?
I'm using the following command line:

mencoder foo.avi -audiofile bar.ogg -ovc copy -oac copy -noskip -mc 0

Without -noskip, I get lots of (bogus) skipped frames, which corrupts
the video since many I/P frames get lost. With or without that option,
the audio doesn't work in the output file. Mplayer gives the following
output:

AVI OGG : Initial audio header is too small !!!!!
[V] filefmt:3  fourcc:0x33564944  size:352x240  fps:23.98  ftime:=0.0417
get_path('sub/') -> '/home/dalias/.mplayer/sub/'
Detected audio codec: [vorbis] afm:10 (OggVorbis Audio Decoder)
Initializing audio codec...
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
dec_audio: Allocating 4096 + 65536 = 69632 bytes for output buffer
OggVorbis: initial (identification) header broken!
ADecoder init failed :(
Couldn't initialize audio codec! -> nosound

I suspect the problem is that mplayer expects vorbis audio to be
wrapped in ogg inside the avi file, but the demuxer just pulls out the
raw vorbis stream and gives it to mencoder for copying. Is this the
case, and if so, is there any easy fix?

I would just consider adding internal vorbis encoding support, but
with the new audio filter layer coming very soon (hopefully) that
seems like a wasted effort. If the problem really is that mplayer
requires vorbis audio to be ogg-wrapped, it should probably just be
fixed -- as I understand, that's an extremely broken arrangement just
used by some bad encoder program for windows.

Rich

-------------- next part --------------


MPlayer CVS-020713-20:27-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices K6-2 (Family: 5, Stepping: 12)
CPUflags:  MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX 3DNow

Reading /home/dalias/.mplayer/codecs.conf: can't open '/home/dalias/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/share/mplayer/codecs.conf: 36 audio & 103 video codecs
CommandLine:get_path('font/font.desc') -> '/home/dalias/.mplayer/font/font.desc'
 'test.avi' '-v'
font: can't open file: /home/dalias/.mplayer/font/font.desc
Using MMX (with tiny bit 3DNow) Optimized OnScreenDisplay
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars)
Linux RTC init error: Device or resource busy
Using usleep() timing
get_path('input.conf') -> '/home/dalias/.mplayer/input.conf'
Can't open input config file /home/dalias/.mplayer/input.conf : No such file or directory
Can't open input config file /usr/local/share/mplayer/input.conf : No such file or directory
Falling back on default (hardcoded) input config

Playing test.avi
Not an URL!
File size is 6112492 bytes
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:360448  
Detected AVI file format!
list_end=0x13C
list_end=0xD4
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 2627   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  352 x 240
==> Found video stream: 0
found 'bih', 40 bytes of 40
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 239759/10000 = 23.976
Start: 0   Len: 2627
Suggested BufferSize: 18514
Quality 0
Sample size: 0
Regenerating keyframe table for DIVX 3 video
======= VIDEO Format ======
  biSize 40
  biWidth 352
  biHeight 240
  biPlanes 1
  biBitCount 24
  biCompression 861292868='DIV3'
  biSizeImage 253440
===========================
list_end=0x13C
==> Found audio stream: 1
found 'wf', 20 bytes of 20
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 8000/1 = 8000.000
Start: 0   Len: 884000
Suggested BufferSize: 4000
Quality 0
Sample size: 1
Broken chunk?  chunksize=1724  (id=JUNK)
======= WAVE Format =======
Format Tag: 65534 (0xFFFE)
Channels: 2
Samplerate: 44100
avg byte/sec: 8000
Block align: 1
bits/sample: 16
cbSize: 0
list_end=0x5C92E4
Found movie at 0x80C - 0x5C92E4
Reading INDEX block, 2848 chunks for 2627 frames
Broken chunk?  chunksize=0  (id=idx1)
Reading INDEX block, 2848 chunks for 2627 frames
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0xFAC)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=5158080
VIDEO:  [DIV3]  352x240  24bpp  23.98 fps  376.6 kbps (46.0 kbyte/s)
AVI OGG : Initial audio header is too small !!!!!
[V] filefmt:3  fourcc:0x33564944  size:352x240  fps:23.98  ftime:=0.0417
get_path('sub/') -> '/home/dalias/.mplayer/sub/'
Detected audio codec: [vorbis] afm:10 (OggVorbis Audio Decoder)
Initializing audio codec...
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
dec_audio: Allocating 4096 + 65536 = 69632 bytes for output buffer
OggVorbis: initial (identification) header broken!
ADecoder init failed :(
Couldn't initialize audio codec! -> nosound
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
libavcodec: CPU flags: mmx 3dnow
Detected video codec: [ffdivx] vfm:5 (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
Audio: no sound!!!
Freeing 0 unused audio chunks
Start playing...
VDec: vo config request - 352 x 240 (preferred csp: Planar YV12)  
vo_debug: query(Planar YV12) returned 0x437 (i=0) 
Movie-Aspect is undefined - no prescaling applied.
video_out->init(352x240->352x240,flags=0,'MPlayer',0x32315659)
VO: [mga] 352x240 => 352x240 Planar YV12 
VO: Description: Matrox G200/G400 overlay (/dev/mga_vid)
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
*** [vo] Allocating mp_image_t, 352x240x12bpp YUV planar, 126720 bytes
vo_mga aspect(): resized to 352x240
[mga] Using 3 buffers.
V:   0.0    1   0%  0%  0.0% 0 0 96%
*** [vo] Allocating mp_image_t, 352x240x12bpp YUV planar, 126720 bytes
V:   0.0    2   0%  0%  0.0% 0 0 94%
V:   0.1    3   0%  0%  0.0% 0 0 94%
V:   0.1    4   0%  0%  0.0% 0 0 94%
V:   0.2    5   0%  0%  0.0% 0 0 93%
V:   0.2    6   0%  0%  0.0% 0 0 93%
V:   0.3    7   0%  0%  0.0% 0 0 93%
V:   0.3    8   0%  0%  0.0% 0 0 93%
V:   0.3    9   0%  0%  0.0% 0 0 93%
V:   0.4   10   0%  0%  0.0% 0 0 93%
V:   0.4   11   0%  0%  0.0% 0 0 93%
V:   0.5   12   0%  0%  0.0% 0 0 93%
vo: x11 uninit called but X11 not inited..
vo: uninit!

Exiting... (Quit)


More information about the MPlayer-users mailing list