[MEncoder-users] Encoded file doesn't sync with iPhone

Jörgen Isaksson jogga at me.com
Mon Mar 15 15:16:33 CET 2010


On 15 mar 2010, at 12.46, Grozdan wrote:

> 2010/3/15 Jörgen Isaksson <jogga at me.com>
> 
>> 
>> On 6 mar 2010, at 13.41, Grozdan wrote:
>> 
>>> 2010/3/6 Jörgen Isaksson <jogga at me.com>
>>> 
>>>> Hi all mencoder wizards,
>>>> 
>>>> This is my first post on the list, so please be gentle with me.
>>>> 
>>>> I have downloaded and compiled mencoder and x264 successfully on my mac
>>>> with 10.6.
>>>> 
>>>> After some long research hours on the net I found some mencoder settings
>>>> that the authors claimed to work with the iPhone. This is the
>> commandline I
>>>> used.
>>>> 
>>>> mencoder input.mov -o output.m4v -vf dsize=480:320:2,scale=-8:-8,harddup
>>>> -of lavf -lavfopts format=ipod -alang en -sws 2 -oac faac -faacopts
>>>> br=128:mpeg=4:object=2:raw -srate 44100 -ovc x264 -x264encopts
>>>> 
>> bitrate=800:nocabac:level_idc=30:bframes=0:global_header:threads=2:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh
>>>> 
>>>> The file encodes without problem and plays just fine on the desktop and
>> in
>>>> iTunes, but it doesn't sync with the iPhone?t
>>>> 
>>>> Have I done something wrong here? My understanding was that the
>>>> "format=ipod" would add the needed atom for the movie to sync with the
>>>> iPhone.
>>>> 
>>> 
>>> Use MP4Box (from gpac) for muxing. Lavf in mencoder is broken
>> 
>> I still can't get the mencoder encoded files to sync with my iPhone.
>> Encoding works just great, but the file wont sync.
>> 
>> Can you give me an example on how to use MP4Box for muxing. I'm not sure
>> how to continue.
>> 
> 
> Encode as usual to an AVI with mencoder (make sure you add -vf harddup to
> your video filters chain)
> 
> After done, use MP4Box to dump the video and audio, then mux it together
> 
> MP4Box -aviraw video file.avi
> MP4Box -aviraw audio file.avi
> 
> if your audio is AAC, you have to rename the dumped MP4Box audio file to
> have the .aac extension or else, MP4Box won't accept files with the .raw
> extension. Then, mux it together like this
> 
> MP4Box -fps <fps-of-video> -add video.h264 -add audio.aac -ipod -mpeg4 -new
> output.mp4

I'm sorry, but I still can't get it to work??? It just doesn't sync with the iPhone.

This is what I tried. First I encode the video to mp4 like this. The avi suggestion didn't work.

mencoder movie.mov -o output.mp4 -vf scale=480:-10,harddup -lavfopts format=mp4 -faacopts mpeg=4:object=2:raw:br=128 -oac faac -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh:bitrate=500 -of lavf

Then using mp4box to extract those tracks.

MP4Box -raw 1 output.mp4
MP4Box -raw 2 output.mp4

and mux back with mp4box

MP4Box -new remuxed.mp4 -add output_track1.h264 -add output_track2.aac -fps 25.0 -ipod -mpeg4

Still not working. I even added the ipod flag, but no success. Any idea? Does this work for anyone?

Looking forward to a solution before I start to tear my hair.

best regards / Jorgen


More information about the MEncoder-users mailing list