Channels & viewing

Are your Roku channels not working? Find troubleshooting tips for adding/removing channels, logging in, authentication, activation, playback issues, and more.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
2ka
Streaming Star

Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

Any file using BT.709 will appear red when Direct Streamed, because Plex will reconstruct the color information when remuxing the stream.

Any file using BT.709 that has color or color mastering info in the header will show the problem when direct played.

0 Kudos
111 REPLIES 111
2ka
Streaming Star

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@jtodd76, I would very much like to see an example of a file that still produces the red tint bug when direct played after the color and color mastering info is properly removed.  I personally  haven't seen one in hundreds of examples, so my confidence in the workaround is very high.

Please upload an example to a file transfer service, then post a link here.  Or if you prefer to send a private link to lalley2ka at the mail service hosted by Google.

I'd like to offer the same request to anyone that has an example of such a file.

0 Kudos
1DayAfterAnothe
Roku Guru

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@2ka 

I personally haven't seen it with my files either....when I removed the color info it went away....  But it's crazy to me most of the HEVC MKV files I have.... the color information is blank across the board....and those files play fine... What is the POINT of this color information being in some MKV files when they play fine without it? I noticed a series I encoded using Handbrake HEVC 720p preset... it must have PUT the color information there because those files were NOT blank... I wish I could just right click over color information in the header editor and remove all color information instead of going down through each one individually.... it's a total pain....

0 Kudos
2ka
Streaming Star

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@1DayAfterAnothe,

If you read the MKV specification, you will see that the color info and color mastering info are totally optional.  They are MKV metadata that can be used in any way the programmer wants to categorize the file, but they are not needed by the player for accurate playback.

Both Handbrake and ffmpeg fill out those headers in an effort to be good, polite citizens.  I think Roku is attempting to use the info to configure their video upscaler, but whatever they are doing is just incorrect.

0 Kudos
renojim
Community Streaming Expert

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

I find it much easier to use command line tools than a GUI for things such as this.  I have the color problem with OTA recordings from WMC that I use ffmpeg to repackage into an MKV for viewing via Roku.  After the conversion I run this:

mkvpropedit badcolor.mkv --edit track:v1 -d colour-range -d chroma-siting-horizontal -d chroma-siting-vertical

It takes less than a second.  You can batch process all your MKVs with a for loop in Windows or "find -exec" (or for loop) in Linux.

I can't be sure that my problem is exactly the same as what this thread refers to, but the resulting color problem appears to be the same thing.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
2ka
Streaming Star

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

This is a really cool idea.

Here is a more complete list of the six common attributes I see, in the form of a line from a Windows BAT script, referencing the common location for mkvpropedit after installation of MKVToolNix.

"c:\Program Files\MKVToolNix\mkvpropedit.exe" %1 --edit track:v1 -d color-matrix-coefficients -d chroma-siting-horizontal -d chroma-siting-vertical -d color-transfer-characteristics -d color-range -d color-primaries

Note that this is fewer than half of the possible attributes, but I don't see the rest very often.  Any of them will trigger the red distortion.   I was just too lazy to do all of them!

0 Kudos
1DayAfterAnothe
Roku Guru

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@2ka 

Hey! Keep in mind I don't know much about command line...but I was given instructions on how to do something similar and it works great...assuming mkvtoolnix is on a windows computer... create a .bat file first...then go to program files and inside the mkvtoonix folder...right click and copy MKVMERGE... then take the bat file (in my case it was for batch syncing audio that was out of sync where most of the files were exactly -200ms out of sync...) and copy the bat file into the folder where the seasons episodes are..and also copy the MKVMERGE shortcut into that same folder... double click the bat file and it processes...

but that's the ONLY way I know how to do this (LOL)...

the command was given to me which is this: FOR %%A IN (*.mkv) DO mkvmerge -o "remux-%%~nA.mkv" "--sync" "1:-100" "%%~A"

and I could just change the amount of sync in the command... all I did was paste that into notepad and save it as sync.bat

My question is... will this method work exactly the same way? in other words... I need total IDIOT instructions. 

Thanks

0 Kudos
2ka
Streaming Star

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@1DayAfterAnothe 

The following command in a batch file will delete the six listed color information elements from the first video track on all MKV files in the directory(including subdirectories)  in which it is run, assuming MKVToolNix is installed in the indicated place:

FOR /R %%A IN (*.mkv) DO "c:\Program Files\MKVToolNix\mkvpropedit.exe" %%A --edit track:v1 -d color-matrix-coefficients -d chroma-siting-horizontal -d chroma-siting-vertical -d color-transfer-characteristics -d color-range -d color-primaries

But golly, I don't think I would do that, especially in a large library of files for which there is no backup or for which restore would be inconvenient.  I think it would likely be OK, but I have never tested this on files with something other than BT.709 color space encoded with the HEVC codec.  The command above would do EVERY file, regardless of how it is encoded.

If you are really brave and have a good backup, you might try it.  Then test and make sure your HDR and old SD content still plays OK.  If course you would still get the red bug if Plex decides to remux the file, as in the case where it has only AAC surround sound.  Or if the video codec isn't compatible with Roku.

A better idea would be to write a powershell script that probed each file using mkvinfo, looking for only those encoded in HEVC and BT.709 encoded (or at least not BT.2020).  Then eliminate the color info only in those files.  Sorry, but developing and testing such a script is more than I am prepared to do at this time.  It would probably take me several hours. Maybe someone is reading that could do it really quickly.

0 Kudos
jtodd76
Binge Watcher

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@2ka I've created the bat file but trying to understand how to run it and where? Can you elaborate a bit more please? This is a great idea and I'd like to try it. I just have a folder called 4K Movies and a lot of those are MKV with the red tint problem. 

0 Kudos
jtodd76
Binge Watcher

Re: Severe color/contrast distortion while Plex-streaming HEVC+EAC3 videos.

@2ka I've been out of town all week and got in yesterday...I took another look and I think I just forgot to turn direct play on after removing the elements. So, I have a new situation...I have the 4K version of the movie, 1917. There were NO elements to remove and wen trying to play in direct play, it said "No Audio detected" and asks if I'd like to change it back to "auto" and try again. Of course, if I say No, the picture is great but without audio. 🤣 I'm about to rip these new Roku's out and drop kick them across the street!

0 Kudos