Jump to content

Wikipedia:Reference desk/Archives/Computing/2018 June 20

From Wikipedia, the free encyclopedia
Computing desk
< June 19 << May | June | Jul >> June 21 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 20

[edit]

Video: YUV, RGB, VLC, gamma, and colors

[edit]

Due to the difference in color space between RGB and YUV (aka the digital version of the latter with a much longer name), I've generally set my VLC player's gamma a bit lower in order to compensate, since most videos stored on DVDs, BDs, etc. are in YUV and my comp monitor is RGB. But now I have a problem: Russian studio Mosfilm have released a bunch of their Soviet-era films into the public domain and uploaded them in brilliant HD telecines to their YouTube channel and I've downloaded the Tarkovsky films...only to find that Mosfilm has uploaded them not as YUV but as RGB because they're meant for YT playback!

Now, you may say that I could just turn off the gamma correction in VLC, but I want real YUV files that I can also watch on a regular TV. First I tried the according RGB --> TV filter in Avidemux, but it only gave me incredibly blurry and washed out images with lots of artifacts, even if I was simply outputting to a visually lossless codec or converting the videos to one of my default household codecs and container beforehand. So next I tried Adobe PPro, where the issue could be easily fixed by setting a gamma filter from default 10 to 9, which then looks correct on my external RGB control monitor. Okay, exporting the gamma-fixed file from PPro...

But when I open the file with fixed gamma in VLC to play it back with my usual gamma setting for YUV videos, I notice that VLC's gamma filter also messes with color! Everything is shifted to green and yellowish, which is especially noticeable with the b/w films, but once I'd noticed, I also see it in the color footage. So I notice one downside to the VLC gamma filter is that you can only turn it on globally together with the hue filter, brightness filter, contrast filter, and saturation filter. I first suspected that the hue filter was set incorrectly, but fiddling with it only made matters worse, so I suppose that's not the issue.

It *SORTA* makes sense, remembering that unlike RGB, the bandwith or bitrate of each color channel is different in YUV, where green aka Y is the channel with the highest resolution or number of steps between clear white and clear black. None of this usually matters with all the proper YUV footage because the gamma ratio between all three channels is right, so the global gamma correction for all three channels in VLC for an RGB monitor will give me exactly what the raw footage looks like on a YUV monitor. But with RGB videos like this, all three channels have the same bitrate between clear black and clear white and thus relate differently to each other than they do in YUV, so it *SORTA* makes sense that gamma correction will result in an unwanted color shift here. But what's also weird is that I see no color shift at all in PPro when I'm correcting the RGB footage there, whether I'm shifting gamma up or down.

Anyway, so I figure I have to change the gamma in PPro for every single channel by means of the RGB color correction filter, in order to not only get proper gamma but also proper colors. Question: Do I do it on top of the global gamma filter from 10 to 9, or do I do it without that global gamma filter? If the default gamma on every channel on the RGB color correction filter is 1.00 and each slider has a minimum-maximum range from 0.10 to 9.99, how do I set each channel? The math in YUV and YCbCr looks too awfully complex for me. --2003:71:4F76:836:E846:992C:14E6:9380 (talk) 15:00, 20 June 2018 (UTC)[reply]

And just saying, the original files were in HD and the RGB footage was encoded as ITU-R BT.709 (as such that the colors and gamma are still RGB, i. e. show correct on an RGB monitor but not on a YUV monitor), but I'm going for a DV/MPEG SD destination, so I need the right values not for RGB to ITU-R BT.709 but for RGB to ITU-R BT.601. --2003:71:4F76:836:E846:992C:14E6:9380 (talk) 16:31, 20 June 2018 (UTC)[reply]