FFmpeg is a wrapper program for a lot of video and audio libraries. It allows the user to easily encode, transcode, whatever you want to call it, video to other formats.
It runs on many main-stream platforms: BSD, Linux, Windows etc. Source and binaries are available.
Populair formats to get your video’s in are: MKV (720p and 1080p, h264 encoded), and XVID avi for your regular TV-shows. To make these formats play in: Apple’s iTunes, iPod, PS3 etc. you need to encode ‘em. Before you start encoding make sure what format your device is compatible with that time of MP4.
Video format specs devices
- Playstation 3 (Video: mp4 h264 1080p Audio: aac audio)
- Quicktime (Video: mp4 h264 1080p (a lot more actually, but that’s another topic))
- iTunes (Quicktime compatible)
- iPod (Video: mp4 h264 640×480 Audio: aac 160Kbps 48kHz )
MP4 drawbacks
It only supports 2 channel audio, and not the 5.1 enclosed in most MKV files. MP4 files are larger than MKV’s about 30% more space is used. Your typical 720p TV-show (40mins) occupies about 1.1GB. The MP4 about 1.5GBs.
Re-encoding Ipod resolution
iPod’s screen resolution is limited to 640×480 and cannot cope with anything higher. iTunes doesn’t let you sync the videofile. Re-encoding is required. Fortunately iTunes can re-encoding mp4’s by itself. Final size is about 500MBs for the encoded file.
My mp4 reasons
I’ve chosen the: MP4 1080p h264 audio libfaac 48kHz 2-channel encoding because it’s mostly compatible with the list displayed above. I’m planning on buying an PS3 in the near future, have an iPod and am running OSx. Your choice can be very different from mine. MP4 has a lot of limitations compared to Matroska, and Xvid but cannot run on my devices.
Running FFmpeg encoding
MKV -> MP4 (also full hd capable)
ffmpeg -i <INPUT>.mkv -threads 0 -sameq -acodec libfaac -ac 2 -ab 448k -ar 48000 <OUTPUT>.mp4
XVID-> MP4
ffmpeg -threads 0 -i <INPUT>.avi -f mp4 -vcodec xvid -maxrate 2000k -b 2000k -qmin 3 -qmax 5 -bufsize 4096k -g 300 -acodec aac -ac 2 -ab 128k -ar 48000 <OUTPUT>.mp4
