[MEncoder-users] Cannot encode MP4/MOV/FLV with global headers!?

James Hastings-Trew jimht at shaw.ca
Fri Jul 2 14:22:39 CEST 2010


  On 10-07-01 10:34 AM, Dominic Bird wrote:
> I've been trying this over and over again but whatever I do I cannot get
> mencoder to encode global headers into either video or audio streams.
> Any ideas? Here is the command im using...
>
> mencoder E:\Sequence1.mxf -o E:\Sequence1.flv -vf scale=640:-2 -af
> channels=2,resample=44100 -mc 0 -ovc lavc -oac lavc -lavcopts
> aglobal=3:vglobal=3:vcodec=flv:vbitrate=512:acodec=libmp3lame:abitrate=9
> 6 -of lavf
>
> Whatever I do I always receive these warnings:
>
> Writing header...
>
> [flv @ 01ff9010]Codec for stream 0 does not use global headers but
> container for
>
> mat requires global headers
>
> [flv @ 01ff9010]Codec for stream 1 does not use global headers but
> container for
>
> mat requires global headers
>
> I've tried all 4 options for aheader/vheader, encoding using faac, x264,
> wrapping using mp4, mov... nothing seems to make a difference! The only
> reason I am using flv in this example is because it actually plays back
> in flash anyway. I can play back the mov or mp4 files created (x264/aac)
> using VLC or MPlayer but not Quicktime. The idea is to end up with x264
> files suitable for Quicktime or an iPod.
> Any help appreciated!
>
> Btw it needs to be a one pass process ie no rewrapping using mp4box or
> something.

Mencoder cannot directly make files suitable for ipod. No matter what 
video and audio codecs you use (and I am pretty sure you are using the 
wrong ones here, but I could be mistaken), mencoder cannot add the "ipod 
atom" to the resulting file. For that, you will need mp4box.

A "one pass process" for ipod would be to use something else - like 
ffmpeg or handbrake.

Also, this question has been asked and answered in here several times 
over the years. Have a look in the archives at 
http://news.gmane.org/gmane.comp.video.mencoder.user , for the term 
"ipod" as a start. Have a look at this result: 
http://article.gmane.org/gmane.comp.video.mencoder.user/7492/match=ipod 
. It might be a titch out of date, as some of the encoding defaults have 
changed since then. For example, it might be necessary to declare 
bframes=0 now, as the default has changed from 0.




More information about the MEncoder-users mailing list