Direct playing HEVC encoded files

TL;DR: I have HEVC encoded videos with an m4v extension (mp4 container), but Plex still is trying to transcode. How can I get it to direct play as the encoded video works on all devices?

So, I understand it’s possible to direct play HEVC files provided they are in mp4 containers. So this now brings me here since I cannot figure out why the Transcoder is kicking in. I have a NAS box running NAS4Free w/Plex. I am using the latest version of Plex on my box, and since it’s primary function is to be a dedicated storage system which can be accessed over the net, I did not put a high end CPU in there, i.e. I’m using a Celeron CPU @ 2.9GHz. I really do get that some files need transcoding when you throw and a mix of different file types, but I have come to be really nit-picky about that and have optimized all of my files to use web-optimized HEVC. I tuned my encoder’s settings to basically let the file be compatible with just about everything, at least in my house-hold.

So all of my files are encoded with this settings, making them really fast to buffer when being streamed on regular devices, and my 4K videos stream without issue over the net as well. However Plex is trying to transcode all of them, including my 4K videos, back to H264 based on the logs and then stream them. Not only is it now killing my CPU, but it’s using more bandwidth to stream the same video as it’s HEVC counterpart. This often results in the stream hanging, even on my home network. Naturally since my devices can all play HEVC without issue, I would want Plex to direct play the file instead of trying to transcode them. All my files are saved as m4v files which is an mp4 container. Any advice would be appreciated. :smile:

Plex client & version?

How are your plex client, tv, AVR, etc connected?

Plex XML for one of the problematic videos?

MediaInfo text output for same video?

Why are you using m4v extension instead of mp4?

1 Like

Can you pick on example for the media file and the client device. Tell us which device you picked. PMS uses profiles for individual device groups.

Then provide the XML info for that file. Moreover, switch to debug logging. Capture the log file over the period your are starting playback of that file. Look in that file for lines containing “MDE.” MDE stands for media decision engine. These are supposed to tell how and why the decision to transcode was made.

@FordGuy61 said:
Plex client & version?

How are your plex client, tv, AVR, etc connected?

Plex XML for one of the problematic videos?

MediaInfo text output for same video?

Why are you using m4v extension instead of mp4?

I’ve been using m4v for ten years now, and I like keeping my extensions consistent. m4v == mp4 though.

@eckarth said:
Can you pick on example for the media file and the client device. Tell us which device you picked. PMS uses profiles for individual device groups.

Then provide the XML info for that file. Moreover, switch to debug logging. Capture the log file over the period your are starting playback of that file. Look in that file for lines containing “MDE.” MDE stands for media decision engine. These are supposed to tell how and why the decision to transcode was made.

I have debug logging always enabled. I will provide information in just a moment.

MediaInfo costs money to download, so I will not be posting it’s output.

So for this example I am using the same file on different devices and providing output accordingly:
My XML is 281.xml for the file I am using.

My Plex server is on Version 1.12.3.4973
My Plex Web client is on Version 3.49.1

Test 1: Using my desktop PC and PMS Web Application:
Logs/Plex Media Server.log:3366:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: Selected protocol dash; container: mp4
Logs/Plex Media Server.log:3367:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: analyzing media item 275
Logs/Plex Media Server.log:3368:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: E25 - Test episode: Direct Play is disabled
Logs/Plex Media Server.log:3369:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: E25 - Test episode: media must be transcoded in order to use the dash protocol
Logs/Plex Media Server.log:3370:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc
Logs/Plex Media Server.log:3371:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc/aac
Logs/Plex Media Server.log:3372:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: E25 - Test episode: no remuxable profile found, so video stream will be transcoded
Logs/Plex Media Server.log:3373:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Logs/Plex Media Server.log:3375:Apr 26, 2018 15:15:35.267 [0x80b8cef00] DEBUG - MDE: Test series - S17 E25 - Test episode: selected media 0 / 275

Based on the above, it would seem this will happen on all devices due to a lack of a profile, so I skipped testing other devices.

Actually it’s kind of weird, it claims Direct play is disabled, but it’s enabled in my settings.

Another log capture of the same file.

