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

2

Recently I had the idea that it would be good to organize all of my movies and TV shows into one central application (kind of an inventory), and from the research I have conducted, I was able to conclude that iTunes would be the best software for what I would be using it for.

So far, it has somewhat served its purpose in that I can import some of my library, but not all of it due to file format issues and iTunes not supporting these formats (mostly MKV and AVI formats).

All of the research I have done about importing these files says to convert them, but because I wont be syncing them anywhere and converting as many files as i have would take too long that would be a very long and unnecessary process, so naturally I am leaning away from converting.

The only solution I can think of is possibly modifying iTunes – or getting a plugin FOR iTunes – that allows me to do this, so my question is: is there anything such as said plug in or modification that can allow me to do this?

If not, is there a software that allows me to organize and play these files in a simple fashion, again, without conversion?

Ben Franchuk

Posted 2013-04-25T03:08:08.103

Reputation: 1 584

Answers

8

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.

slhck

Posted 2013-04-25T03:08:08.103

Reputation: 182 472

+1 for a great answer. I'd also add that I've had better success using MP4Box for the remux than FFMPEG, but YMMV. In addition iTunes won't recognise (or lookup AFAIK) any metadata for imported files that have been remuxed (unless you use AtomicParsley) so something like Plesk / XMBC is probably a better answer anyway. – James – 2013-04-26T07:47:54.297

1Thanks. That's correct – I just didn't want to assume too much technical knowledge of the OP, since I find using ffmpeg a little more straightforward than MP4Box and AtomicParsley. But anyway, I guess it boils down to the fact that iTunes just isn't made for movie libraries that don't come from the iTunes store. – slhck – 2013-04-26T07:56:21.603

1

Maybe re-phrase to not made for movie libraries not purchased directly from the iTunes store, but agreed ;-) It's pretty disingenuous as a friend of mine is able to play .mkv's etc natively (not with DTS audio though) on his iPad using https://itunes.apple.com/az/app/avplayerhd/id407976815?mt=8 so it's not as though it couldn't support it

– James – 2013-04-26T08:00:05.417

2Thank you for the answer, judging by the information here I determined that Plex would be the best software for my use. for the record, though, I do have the technological knowledge to understand all of this. just saying. thanks again :) – Ben Franchuk – 2013-04-27T05:47:23.110

@ShadowFrunchak Haha, fair enough. Some people are scared away by terminals, so I always try not to go in there too much. Of course, if you like playing around with FFmpeg or MP4Box, give it a shot :) – slhck – 2013-04-27T08:21:06.557