01.01.2021, 19:59
I don't usually do this thing with 4K 10-bit HEVC MKV videos but right now I do need to downgrade one of them in my hard disk to a 4K 8-bit H264 MP4 video due to compatibility issues with playing on this one old laptop that I decided to turn it into somekind of a "slave device"
Problem here is when directly encoding it with FFMPEG while only explicitly specifying -c:v libx264 -preset:v medium, the encoded MP4 had the color noticably darker and green-ish.
I'm thinking that this has something to do with downgrading from 10-bit to 8-bit color depth and maybe because FFMPEG preserved the matrix coefficient flag at bt2020nc and it made my player (MPC-HC 64-bit from K-Lite Codec Mega Pack thingy) think that it has to use bt2020nc matrix to convert the bits to RGB back. As far as I have read about BT2020, it's a matrix for UHD 10-bit YUV videos.
So I thought maybe because the encoded video is 8-bit and the player is doing its stuff by using BT2020 matrix causes the color changes, and that's when I thought maybe I could add something like -vf scale=out_color_matrix=bt709 and reset the flag for matrix coefficient explicitly to bt709 just to "make sure" that my player won't mess up with the color conversion but then I'm not sure about that since I'm quite new to this color space and pixel format stuffs but I've also done tons of reading already; I'm just not sure, so I thought maybe I could post a thread here for a quick help? Cuz this is a damned 2-hour movie and I don't want to waste my time on testing things even on "ultrafast" preset
So, what's the real problem here? Color matrix?
If it's really just the color matrix then in my case, what should I do and to what should I set it to?
And when exactly, like EXACTLY, should I use the matrix BT2020? Does it entirely depend only on the resolution/size, or both the resolution/size and bit depth?
Problem here is when directly encoding it with FFMPEG while only explicitly specifying -c:v libx264 -preset:v medium, the encoded MP4 had the color noticably darker and green-ish.
I'm thinking that this has something to do with downgrading from 10-bit to 8-bit color depth and maybe because FFMPEG preserved the matrix coefficient flag at bt2020nc and it made my player (MPC-HC 64-bit from K-Lite Codec Mega Pack thingy) think that it has to use bt2020nc matrix to convert the bits to RGB back. As far as I have read about BT2020, it's a matrix for UHD 10-bit YUV videos.
So I thought maybe because the encoded video is 8-bit and the player is doing its stuff by using BT2020 matrix causes the color changes, and that's when I thought maybe I could add something like -vf scale=out_color_matrix=bt709 and reset the flag for matrix coefficient explicitly to bt709 just to "make sure" that my player won't mess up with the color conversion but then I'm not sure about that since I'm quite new to this color space and pixel format stuffs but I've also done tons of reading already; I'm just not sure, so I thought maybe I could post a thread here for a quick help? Cuz this is a damned 2-hour movie and I don't want to waste my time on testing things even on "ultrafast" preset
So, what's the real problem here? Color matrix?
If it's really just the color matrix then in my case, what should I do and to what should I set it to?
And when exactly, like EXACTLY, should I use the matrix BT2020? Does it entirely depend only on the resolution/size, or both the resolution/size and bit depth?