Stephen Oberholtzer
Thu, 05 Oct 2006 06:34:36 -0700
On 10/5/06, Dennis Neumeier <[EMAIL PROTECTED]> wrote:
> google knows > > http://www.google.com/search?q=transcode+ffmpeg+ipod+video+format Thanks, this helped a little bit. Now, what about converting existing videos. As I am quite new to this, I decided to build up my own knowledge about this. Therefor, I started from scratch to get a working transcode command. I am now using: $ transcode -i test.mpg -F mpeg4 -y ffmpeg -o test.mp4 I get a working output file (controlled with kaffeine). I wanted to put it with gtkpod-aac onto my ipod, but gtkpod says that the file is not a valid mpeg4 one. Is there something wrong with my command or does gtkpod have a bug? Greets, Dennis
It took me about a week to figure all of this out: 1. There are two MPEG-4s. One is the MPEG-4 video compression algorithm/format. I don't know about ffmpeg, but xvid does fine here (you need to write a config file that disables certain advanced MPEG-4 features). I have done many successful test transcodings using xvid. The other MPEG-4 is the MPEG-4 container format, which is a format for interleaving audio and video streams for streaming over the 'net. Transcode does *not* make MPEG-4 container files, it makes AVI files (a much more common container format). 2. The iPod plays MP3s, but it will not play video files whose audio stream is encoded in MP3 format. It will *only* play video files with AAC-encoded audio. This part took me the longest to figure out. What I ended up doing was this: 1. Run transcode specifying xvid for the video codec and 'wav' for the audio codec. This made an AVI containing the video stream and a dummy audio stream, and a WAV containing the uncompressed audio portion of the stream. 1.1. (Optional) Run normalize [http://normalize.nongnu.org/] on the WAV file (very helpful for really quiet sources) 2. Run faac [http://www.audiocoding.com/] on the WAV file to produce an M4A file (make sure you use the m4a extension, or specify -w, so faac knows that the file is going into an mp4 file) 3. Use gpac (aka MP4Box) [http://gpac.sourceforge.net/] to combine the video stream from the AVI file produced in step 1 with the M4A file produced in step 2. Make sure you explicitly request only the video stream, I had a file that things tried to play but failed miserably at when I just specified the .avi file: # Good MP4Box transcoded.mp4 -add transcoded.avi#video -add transcoded.m4a # Bad MP4Box transcoded.mp4 -add transcoded.avi -add transcoded.m4a I hope this helps you. -- -- Stevie-O Real programmers use COPY CON PROGRAM.EXE