Logs/Plex Media Server.3.log:16864:Apr 26, 2018 03:56:01.957 [0x80bc4c400] DEBUG - MDE: Selected protocol hls; container: mpegts
Logs/Plex Media Server.3.log:16865:Apr 26, 2018 03:56:01.957 [0x80bc4c400] DEBUG - MDE: analyzing media item 275
Logs/Plex Media Server.3.log:16866:Apr 26, 2018 03:56:01.957 [0x80bc4c400] DEBUG - MDE: E25 - Test episode: Direct Play is disabled
Logs/Plex Media Server.3.log:16867:Apr 26, 2018 03:56:01.957 [0x80bc4c400] DEBUG - MDE: E25 - Test episode: media must be transcoded in order to use the hls protocol
Logs/Plex Media Server.3.log:16868:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc
Logs/Plex Media Server.3.log:16869:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc/aac
Logs/Plex Media Server.3.log:16870:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: E25 - Test episode: no remuxable profile found, so video stream will be transcoded
Logs/Plex Media Server.3.log:16871:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Logs/Plex Media Server.3.log:16873:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: Cannot direct stream audio stream due to codec aac when profile only allows ac3
Logs/Plex Media Server.3.log:16874:Apr 26, 2018 03:56:01.958 [0x80bc4c400] DEBUG - MDE: Test series - S17 E25 - Test episode: selected media 0 / 275

My Plex Web client is on Version 3.49.1

I’m not aware of any web browser that supports HEVC or 4K.

Plex Web on my PC transcodes HEVC to H264, whether 1080p or 4K (Windows 10, Chrome 66, i7-4790 CPU). This is expected, as the CPU/iGPU does not have native HEVC support.

Can I Use shows partial support for HEVC in Edge & Safari, but with hardware and/or OS requirements. I don’t have a system w/ a 7th or 8th gen Intel CPU, so no way to test if Plex Web would work w/ HEVC on such systems.

You might try Plex Media Player for PC & Mac systems, https://www.plex.tv/downloads/.

When I play a HEVC video on my PC with PMP, the server shows Direct Play. For a 4K video, the CPU utilization on my PC spikes to 75%, so it is apparently just moving the transcode from the server to the client. For a 1080p/HEVC video, the CPU utilization is under 10%.

FYI, MediaInfo is free, at least for PC/Mac. You can donate, but it isn’t required to use the s/w. It costs $0.99 USD via the Mac App store, but you can download a free version from the web site.

2 Likes

@FordGuy61 said:

My Plex Web client is on Version 3.49.1

I’m not aware of any web browser that supports HEVC or 4K.

Plex Web on my PC transcodes HEVC to H264, whether 1080p or 4K (Windows 10, Chrome 66, i7-4790 CPU). This is expected, as the CPU/iGPU does not have native HEVC support.

Can I Use shows partial support for HEVC in Edge & Safari, but with hardware and/or OS requirements. I don’t have a system w/ a 7th or 8th gen Intel CPU, so no way to test if Plex Web would work w/ HEVC on such systems.

You might try Plex Media Player for PC & Mac systems, https://www.plex.tv/downloads/.

When I play a HEVC video on my PC with PMP, the server shows Direct Play. For a 4K video, the CPU utilization on my PC spikes to 75%, so it is apparently just moving the transcode from the server to the client. For a 1080p/HEVC video, the CPU utilization is under 10%.

FYI, MediaInfo is free, at least for PC/Mac. You can donate, but it isn’t required to use the s/w. It costs $0.99 USD via the Mac App store, but you can download a free version from the web site.

Going off of Can I Use, I should be able to direct play on the Web with my Mac. Running on Safari Version 11.1 (13605.1.33.1.2) with macOS High Sierra, I still get Direct Play disabled. I’m going to try to Plex apps, and see if that makes a difference.

UPDATE: Downloading the apps fixes the DirectPlay problem, but I’m still having issue getting my TV to DirectPlay.

Moving on to my TV, which can easily stream HEVC using a standard DLNA service, I don’t get Direct Play either.

I’m streaming with the Plex Smart TV app.

16159:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: Selected protocol hls; container: mpegts
16160:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: analyzing media item 275
16161:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: E25 - Test episode: Direct Play is disabled
16162:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: E25 - Test episode: media must be transcoded in order to use the hls protocol
16163:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc
16164:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: E25 - Test episode: no direct play video profile exists for http/mp4/hevc/aac
16165:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: E25 - Test episode: no remuxable profile found, so video stream will be transcoded
16166:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
16168:Apr 26, 2018 17:05:20.679 [0x80ae91d00] DEBUG - MDE: Cannot direct stream audio stream due to codec aac when profile only allows ac3
16169:Apr 26, 2018 17:05:20.680 [0x80ae91d00] DEBUG - MDE: Test series - S17 E25 - Test episode: selected media 0 / 275

TV Make & Model?

FYI, there are forum sections for each client. Might try posting in applicable area. You’ll get a higher hit rate.

Smart TVs: https://forums.plex.tv/categories/smart-tvs

Plex Media Player: https://forums.plex.tv/categories/plex-media-player

