Monday, December 10, 2007

Convert Canon SD600 videos for the Apple TV

The Canon PowerShot SD600 captures video in the following format:

RIFF (little-endian) data, AVI, 640 x 480, 30.00 fps, video: Motion JPEG, audio: uncompressed PCM (mono, 11024 Hz)

Note the fps and resolution can be changed within the camera video settings.

Turns out the SD600 AVI files are not one of the Apple TV supported video formats. I've converted other AVI files to MPEG-4 for the ipod using ffmpeg so I decided to give that a whirl. Some of the files worked while others would display an error in itunes about still not being a supported video format. I read the Apple TV specs page again and noticed the bit about up to 3 Mbps. I guess depending on the video content, ffmpeg was outputting a bitrate higher than 3 Mbps for some videos. The following command is what finally worked for me. You can see the -b option to specify desired bitrate. The actual bitrate in the MPEG-4 files will vary.
ffmpeg -i input.avi -f mp4 -r 30 -b 2Mbps -vcodec mp4 -acodec libfaac ouput.mp4
I've tried this on windows and linux.