View Full Version : How to properly prepare HD video for Youtube
czerro
31st December 2012, 10:08
Just getting into LP'ing and did a couple test runs on youtube and noticed an issue alot of you are probably familiar with. Youtube seems to do a bad color space conversion resulting in blacker than black/whiter than white with HD h264. I seem to have got around this by converting my Playclaw capture from MJPEG to Lagarith YV12. Lags seems to do the conversion correctly while maintaining correct colors with a lossless result. From there I can encode to h264 and this file looks proper once uploaded to youtube.
I imagine this same process can be serviced frameserving through Avisynth: ConvertToYV12 and perhaps ColorMatrix if needed.
Hope this is helpful to anyone running across this issue. It isn't stated anywhere what color space and coefficient matrix Youtube uses on their tutorial page (kinda a glaring oversight?), but I believe its YV12/Rec. 709.
So instead of washing out your image messing around with gamma and saturation values like a lot of tutorials regarding this subject will recommend, instead try either of the above two solutions.
TheSkiller
31st December 2012, 11:46
If your uploaded video uses TV range and Rec.709 color coefficients, it will look exactly like it is supposed to, both on YouTube and offline.
Do not use PC range, even if the video stream is correctly flagged to be PC range, YouTube ignores that and assumes TV range.
Check your ranges with Histogram("levels"), nothing should show up in the two red areas.
If you're coming from a RGB source (computer game capture), ConvertToYV12(matrix="Rec709") will do that.
And here's what I found out about the color coeffiecients:
YouTube never converts the color coefficients between Rec.601 and 709, they are always left untouched, but upon playback 709 is always assumed as it seems and therefore anything that uses 601 shows up with slightly wrong colors. It does not matter whether the uploaded video is SD or HD. There's just one exception – watching in 240p mode, where only a video using 601 gives correct colors for whatever reason (try it, switch from anything higher than 240p to 240p and the colors will change, look at strong reds especially).
I guess nobody really notices it because it is hard to spot without a comparison.
I'm horrified by the fact that YouTube hasn't addressed this issue yet, considering it has been there for years now (it started when they introduced HD). It means every Rec.601 video they have, which are pretty much all the SD videos ever uploaded to this day, are displayed with wrong colors.
czerro
31st December 2012, 12:03
If your uploaded video uses TV range and Rec.709 color coefficients, it will look exactly like it is supposed to, both on YouTube and offline.
Do not use PC range, even if the video stream is correctly flagged to be PC range, YouTube ignores that and assumes TV range.
Check your ranges with Histogram("levels"), nothing should show up in the two red areas.
If you're coming from a RGB source (computer game capture), ConvertToYV12(matrix="Rec709") will do that.
And here's what I found out about the color coeffiecients:
YouTube never converts the color coefficients between Rec.601 and 709, they are always left untouched, but upon playback 709 is always assumed as it seems and therefore anything that uses 601 shows up with slightly wrong colors. It does not matter whether the uploaded video is SD or HD. There's just one exception – watching in 240p mode, where only a video using 601 gives correct colors for whatever reason (try it, switch from anything higher than 240p to 240p and the colors will change, look at strong reds especially).
I guess nobody really notices it because it is hard to spot without a comparison.
I'm horrified by the fact that YouTube hasn't addressed this isse yet, considering it has been there for years now (it started when they introduced HD). It means every Rec.601 video they have, which are pretty much all the SD videos ever uploaded to this day, are displayed with wrong colors.
Wow, thanks for the quick clarification. It's insane that Youtube hasn't addressed exactly what their specification is yet. It should be right there in the Supported container/video format support page!
Why would anything ASSUME 709? The information is in the header! You don't have to ASSUME anything. The Youtube encoder never looks at this info? This is so strange and aggravating.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.