[MPlayer-DOCS] Re: Draft: iPod encoding guide

Mark Pilgrim pilgrim at gmail.com
Wed Jan 17 21:24:26 CET 2007


On 1/12/07, Guillaume POIRIER <poirierg at gmail.com> wrote:
> The specs I found here (http://www.apple.com/ipod/specs.html) do not
> seem to corroborate your findings:
>
> Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480
> pixels, 30 frames per sec., Low-Complexity version of the H.264
> Baseline Profile with AAC-LC audio up to 160 Kbps, 48 kHz, stereo
> audio in .m4v, .mp4, and .mov file formats

OK, I did some digging and here's the deal with 640x480 video: yes,
it's supported by the latest 1.2 firmware (even on the older 5G
models, as long as they're running the latest 1.2 firmware).  You need
to specify idc_level=30 instead of 13, and -vf scale=640:-10 instead
of 320:-10.

References:
http://forum.doom9.org/showpost.php?p=880331&postcount=74
http://forum.doom9.org/showpost.php?p=879940&postcount=65

BUT (and this is a big but), iTunes 7 will not copy any MP4 video
larger than 320x240 to the iPod unless the MP4 file contains a special
"secret" UUID in a specific atom.

References:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-September/045391.html

I have independently verified this claim with my own encodes.

Tyler apparently hacked libavformat to produce iPod-compatible output
when using the mp4 container.  "Nic" on the doom9 forums hacked MP4Box
to achieve the same result.  Tyler has integrated his hack into his
VisualHub product (Mac-only).  "Nic" has released his hacked version
of MP4Box as a standalone tool (Windows-only binary, but he published
the source code too and marked his changes well).  I believe Tyler's
hack is also integrated into ffmpegX (Mac-only).

References:
http://forum.doom9.org/showpost.php?p=880122&postcount=66

Neither code hack is particularly good quality (each author admits
this) and neither of them have made it upstream.  This means that,
while you *can* use non-Apple tools to create 640x480 video that plays
on (or through) the iPod, you can't subsequently use Apple tools (i.e.
iTunes) to sync such videos to your iPod, unless you use a hacked
version of either libavformat or MP4Box to create an
"iTunes-compatible" .mp4 file.

I'm happy to document some or all of this (there doesn't appear to be
a good summary of it anywhere, except perhaps this message itself when
it hits the web archives), or I'm happy to leave the documentation
as-is and say that it is focused on creating small videos optimized
for viewing-on-iPod (as opposed to larger videos optimized for
viewing-on-TV-through-iPod-dock-connector).

> What about 25fps videos? Are they supported too?

Yes.

> Although I don't like the fact that this looks very much alike "QT
> encoding guide", I guess it will probably help the user getting
> started if things are recapped here too.
> _maybe_ it could be worthwhile to add to x264's encoding section a
> note about the different h264 levels/profile.
> How do you feel about this?

I've lost track of the x264 refactoring you've done in the past week,
but I think a mention of H.264 profiles would be worthwhile.  Or just
a link to http://en.wikipedia.org/wiki/H.264#Profiles

Two other unrelated things (these will serve as public reminders to myself):
- add an example of "mp4creator -list" output showing iPod-compatible
dump of the muxed video
- mention that the iPod has no support for multiple audio tracks (so
don't bother) or 3GPP timed text captions (so don't bother)

-- 
Cheers,
-Mark



More information about the MPlayer-DOCS mailing list