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

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


On 15 mar 2010, at 15.34, Christian Ebert wrote:

> * Jörgen Isaksson on Monday, March 15, 2010 at 15:16:33 +0100
>> On 15 mar 2010, at 12.46, Grozdan wrote:
>>> 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???
> 
> You're still using the lavf muxer (-of lavf) which is broken. As
> Grozdan stated, you have to go the avi route.
> 
>> 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
> 
> mencoder -of avi -o output.avi ...
> 
> And then the MP4Box commands Grozdan gave you.

I'm really sorry... but using the Grozdan method still doesn't work for me. I'm not using -of lavf anymore. Encoding to an avi container like this.

mencoder input.mov -of avi -o output.avi -vf scale=480:-10,harddup -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

MP4Box -aviraw video output.avi
MP4Box -aviraw audio output.avi

renaming output_audio.raw to output_audio.aac as Grozdan mentioned and muxing.

MP4Box -fps 25 -add output_video.h264 -add output_audio.aac -ipod -mpeg4 -new output.mp4

AVC-H264 import - frame size 480 x 272 at 25.000 FPSImport results: 272 samples - Slices: 10 I 262 P 0 B - 0 SEI - 6 IDR
AAC import - sample rate 44100 - MPEG-4 audio - 2 channels
Setting up iTunes/iPod file...                       
Forcing AVC/H264 SAR to 1:1...
Saving output.mp4: 0.500 secs Interleaving

I end up with a file with an empty video and audio track???

Do you have a workflow for this that actually works? It feels like I'm so close...

best regards / Jorgen





More information about the MEncoder-users mailing list