Hi all, I've got a new iPod and I would like to upload videos, but I dunno how to encode it in the right way (by the way, I haven't apple computers/microsoft OS, so I cannot use iTunes). So, thanks a lot in advance for your time/clues. From the specs I read I have to choose to encode between: -> H.264 video: up to 768 Kbps, 320 x 240, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats -> MPEG-4 video: up to 2.5 mbps, 480 x 480, 30 frames per sec., Simple Profile with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats Yesterday and today I've googled a lot, but I found only a lot of front ends (of mplayer/mencode) for OSX, not the simple command line of mencoder (well, I also found a lot of things l do not care, such encoding in raw, and so on). At the end you can find the output of a file I can play on iPod. Thanks a lot for your attention, andrea ----------------------------------------------------------------------------------------------------------------- (snip) ISO: Unknown File Type Major Brand: M4V Quicktime/MOV file format detected. -------------- MOV track #0: 145 chunks, 1304 samples Audio bits: 16 chans: 2 rate: 44100 MOV: Found MPEG4 audio Elementary Stream Descriptor atom (51)! Fourcc: mp4a -------------- MOV track #1: 121 chunks, 907 samples MOV: AVC decoder configuration record atom (45)! Image size: 320 x 240 (24 bpp) Display size: 320 x 240 Fourcc: avc1 Codec: '' -------------- MOV: longest streams: A: #0 (1304 samples) V: #1 (907 samples) VIDEO: [avc1] 320x240 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s) ========================================================================== Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding) AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400) Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder) ========================================================================== ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??... alsa-init: 1 soundcard found, using: default alsa: 44100 Hz/2 channels/4 bpf/30104 bytes buffer/Signed 16 bit Little Endian AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample) Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le... Starting playback... VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is undefined - no prescaling applied. VO: [xv] 320x240 => 320x240 Planar YV12
Hi, On 11/10/05, Andrea Gelmini <dislessico@gmail.com> wrote:
Hi all, I've got a new iPod and I would like to upload videos, but I dunno how to encode it in the right way (by the way, I haven't apple computers/microsoft OS, so I cannot use iTunes). So, thanks a lot in advance for your time/clues.
Please do yourself a favour and read the encoding guide in order to get yourself started on using mencoder and getting decent results.
From the specs I read I have to choose to encode between:
-> H.264 video: up to 768 Kbps, 320 x 240, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats
-> MPEG-4 video: up to 2.5 mbps, 480 x 480, 30 frames per sec., Simple Profile with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats
Yesterday and today I've googled a lot, but I found only a lot of front ends (of mplayer/mencode) for OSX, not the simple command line of mencoder (well, I also found a lot of things l do not care, such encoding in raw, and so on).
At the end you can find the output of a file I can play on iPod.
A simple encoding line would be something such as : mencoder input.divx -ovc x264 -x264encopts psnr:bitrate=$video_bitrate -o \ output.h264 -oac faac -vf scale=$Width:$Height,harddup -faacopts br=$audio_bitrate to for example convert your old divx to H.264 files. Note that you'll have to replace input.divx, output.h264, $video_bitrate, $audio_bitrate, $Width and $Height by the appropriate value. In order to compute the video bitrate edequatly, you can use the following formula: $bpp * $width * $height * $fps $videobitrate = -------------------------------- 1000 I found that $bpp = 0.13 (best quality) to 0.09 (decent but not too good) were mostly okay for dvd size encodes. I hope the resulting file will work fine on your IPOD. You may have to do further black magic in order to remux the file to the mp4 container, in which case, mp4box is your friend. If you need further details, you can send me an IPOD, that would allow me to write a nice official howto about it :-P. Guillaume -- Reading doesn't hurt, really! -- Dominik 'Rathann' Mierzejewski
participants (2)
-
Andrea Gelmini -
Guillaume POIRIER