Surprise surprise, it's 2024 and Plex still has not fixed this issue. I own a Roku Express 4k and am still having trouble on the latest update.
I read through the full thread and threads on the Plex forum, and I have developed an improved workaround that makes "fixing" your files a lot easier.
The (very) short version of the issue: Roku has a well documented issue playing HEVC-encoded content that uses the rec.709 color space. The primary workaround involves stripping the file color header information using a tool such as mkvpropedit, unfortunately, Roku ALSO doesn't play nice with AAC audio - so if your file is HEVC rec.709 and uses AAC audio, even if you strip the header info, Plex will re-encode the video and audio on the fly and reintroduce the header issue.
I have written a simple batch script that utilizes ffmpeg and mkvpropedit together to fix files, and for those with large libraries, it is designed to loop through a directory and fix all MKV files automatically.
Here is the script: Fix for HEVC rec.709 MKV files for streaming on Roku via Plex
All that you need to do is download the script to a text file with the extension .bat, change the input directory to your video directory, and have ffmpeg.exe and mkvpropedit.exe in the same location as the script file (they are easy enough to find online). For each MKV file in the given directory, the script will output a "fixed" file with the tag -ac3 on the end. You will have to manually handle coping/moving/deleting the originals. This script should in theory work with mp4 files as well with some small adjustments, but I have not tested that.
The fact that this issue hasn't been fixed yet is ridiculous. Roku is completely ignoring the issue for whatever reason, all they care about is making updates that add useless features that everyone hates like the recent home screen rows that took forever for them to update and give us a disable option. With how long this HEVC mkv issue has gone on there is absolutely no excuse.
Everything you described sounds complicated and you lost me, I applaud you for trying to find a solution but one should not have to jump through all of those hoops just in order to get HEVC mkv files to display correctly. As I have said before on other topics of this issue, older Roku devices can play these types of files just fine.
I have two Roku Ultra 4660 players that I got in 2017 and they display HEVC mkv files just fine. But my two new Roku Streaming Stick 4K players don't, the colors are all red. It's ludicrous that an older device can handle these files but all the newer ones can't, I believe the new Roku Ultra models also have this issue. Roku should be embarrassed by this and be working to fix it as a top priority.
For me personally, I just pay attention to what files I am watching on Plex and if I plan on watching HEVC mkv files I will avoid playing them on the new Roku Sticks completely. I will make sure to use either of my Roku Ultras or either of my Fire TV devices, because all of those display the files correctly.
This worked perfectly. Thank you.
@cgeffex After messing with this issue for awhile, I found this ffmpeg command to solve the issue in a slightly simpler way (no re-encoding):
ffmpeg -i input.mkv -map 0 -codec copy -bsf:v hevc_metadata=colour_primaries=2,hevc_metadata=transfer_characteristics=2,hevc_metadata=matrix_coefficients=2 output.mkv
I tested it on 3 different files that initially had the rec.709 color issue and it fixed them all without re-encoding any audio. After running this command in ffmpeg, Roku/Plex will play the file and transcode the original audio without issues. It's confusing because MediaInfo still shows the BT.709 color flags, but Plex doesn't seem to see them and the files play fine from what I can see. Would love to hear if you're able to re-produce my results.
Maybe you can describe how to do this assuming we know nothing about what you are talking about. Because I have no idea how to try this 'fix' you have come up with but I would like to.
What is an ffmpeg command and how the heck do you paste that to the file?
Does it alter the file so it's changed? Or do you have to keep doing this every time you add the file back to Plex if you remove it?
@Emissary35 here's a post explaining how to setup and use ffmpeg: https://video.stackexchange.com/questions/20495/how-do-i-set-up-and-use-ffmpeg-in-windows (assuming you're using windows)
It appears Roku OS 13 has fixed this issue. Can you test and verify?
Confirmed! Sweet, we've been waiting on this fix for AWHILE.
Yes it's confirmed, this annoying playback glitch has finally been fixed! You can now stream HEVC mkv files on Plex on all newer Roku devices and the color saturation problem is gone!
Before these types of files would only display correctly on my older Roku devices or on my Fire TV devices.
It's about time Roku finally did something right and fixed this. But it still took way too long to be addressed, I hope in the future Roku comes up with updates to fix problems like this much faster.
Curious how this fix has worked for other people - the color on my Roku is correct if I transcode, but if I select "force direct stream" for a 4k Dolby Vision source the color is still off. My Plex server is a NAS so can't really keep up with transcoding 4k content, leaving me to direct stream it and have the Roku transcode as my only practical option (with current equipment).