[MEncoder-users] Recoding RM files for iPod

Fredrik Eriksson feffese at yahoo.se
Tue Jan 1 23:21:36 CET 2008


Ulf Magnusson wrote:
>
> Actually, I managed to get it to work without using that hack, and
> with 640x480 encoding, using the following:
>
> # Dump sound
> mplayer -channels 2 -novideo -hardframedrop -ao pcm:file=$1.sound.wav $1
> # Convert sound
> faac --mpeg-vers 4 --obj-type LC -o $1.sound.aac $1.sound.wav
> # Convert video
> ~/svnmp/bin/mencoder $1 -o $1.video.264 \
> -channels 2                             \
> -of rawvideo                            \
> -nosound                                \
> -ovc x264 -x264encopts qp=20:keyint=60:nocabac:level_idc=30 \
> -vf scale=640:480,dsize=640:480,harddup
>
> # Combine into MP4 container
> /usr/local/bin/MP4Box -add $1.video.264 -add $1.sound.aac $2 -brand
> isom:1 -fps 15.000  # it's a RM, 15 fps is correct
>
> That produces a file that iTunes will copy to the iPod, and that plays
> great, except for one thing. I recoded the file from
> http://ocw.mit.edu/ans7870/6/6.046j/f05/lecturenotes/ocw-6.046-07sep2005-220k.rm
> . When playing back the result on the iPod, the video freezes around
> 14:22 (when he says "does not affect your grade") but the sound keeps
> playing. It you attempt to seek past that point, you are taken back to
> 14:22. This only happens on the iPod, and not in QuickTime. Any ideas
> what could be wrong, and how you could fix it?
>
> /Ulf
I think apple hates me... I still can't get 640:480 h264 files to sync 
to the ipod... I've tried just about every command line posted in this 
mailing list, the latest is like this:

#pass 1 (save audio encoding)
mencoder -channels 2 -sws 9 -of rawaudio -oac faac -ovc x264 -x264encopts  \
bitrate=1000:vbv_maxrate=1500:vbv_bufsize=2000:nocabac:me=umh:trellis=1:level_idc=30:threads=5:turbo=1:pass=1 
\
-faacopts mpeg=4:br=160:mpeg=4:object=2 -vf scale=640:-10,harddup \
$IF -endpos 01:00 -o $IF.aac

#pass 2 (save video encoding)
mencoder -channels 2 -sws 9 -of rawvideo -oac faac -ovc x264 -x264encopts  \
bitrate=1000:vbv_maxrate=1500:vbv_bufsize=2000:nocabac:me=umh:trellis=1:level_idc=30:threads=5:pass=3 
\
-faacopts mpeg=4:br=160:mpeg=4:object=2 -vf scale=640:-10,harddup \
$IF -endpos 01:00 -o $IF.264

# mux
MP4Box -brand isom:1 -fps 23.976 -add $IF.264 -add $IF.aac encode.mp4

it plays just fine in quicktime/iTunes (and on the ipod if transferd 
with gtkpod), but iTunes refuses to transfer it, so it's probably the 
mp4 muxing that is wrong somewhere. I tried with the magic -ipod switch 
to mp4box as well, but with no luck. Just using the lavf muxer doesn't 
work either (though it does when using mpeg4 video or low resolution 
h264). perhaps nicmp4box works better, but it's distributed as a windows 
binary, and I don't have windows :/

Anyone knows how to cure my stupidness, or at least can help me to get 
iTunes accept these videos?

Regards
--
Fredrik Eriksson



More information about the MEncoder-users mailing list