My understanding is that if you want PLEX to run well on all platforms and servers that it is best to use video and audio formats that are completely compatible and do not require encoding by the server to be played. This avoids problems with playback that can occur with multiple streams, large files, and weaker or older servers that do not have as much processing capability.
However, it’s not clear to me exactly what these formats are and what the pros and cons are for some of them.
VIDEO I repeatedly see preference for MKV over MP4 and yet the support material seems to suggest that PLEX is most compatible with MP4. Just what are the differences and why and when would one prefer MKV over MP4 or vice versa.
I do see that MANY players cannot handle H.265 and will run with H264. I believe it was said that no web browsers can play 265.
AUDIO I don’t think I know which audio format(s) don’t require encoding. What is the preferred audio format?
I suppose there’s some confusion here… let’s try to disentangle this.
If you’re not so much interested in this novel… TL;DR: jump to “All that being said…”
About video files
Most video files contain different elements of the video as individual Streams. Usually this includes 1 video stream, a combination of 1 or more audio streams and optionally subtitle streams. These streams are embedded in a so called Container. A container “contains” the streams and also stores some technical details and characteristics of the file (e.g. metadata, embedded posters, technical information about each stream like languages…).
Matroska (e.g. mkv) and MPEG4 are containers.
The streams in each container can be encoded in a variety of formats:
For videos, h264 or h265 are quite common formats
The format of audio streams depends on what type of audio they store (e.g. stereo or surround audio) – common formats are AC3 (dolby…) , DTA (DTS) or even AAC (MPEG4 audio)
Subtitles can be stored as text or image based formats… (e.g. SRT or DVD/Blu-Ray subtitles)
No single optimal format
The “optimal” combination depends on your specific playback situation and priorities. If you want the best possible picture from your source… don’t touch the files but keep them as they are. If you want to stream lots of videos over a limited bandwidth internet access you might want to focus on the file sizes.
Also… with the variety of combinations, not all hardware vendors make an effort to support all of them. If you read the tech specs of a TV you’ll find massive lists of supported media types and formats – the fine print (if available) shows many restrictions (e.g. certain file types are only supported up to a maximum bitrate or resolution…).
So… sadly there’s no one-size-fits-all solution.
If you’re using Plex on one of the more powerful platforms (e.g. Android TV/Nvidia Shield, Apple TV…) you might experience less restrictions than in the past. During the last year Plex has rolled out new players for those platforms that are no longer 100% relying on what formats are supported by the platform but will natively play many more formats.
All that being said…
If you want to push for compatibility… the most widely applied combination of formats is h264 video in combination with AC3 or AAC audio. If you have subtitles, try to go for text based ones. While the above mentioned new players can also directly play image based formats, SRT is a safer bet for “the rest of us”.
Keep in mind there other factors…
some mobile devices have only 1 speaker or play at best stereo sound – some of those will not deal with surround sound (e.g. no AC3 with a 5.1 layout)
some devices have bitrate restrictions and will only play videos up to a certain bitrate
h264 has a variety of “levels” with increasing encoding complexity. Some clients do not support the higher levels
Most Transcoding tools have built-in presets with parameters considered “safe” for certain device classes. If you’re going with Handbrake, you’ll e.g. find profiles for certain Android or iOS devices
Perhaps it’s easiest to say what your server is, what your playback devices are, and what you care most about. That way you can get specific recommendations that are known to work.
The good news is that you don’t have to decide in advance. You can test a few files and see what works for you, and make changes over time. Many of us still have files we encoded from DVD and now from UHD Blu-ray.
What are you going to use as your server? (Synology sells units that “can not” and “can barely” and “can acceptably” transcode video.)
What are your source files? Will you be encoding them yourself, or getting them already encoded?
What are your playback devices? (You don’t care if browsers can’t play H.265 if you won’t be using browsers for playback.)
There are a couple of nice tools for manipulating MKV, but the containers have very similar capabilities overall.
MKV and MP4 playback compatibility is less important than it used to be. The current Plex players on most platforms can play from either container, AND because it’s just a container, almost any server is fast enough to repackage (remux) on the fly.
So I wouldn’t stress about THAT, even if there are lots of opinionated people.
If you’re at the absolute bleeding edge, there are differences in support for things like Dolby Vision between the containers. Meh! Those are all complicated right now anyway. You’d know if they applied to you.
Personally I found MP4 H.264 with AC3 5.1 works with everything. Some say AAC but honestly AC3 is just as compatible and I actually found a technical study done by Audio Engineers that showed AC3 5.1 at 640 had the edge over AAC 320.
Several Samsung TV’s I have had a problem with AAC and the sound was muffled, I converted it to AC3 and all problems went away.
There is transcoding but that has never been a problem. I use a QNAP TS 453Be with 8 g ram, I have run 12 streams transcoding 9 and the NAS was around 60-70% usage (this is hardware transcoding with plex lifetime)
AC3 5.1 is an excellent choice for surround playback, especially on TVs and any set-top boxes. It’s widely (universally?) supported in the hardware world.
It’s less ideal in other scenarios. It’s not as well supported by web browsers. A frequent complaint when playing back multi-channel audio on stereo devices is that the mixdown audio volume is relatively low.
If you want to keep surround audio, then including AC3 5.1 (or more, perhaps) makes perfect sense. If you also want to support stereo audio, a sophisticated (and high maintenance!) solution would be to ALSO create a stereo stream, in advance.
I haven’t experienced any issues with low-volume AAC, but @skwor01’s anecdote shows the importance of being flexible about these things.
So I think what all of you are saying is that there is really no advantage one way or the other of MKV vs MP4 since these are both containers and what’s really important is what’s inside the containers.
If this is so, why does the PLEX support material say that it is MOST compatible with MP4?
Also it sounded like some audio formats may require encoding is that simply not true? If it is true, which ones would you want to avoid.
I am primarily encoding and making my own files and simply wanting to know what format works best. All of my original material was saved as actual DVD files, but PLEX doesn’t play original DVD files so I’ve been forced to convert or rip the files into a different format. That’s the primary reason for wanting to know which format makes the most sense.
I am playing these on a NAS Synology server that is on the low end DS218j so I am concerned about making my choices be as simple and compatible as possible so I get decent playback. I will be watching predominantly on a large screen TV through an Apple TV 4 although occasionally from my iPhone. Picture quality just needs to be decent. I’m more concerned about playback running smoothly.
MP4 is still more compatible, but it no longer matters to most Plex users.
The players built into many TVs and set-top boxes didn’t support MKV directly, but did support MP4 directly. Plex originally relied on those built-in players.
In the last few years Plex has enabled “enhanced” players for at least AppleTV and Android devices, and those support MKV.
It’s also a perfect example. If you’re an Apple TV user, are you an Apple desktop/laptop user? On the desktop, Quicktime can play MP4 directly; you need VLC or IINA or mpv to play MKV. That’s a good reason to prefer MP4, if you don’t have another reason to prefer something else.
If you have a DS218j and are using DVD material, take @tom80H’s suggestion to use the Handbrake preset.
Drop your DVD or rip on Handbrake
Preset → Devices → Apple 540p30
Check the “Save As:” location at the bottom
Hit Start
That will make a file:
In an MP4 container
With H.264 video
Up to 540 pixels tall, as necessary (plenty for DVD)