Plex Web: https://forums.plex.tv/categories/plex-web

@FordGuy61 said:
TV Make & Model?

FYI, there are forum sections for each client. Might try posting in applicable area. You’ll get a higher hit rate.

Smart TVs: https://forums.plex.tv/categories/smart-tvs

Plex Media Player: https://forums.plex.tv/categories/plex-media-player

Plex Web: https://forums.plex.tv/categories/plex-web

I have multiple devices, so I thought it better to post in the general, than spam a thread in each category. :smile:

Here are my devices:

  1. Samsung UN48H5500: Plex unnecessarily transcodes it despite the TV being able to play it back.
  2. iPhone 6s Plus: Direct Play using App
  3. iPhone 7S Plus: Direct Play using App
  4. Windows PC: Direct Play using App
  5. MacBook: Direct Play using App
  6. LG 4K Smart TV: unknown
  7. Roku: unknown

No idea why the Samsung won’t direct play a 720p HEVC video (XML you posted). I did not see anything in the XML that looks out of sorts. That said, I’ve an LG, not a Samsung. There could be a Samsung client setting, etc that does not appear on an LG.

Reason I suggested the device specific forums is that you’ll reach a more targeted audience. Anything device specific will likely garner a faster response.

Transcoding 4K is very CPU intensive. You’ll need a lot more than a Celeron if you’re going to play 4K video on the Samsung TV or other 1080p devices.

Also consider Hardware Accelerated Streaming. It uses the iGPU instead of the main CPU for transcoding. If the GPU in your Celeron supports HEVC it might help.

Here’s the Intel Celeron tech docs. Find the one for your CPU. Start with Datasheet Vol 1. Look for “Video Codec,” “Hardware Accelerated Video Codec” or similar section. It will tell you what codecs are supported for encoding & decoding (might be different for encode vs decode).

Technical Resources: Intel® Pentium® and Celeron® Processors

Check in the appropriate NAS forum to see if Hardware Accelerated Streaming is supported on NAS4Free. Some OSes do not provide necessary access to the iGPU.

Note that a Plex Pass is required for Hardware Accelerated Streaming. You could try it for a month ($4.99 USD) then discontinue if it doesn’t help.

To enable:
Server -> Settings -> Transcoder -> Check “Use Hardware Acceleration Where Possible” box. You have to show advanced settings to see the selection.

FYI, my LG is the 55OLEDB7. Plex app plays 4K & 4K HDR, both MP4/HEVC, just fine. It does not like subtitles. Both PGS & SRT subtitles force a transcode when enabled. Haven’t tried any 4K H.264 or 1080p/720p 4K HEVC content. Lossless audio, TrueHD/dts-HD MA, also causes a transcode due to HDMI/ARC limitations. No problem with AAC/AC3/dts audio.

@FordGuy61 said:
No idea why the Samsung won’t direct play a 720p HEVC video (XML you posted). I did not see anything in the XML that looks out of sorts. That said, I’ve an LG, not a Samsung. There could be a Samsung client setting, etc that does not appear on an LG.

Reason I suggested the device specific forums is that you’ll reach a more targeted audience. Anything device specific will likely garner a faster response.

Transcoding 4K is very CPU intensive. You’ll need a lot more than a Celeron if you’re going to play 4K video on the Samsung TV or other 1080p devices.

Also consider Hardware Accelerated Streaming. It uses the iGPU instead of the main CPU for transcoding. If the GPU in your Celeron supports HEVC it might help.

Here’s the Intel Celeron tech docs. Find the one for your CPU. Start with Datasheet Vol 1. Look for “Video Codec,” “Hardware Accelerated Video Codec” or similar section. It will tell you what codecs are supported for encoding & decoding (might be different for encode vs decode).

Technical Resources: Intel® Pentium® and Celeron® Processors

Check in the appropriate NAS forum to see if Hardware Accelerated Streaming is supported on NAS4Free. Some OSes do not provide necessary access to the iGPU.

Note that a Plex Pass is required for Hardware Accelerated Streaming. You could try it for a month ($4.99 USD) then discontinue if it doesn’t help.

To enable:
Server → Settings → Transcoder → Check “Use Hardware Acceleration Where Possible” box. You have to show advanced settings to see the selection.

FYI, my LG is the 55OLEDB7. Plex app plays 4K & 4K HDR, both MP4/HEVC, just fine. It does not like subtitles. Both PGS & SRT subtitles force a transcode when enabled. Haven’t tried any 4K H.264 or 1080p/720p 4K HEVC content. Lossless audio, TrueHD/dts-HD MA, also causes a transcode due to HDMI/ARC limitations. No problem with AAC/AC3/dts audio.

