Import MKV, AVI, etc. video files to iTunes 11 without conversion

Solution 1:

iTunes can only play the following:

QuickTime and MPEG-4 movie files that end in ".mov", ".m4v", or ".mp4" and are playable in QuickTime Player.

There are no plugins or extensions for iTunes. It relies on the QuickTime framework for decoding video, and out of the box OS X does not support the MKV container at all. AVI containers might play, but this rather depends on the codecs inside. You cannot modify iTunes either.

At that point, if you're already confused, I'd encourage you to read this question: What is a Codec (e.g. DivX?), and how does it differ from a File Format (e.g. MPG)?

With FFmpeg you can try remuxing the video and audio content to an MP4 container, however but this only works when the video and audio is one of the following:

  • MPEG-2, MPEG-4 ASP, MPEG-4 AVC (H.264), and a few others
  • AAC, MP3, AC-3, Apple Lossless

In that case you'd simply run the following from a Terminal:

ffmpeg -i input.avi -c copy -map 0 output.mp4

You can run this for every file in a folder like so:

for f in *.avi; do ffmpeg -i "$f" -c copy -map 0 "${f%.avi}.mp4"; done

This file—at least when the codecs are supported in MP4—should play in iTunes, and you're actually not re-encoding anything. This process should take a few seconds only and will not degrade the quality of your files either.

If that's too complicated or too much work, you might want to stay away from iTunes. The VLC Player for example supports almost any file format and video/audio codec there is. Its media library capabilities are a little limited though.

Another alternative would be XBMC, a complete media center solution:

Or Plex, which does just the same:

Those should be able to import almost any file, since they rely upon the FFmpeg container and codec libraries.