0

I have a x264 mp4 that plays fine on every browser, but the color seems washed or something. It looks the same on every browser, but when played in vlc the colors are more accurate. Is this an html5 limitation or is there something I can do to correct this? Below is a picture of the same video side by side, one in chrome and one in vlc. The video was encoded from x265 to x264 using ffmpeg but i'm not sure if that is relevant. It's a 4k video too. Here is the command used to re-encode anyways:

ffmpeg -re -i "input.mkv" -crf 18 -preset medium -max_muxing_queue_size 4096 -colorspace bt2020nc -color_trc smpte2084 -color_primaries bt2020 -pix_fmt yuv420p -r 24 -map 0 -c:v:0 libx264 -c:a:0 mp3 "test.mp4"

Here are the videos side by side: https://prnt.sc/18dzwuz

and I am just using a simple html5 video tag:

<video src="/video/test.mp4" height="600" type="video/mp4" controls />

user192148
  • 145
  • 1
  • 9
  • Your source video is HDR. Don't expect color fidelity from a browser player. See https://stackoverflow.com/q/52897028/ – Gyan Jul 04 '21 at 05:05
  • The colour space seems strange: so either: do not put master on web: you should remaster and colour correct for every colour space (and dimension) of usage. Nobody has 2020. (and if you are ure not using 10 or more bit, you are delivering bad content for normal users). And you are putting the burden (to convert down) to users: do not do that! From your comments I assume there was a colour space mismatch (a small colour space interpreted as 2020 will get unsaturated colours) [VLC may have a bug]. Do not distribute Rec2020 to users! – Giacomo Catenazzi Jul 04 '21 at 05:19
  • You need to output your video in `BT.709` colorspace. That will match VLC. If re-encoding is not possible, then use `` to edit each frame's pixel colors to BT.709 numbers. – VC.One Jul 17 '21 at 22:57

0 Answers0