Thanks for the thorough response. I’ll take a closer look when I have the time and get back to you. I have a new problem now unfortunately. My Server is no longer accessible despite the service running. I will however make a new thread for that.

@FordGuy61 said:
No idea why the Samsung won’t direct play a 720p HEVC video (XML you posted). I did not see anything in the XML that looks out of sorts. That said, I’ve an LG, not a Samsung. There could be a Samsung client setting, etc that does not appear on an LG.

Reason I suggested the device specific forums is that you’ll reach a more targeted audience. Anything device specific will likely garner a faster response.

Transcoding 4K is very CPU intensive. You’ll need a lot more than a Celeron if you’re going to play 4K video on the Samsung TV or other 1080p devices.

Also consider Hardware Accelerated Streaming. It uses the iGPU instead of the main CPU for transcoding. If the GPU in your Celeron supports HEVC it might help.

Here’s the Intel Celeron tech docs. Find the one for your CPU. Start with Datasheet Vol 1. Look for “Video Codec,” “Hardware Accelerated Video Codec” or similar section. It will tell you what codecs are supported for encoding & decoding (might be different for encode vs decode).

Technical Resources: Intel® Pentium® and Celeron® Processors

Check in the appropriate NAS forum to see if Hardware Accelerated Streaming is supported on NAS4Free. Some OSes do not provide necessary access to the iGPU.

Note that a Plex Pass is required for Hardware Accelerated Streaming. You could try it for a month ($4.99 USD) then discontinue if it doesn’t help.

To enable:
Server → Settings → Transcoder → Check “Use Hardware Acceleration Where Possible” box. You have to show advanced settings to see the selection.

FYI, my LG is the 55OLEDB7. Plex app plays 4K & 4K HDR, both MP4/HEVC, just fine. It does not like subtitles. Both PGS & SRT subtitles force a transcode when enabled. Haven’t tried any 4K H.264 or 1080p/720p 4K HEVC content. Lossless audio, TrueHD/dts-HD MA, also causes a transcode due to HDMI/ARC limitations. No problem with AAC/AC3/dts audio.

It would appear that per Intel® Celeron® Processor G3930 that my CPU supports HW acceleration, and in 4K, though I can’t find the data sheet for it, nor can I find the option for it on my Plex server. Maybe a Plex tech person can help me with this one?

Pinging @BigWheel who helped me last time. :slight_smile:

Your TV is using the Samsung Smart Hub app, which should definitely play HEVC videos. In the app, turn on logging to PMS, then recreate the problem, then get me the entire log file.

@“MovieFan.Plex” said:
Your TV is using the Samsung Smart Hub app, which should definitely play HEVC videos. In the app, turn on logging to PMS, then recreate the problem, then get me the entire log file.

I will do that.

@“MovieFan.Plex” said:
Your TV is using the Samsung Smart Hub app, which should definitely play HEVC videos. In the app, turn on logging to PMS, then recreate the problem, then get me the entire log file.

I’ve sent you the log in a PM.

For the Samsung TV, I found a hidden setting that enables Direct Play support. When I enabled it all of my 1080p, or less, HEVC files were streaming directly to the TV with no issues, but my LG 4K TV is not having such luck. I can’t find hidden settings on it, and the PMS still insists on Transcoding non-H264 files before streaming despite the fact that I know the TV can handle HEVC, from personal experience. I sent @“MovieFan.Plex” a PM with my logs.

@Cyberpower678 said:
MediaInfo costs money to download, so I will not be posting it’s output.

…not sure where you’re shopping - but here it is - free for the taking:

There’s going to be a time in the not too distant future, where the PLEX team (or someone else) just makes a damn video player that can play any format, on any hardware running their app… and we will look back at all this “will this format direct play on device x if audio is y and video is z”… etc… and ask why did we wait so long to support this?

It’s utterly stupid that in 2018 we’re still struggling with this nonsense. Apps like VLC and Infuse 5 for IOS has figured this out already, problem is Infuse for example is IOS only, ironically the hardware with the most push back on these formats, yet this app is far and beyond where PLEX currently is in terms of direct playing anything you throw at it.

I really like the product PLEX has been able to push out, overall, but damn if they aren’t like a decade behind everyone else in terms of integrating a modern video player that isn’t bottlenecked by the hardware it’s installed on, resulting in the completely unnecessary task of forcing the server to be bogged down transcoding everything.

Still frustrated that topics like this even exist. Let gets on this PLEX team… there’s a strong demand to get direct play working without having to jump through 50 hoops and getting the stars to align to get that working.

3 Likes