Forum Discussion

2ka's avatar
2ka
Streaming Star
3 years ago

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.

111 Replies

Replies have been turned off for this discussion
  • 2ka's avatar
    2ka
    Streaming Star

    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.

    • 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....

      • renojim's avatar
        renojim
        Community Streaming Expert

        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.

    • jtodd76's avatar
      jtodd76
      Binge Watcher

      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!

      • 2ka's avatar
        2ka
        Streaming Star

        jtodd76and others,

        I hope the following explanation will help a bit.

        The red distortion will happen *whenever* HEVC-encoded video that uses the BT.709 colorspace is played from an MKV container that has (optional) color information in the header on a newer model Roku (that is, any model that has the video upscaler feature).  Unfortunately, this container type (MKV with color info) is exactly the one the Plex server uses whenever it transcodes or Direct Streams.  That is what makes the behavior harder to understand.

        The problem will not happen if:

         - the content is Direct Played from an MP4 container, or
         - the content is Direct Played from an MKV container that has had the color info removed, or
         - The video is transcoded for any reason.  Plex server will transcode the video to burnin subtitles or to reduce bandwidth.  But Plex always transcodes video using the H.248 encoder at 1080P or lower.  This means the red problem disappears on transcodes, but so does 4K resolution.

        The problem will happen if:

         - The  content is Direct Streamed, even if the original was in an MP4 container.  This is because Plex Server uses MKV containers (with color info) when remultiplexing for Direct Streaming.
         - The content contains only incompatible audio tracks, such as AAC surround sound.  In this case Plex Server will transcode the audio to a compatible format, and then remux the whole into a new MKV container (with a color header), thus triggering the bug.  The AAC stutter workaround also triggers the bug by forcing remultiplexing.

        If your force Direct Play on an MP4 file that contains incompatible audio, the red problem will disappear, but so will the sound.  Ditto for an MKV file with the color info removed.  You can't Direct Play what can't be directly played, if you follow my meaning.

        In order to workaround the problem, you first have to ensure the file contains audio that is compatible with Roku and your playback environment.  Otherwise Plex will transcode the audio and remultiplex into an MKV container. AC3 is the most broadly compatible format.  If the original audio is incompatible, you have to pre-transcode the audio track yourself using a tool like ffmpeg.  You then have to either mux the content into an MP4 container or use an MKV container and then use a utility like MKVToolNix to remove the color info.  Finally, you have to make sure the your player is set up to Direct Play the file.

        The workaround, as you see, is pretty complex.  That is why so many people struggle with it.  You have to get it right, or the red problem persists.