[MPlayer-users] mencoder parameters for iPod

Andrew Daviel advax at triumf.ca
Sun Feb 7 20:28:57 CET 2010


Thanks guys for the suggestions.

In between my last post and checking my mail, I had another go with 
ffmpeg. I recompiled it with libxvid, libx264, libfaac (having built 
same; seemed to require a non-default "enable shared" param for one - 
I've got a bit lost what I did), and ffmpeg then worked. Or, it seems, I 
could just have got it with Yum from the DAG repository (Fedora Core 9).
http://ffmpeg.org/faq.html#SEC23
$ ffmpeg -i foobar.avi -acodec libfaac -vcodec mpeg4 foobar.mp4

Enough for the competition .. I tried Tom Evans' mencoder parameters and 
got "FATAL: Cannot initialize video driver"
So I recompiled mencoder again (after I had installed faac-1.28, 
faad2-2.7, x264-snapshot-20100203 to get ffmpeg working) (make distclean; 
configure; make)
- I had to comment out references to b_bframe_pyramid in libx264.c, 
libmpcodecs/ve_x264.c to get it to compile


Now that recipe works, viz.
$MENCODER $1 -ofps 25 -of lavf -lavfopts format=mp4 -af lavcresample=44100 -vf-add harddup \
   -vf-add scale=320:240 -oac lavc -ovc lavc -lavcopts \
  aglobal=1:vglobal=1:acodec=libfaac:abitrate=128:vcodec=mpeg4:vbitrate=384:keyint=25 \
   -o $out

but the one I modified from Rolf Ernst
  $MENCODER $1 -mc 0 -of lavf -lavfopts format=ipod -af volnorm \
  -vf scale=320:-2,expand=:240:::,crop=376:240,harddup -srate 44100 -ofps 25 -oac faac \
     -faacopts br=160:mpeg=4:object=2 -ovc x264 -ffourcc H264 -x264encopts \
  bitrate=512:level_idc=13:nocabac:no8x8dct:ref=2:me=umh:bframes=0:subq=6:trellis=0 \
  -o $out
now gives a segfault.

Note that the iPod nano 5g has a screen size of 240x376, so I should 
probably tune some sizing parameters.

Most everything plays in mplayer on my N810 tablet, including the 
original AVIs. The N810 has I think a slower CPU than the iPod and drops 
some frames on the MP4 created with the last (Rolf's) recipe.
The Nokia mediaplayer won't play that one either, but plays the MP4's 
from Tom's recipe or from ffmpeg.

So I have 2 working recipes to encode for the iPod nano, which is 
probably as far as I'll go unless I get one for myself to replace my 
vanished MPIO player, and want to bang my head against libgpod again or 
wait for mature Linux support.

(I had earlier ripped a DVD for my N810, mostly to see if it could be 
done, and I recoded it for the iPod. Having in the past used 5Mb disks 
the size of a dinner plate, 10" magtape, etc., I still think it's amazing 
to fit 5 full-length movies on a player the size of the nano :-)
Next I guess it will be full stereoscopic HD in a pair of glasses with 
variable transparency.)

-- 
Andrew Daviel, TRIUMF, Canada


More information about the MPlayer-users mailing list