1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Manually encoded h.264 videos work on iPod nano 3g/4g but not on older iPod video 5g

Discussion in 'iPod discussion' started by fmillion1, Sep 23, 2008.

  1. fmillion1

    fmillion1 Member

    Joined:
    Sep 23, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    I am a command line junkie and I use batch files and manually edited commands to create my iPod videos. ;-) The videos I've converted for iPod work fine on my new iPod nano (the one that just was released, 4th gen), but will not sync to my older 5G 60gb iPod video.

    Here's what I do:

    1. Encode the source video to h264 format using this command line:

    mencoder -ovc x264 -oac pcm -vf scale=320:240,dsize=320:240,harddup
    -x264encopts bitrate=512:vbv_maxrate=512:vbv_bufsize=2000:nocabac:threads=2:global_header:level_idc=30:me=umh -of lavf -lavfopts format=mp4 -o tmp.mp4 <in_file>

    2. Extract the PCM stream from the created file:

    mplayer -vo null -vc dummy -ao pcm:fast tmp.mp4

    3. Manually maximize the volume of the resulting PCM stream in a dedicated audio editing package. (Why not use volnorm? Because for the first five or so seconds, the volume is not normalized, then suddenly jumps to normalized levels - just annoying to me.)

    4. Re-mux the previously encoded h264 video with the newly edited pcm stream, converting it to AAC:

    ffmpeg -i tmp.mp4 -i audiodump.wav -ab 160000 -ac 2 -acodec libfaac -ar 48000 <out_file>.mp4 -map 0.0:0.0 -map 1.0:0.1

    5. Add the out file to iTunes and sync.

    If the audio for the source file is already normalized and doesn't need modification, I eliminate the extra steps and use this command line with mencoder to produce a finished video right away:

    mencoder -ovc x264 -oac faac -vf scale=320:240,dsize=320:240,harddup -x264encopts bitrate=448:vbv_maxrate=448:vbv_bufsize=2000:nocabac:threads=2:global_header:level_idc=30:me=umh -faacopts mpeg=4:eek:bject=2:br=128:raw -of lavf -lavfopts format=mp4 -o <out_file> <in_file>

    Ok on my newest iPod, videos made this way sync and play perfectly fine. but on my old 60gb ipod, they won't sync, with the dreaded "cannot be played on this iPod" error.

    Also, I tried these videos on a 4gb Nano 3rd generation and an iPod classic - both synced and played fine. It is only my old 5g 60gb iPod that won't take them.

    What is wrong with my encoding method and/or parameters that is preventing this from working on my older iPod, but allowing it to work on my new one? My bitrate is 512kbps for video, 160kbps for audio, and I resize all videos to 320x240 - both within the constraints of Apple's specification.

    Any help is appreciated.

    Thanks
    F
     
  2. fmillion1

    fmillion1 Member

    Joined:
    Sep 23, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    I forgot that my ffmpeg command line includes -vcodec copy.
    And my second mplayer command line is outdated - assume bitrate=160 for faacopts and max and vbr bitrates for x264 are 512.
     
  3. irongiant

    irongiant Regular member

    Joined:
    Aug 5, 2004
    Messages:
    522
    Likes Received:
    0
    Trophy Points:
    26
    ok i use a program that has a GUI lol and it works good for me, anyhow, yea Videos encoded to work on the lates ipods won't work on the older 5 gen ipod's, don't ask me why lol but i find out the same way, when i encoded a movie put it on my new 6 gen ipod classic, but it wont work on my son's 5 gen, how ever files encoded to play on the older ipod will play fine on the newest model. I use videora. maybe you should encode a video with videora and see whats different from the 5 gen encoding to the new one.
     
  4. fmillion1

    fmillion1 Member

    Joined:
    Sep 23, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    One difference I definitely know is that when I used to encode videos for my old 5g iPod, I used the mpeg4 codec, not h.264. Mencoder, however, complains (Even the latest SVN builds!) that its lavf muxer is broken and produces incorrect MPEG files - and this is evienced by strange behavior on my iPod playing the converted files. I used Handbrake on my Mac to convert DVD's for a while, and I also used ffmpeg on my PC to create mpeg4 videos and it seemed to work, but ffmpeg just doesn't offer the flexibility (video/audio filters and the like) that mencoder does.

    Also, since the specs for the 5g ipod specifically state "h.264 up to 768kbps" I didn't see this as being a problem. I don't get why my videos won't even sync - I have a weird feeling if they synced the ipod would play them, but iTunes is blocking them for some unknown reason. (Gotta love Apple's very useless error messages.)

    More advice?

    F
     
  5. bugnot

    bugnot Member

    Joined:
    Aug 7, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    Kind of late, but you might want to try nicmp4box: http://nic.dnsalias.com/NicMP4Box.zip

    It adds some kind of required uuid atom or something to the mp4 which iTunes needs before it will accept it.
     

Share This Page