[MEncoder-users] lavf/mp4 buggy?

vdmsss vdm_sss at yahoo.co.uk
Mon Aug 13 16:14:32 CEST 2007


Hello,

	I have been trying to use the new lavf format=mp4, with B-frames  
support, and it looks as though the muxer does something wrong with  
the audio track. Let's use the command below for reference (entire  
output at the bottom of this message -- the key is clearly a warning  
about MS style audio tag, but I don't know what it means).

> mencoder -of lavf -lavfopts format=mp4 -ovc lavc -oac lavc - 
> lavcopts vcodec=mpeg4:acodec=vorbis -o test.mp4 test.avi -frames 1000

(1) Firstly, the resulting file has no audio when played with  
mplayer. It complains about missing the audio codec (entire output at  
the bottom of the message)

> Cannot find codec for audio format 0x6F56736D.
> Read DOCS/HTML/en/codecs.html!
> Audio: no sound

The same happens (mutatis mutandis) whatever lavc audio codec I use  
for the encoding. If I instead use another audio codec, eg -oac  
mp3lame or -oac faac, the the warning disappears and the audio  
playback is just fine.

(2) In both cases above the resulting file can only be played in  
mplayer and VLC (eg Quicktime/Perian complains as "The movie contains  
some invalid data")

(3) Finally, in both cases above the resulting file crashes MP4Box  
(and everything else I tried) when you try to inspect the audio  
track). Eg:


> $MP4Box -info test.mp4

> * Movie Info *
>         Timescale 1000 - Duration 00:00:41.728
>         Fragmented File no - 2 track(s)
>         File Brand isom - version 512
>         Created: GMT Fri Jan  2 00:00:00 1970
>
> File has no MPEG4 IOD/OD
>
> Track # 1 Info - TrackID 1 - TimeScale 24000 - Duration 00:00:41.708
> Media Info: Language "Undetermined" - Type "vide:mp4v" - 1000 samples
> MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x20
> Bus error
>

Can anybody explain? Thanks.


encoding command output

> mencoder -of lavf -lavfopts format=mp4 -ovc lavc -oac lavc - 
> lavcopts vcodec=mpeg4:acodec=vorbis -o test.mp4 mencoded.mpg - 
> frames 1000
> MEncoder dev-SVN-r24007-4.0.1 (C) 2000-2007 MPlayer Team
> AltiVec found
> CPU: PowerPC
> 113 audio & 236 video codecs
> success: format: 0  data: 0x0 - 0x49ae1000
> MPEG-PS file format detected.
> VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  9800.0 kbps (1225.0  
> kbyte/s)
> [V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00   
> ftime:=0.0400
> ====================================================================== 
> ====
> Opening audio decoder: [liba52] AC3 decoding with liba52
> Using AltiVec optimized IMDCT transform
> Checking for AltiVec resampler : 0x00000002, 2
> Using AltiVec optimized resampler
> AUDIO: 48000 Hz, 2 ch, s16be, 192.0 kbit/12.50% (ratio: 24000->192000)
> Selected audio codec: [a52] afm: liba52 (AC3-liba52)
> ====================================================================== 
> ====
> ** MUXER_LAVF  
> *****************************************************************
> REMEMBER: MEncoder's libavformat muxing is presently broken and can  
> generate
> INCORRECT files in the presence of B frames. Moreover, due to bugs  
> MPlayer
> will play these INCORRECT files as if nothing were wrong!
> ********************************************************************** 
> *********
> OK, exit
> Opening video filter: [expand osd=1]
> Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
> ====================================================================== 
> ====
> Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
> VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> The selected video_out device is incompatible with this codec.
> Try appending the scale filter to your filter list,
> e.g. -vf spp,scale instead of -vf spp.
> VDecoder init failed :(
> Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2- 
> v0.4.0b
> Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
> ====================================================================== 
> ====
> VDec: vo config request - 720 x 576 (preferred colorspace: Planar  
> YV12)
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> videocodec: libavcodec (720x576 fourcc=34504d46 [4PMF])
> Pos:   0.0s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
> 1 duplicate frame(s)!
> VIDEO CODEC ID: 13
> AUDIO CODEC ID: 15006, TAG: 0
> Writing header...
> [mp4 @ 0x6348ec]Warning, using MS style audio codec tag, the file  
> may be unplayable!
> Pos:   0.0s      2f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.004 [0:0]
> 1 duplicate frame(s)!
> Pos:  40.1s   1002f ( 0%) 53.26fps Trem:  33min 438mb  A-V:0.073  
> [774:70]]]
> Flushing video frames.
> Writing index...
>
> Video stream:  774.951 kbit/s  (96868 B/s)  size: 3882506 bytes   
> 40.080 secs  1002 frames
>
> Audio stream:   70.601 kbit/s  (8825 B/s)  size: 353383 bytes   
> 40.043 secs

mplayer playback output

> MPlayer dev-SVN-r24007-4.0.1 (C) 2000-2007 MPlayer Team
> AltiVec found
> CPU: PowerPC
> 113 audio & 236 video codecs
> Menu inited: /Users/vs/.mplayer/menu.conf
>
> Playing test.mp4.
> Cache fill:  0.00% (0 bytes)
> Quicktime/MOV file format detected.
> [mov] Video stream found, -vid 0
> [mov] Audio stream found, -aid 1
> VIDEO:  [mp4v]  684x366  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
> [ass] auto-open
> [ass] Init
> [ass] Updating font cache.
> [ass] FcDirSave failed.
> ====================================================================== 
> ====
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
> ====================================================================== 
> ====
> ====================================================================== 
> ====
> Cannot find codec for audio format 0x6F56736D.
> Read DOCS/HTML/en/codecs.html!
> Audio: no sound
> Starting playback...





More information about the MEncoder-users mailing list