In the previous couple of posts, I described some short techniques to accomplishing a simple media server using your legally purchased Blu-Ray and DVD movies. If you are anything like me, you will most likely start getting confused when you look at MakeMKV and Handbrakes more advanced features such as which video/audio codecs to use. You may even run into some crazy streaming playback anomalies regarding TrueHD 7.1 and PGS subtitles like I did. Well, I do not have all the answers for you, but I can at least give you a little bit of information and allow you to take solace in the fact that someone else out there is experiencing similar problems!
Please note that these lists of containers and codecs is not comprehensive. I have chosen commonly found files and formats for convenience and brevity.
Media Container Formats
A lot of people get confused about the differences between all the slang, acronyms, terminologies, and file formats that get tossed around on forums and blogs. Trust me, I know that it can be confusing when someone says something like, “Oh, it’s easy, just create a .mkv, and encode the video with x.264 and the audio in AC-3.” If you have no prior knowledge of these terms, you will be more than a little bit confused.
The bottom line is that there are four common components to movie media files: containers, video tracks, audio tracks, and subtitle tracks. Containers do exactly what you would guess: they contain the rest of the content. When you see a .avi file, that’s a movie file using the AVI container format. It contains video tracks, audio tracks, and possibly subtitle tracks.
See the following for a comparison between different containers: http://en.wikipedia.org/wiki/Comparison_of_container_formats.
- .m2ts – Non-open format commonly found in Blu-Ray discs and AVHCD. You’ll find this format when you rip a Blu-Ray using straight Blu-Ray copy software like DVDFab. This format supports menus that are commonly found on Blu-Ray discs.
- .mkv – Open source, widely supported container that can support an unlimited amount of any video, audio, and subtitle tracks.
- .avi – Microsoft developed container developed in the early 90s with too many limitations to list here. There is no reason to use this container over .mkv.
- .mp4 – Widely supported container based on the MPEG-4 standard with similar capabilities as .mkv. There are some limitations as to which video and audio codecs it will accept, but most of the more common codecs are supported.
My recommendation for most movies that you rip: MKV
Contained within a file, video codecs determine the quality and other attributes of a video track. For the most part, you are going to run into H.264 and VC-1 when dealing with Blu-Rays and MPEG-2 when dealing with DVDs.
See the following for a comparison between different video codecs: http://en.wikipedia.org/wiki/Comparison_of_video_codecs.
- H.264 – The most commonly used high definition video compression codec used in Blu-Rays (players must support H.264), YouTube, iTunes, Flash Player, Silverlight, and various media broadcasts.