VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 16 of 16
  1. I've been trying to work out why You Tube changes the colours of some of my uploaded clips....

    If I create the single line Avisynth script "ColorBarsHD()" and open that in AvsPmod with the default YUV->RGB video settings -
    (i.e Resolution based - TV levels - Progressive)
    then the resulting video file displays correctly on my monitor, with the 75% levels as outlined in the attached spec sheet. And all the B&W and greyscale levels are right too.

    But try as I may -- and I think I have tried every combination of colourspace conversion and file format I can think of - I cannot get those bars to display with the correct levels when uploaded to You Tube. The grey levels are correct, but the colours are always shifted.... and of course depending on which outrageous conversion I may have tried, those shifted levels can vary as well.
    But they're never right... at least not so far...

    I realise I'm doing something stupid, but I'm one of those who can find the dozens of colourspace and level conversion options discussed here on the forum very, very confusing...

    So in this specific example, how would I get You tube to display these 75% HD colorbars at their correct levels?....
    Image Attached Thumbnails 75% color bar levels.pdf  

    Click image for larger version

Name:	color bars.png
Views:	3473
Size:	37.2 KB
ID:	35988  

    Last edited by pippas; 3rd Mar 2016 at 08:15. Reason: Adding screen cap
    Quote Quote  
  2. ColorBarsHD() returns rec.709 colors and levels. To display that properly it should be converted to RGB with ConvertToRGB(matrix="rec709"). You will lose superblacks and superwhites.

    When given YUV video Youtube will not convert levels or colors. When given RGB Youtube will convert to YUV with a rec.709 matrix.

    Different computers may display Youtube's YV12 videos differently -- depending on the player being used, and the graphics card settings. This can also be a problem when playing local files.
    Quote Quote  
  3. Thanks for the replies and information ... I shall experiment further.

    Surely I'm not the only one who finds this whole 'colour' business with its many, many variables a difficult one to get your head round??
    Quote Quote  
  4. Formerly 'vaporeon800' Brad's Avatar
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Search PM
    There are tons of threads, here and on Doom9, where people have tried to wrap their heads around how to get YouTube video to display with the correct matrix conversion. Often one browser/Flash combination on their computer will display things properly, while another on the same computer will differ.
    Quote Quote  
  5. Some general rules:

    Use rec.601 for SD video.

    Use rec.709 for HD video.

    Flag the matrix in your video when possible. For example, in x264 flag rec.709 with --colormatrix=bt709, rec.601 with --colormatrix=bt470bg. This doesn't guaranty proper playback but gives you a better chance.
    Quote Quote  
  6. This may be a stupid question, but are you certain that what you uploaded to Youtube doesn't have a color shift? I am at the point now where I don't trust Avisynth, VirtualDub, Premiere Pro, ffmpeg, or any program to not introduce some sort of unknown color shift long before my video even gets to Youtube.
    Quote Quote  
  7. Originally Posted by jagabo View Post
    When given YUV video Youtube will not convert levels or colors.
    The exception is when given full range YUV, flagged as full range YUV - it will clamp the re-encoded video. This is new behaviour within the last year or two
    Quote Quote  
  8. @pippas - the way you debug this is systematically

    First use stats for nerds and check what video you're actually "seeing" or being served. Different browsers may get different versions of the video. For example, chrome typically gets VP9 if available preferentially. Devices may get different videos (typically lower res versions)

    Download the video from youtube and compare locally. The default avspmod settings will use Rec709 based on resolution, but you can control this manually by specifying ConvertToRGB(matrix="rec709") to be sure when viewing. If it's the same as the upload (it should be if it's not flagged and standard range), you can rule out everything except a display configuration issue

    But display configuration issues can be 100's of different permutations depending on local setup where something might be different - (ie. how the YUV video is displayed - converted to RGB for display) . OS, Browser version, Flash version, GPU on vs off, GPU driver version, GPU settings, etc... It's not easy - you have to go one by one

    And if you want to rule out youtube specifically , test flash (or HTML5) playback locally in a HTML page
    Quote Quote  
  9. Fully agree - web browser is not a media player - only one way to verify if video (OK or not) is by downloading video locally from YT.
    Quote Quote  
  10. Originally Posted by SameSelf View Post
    This may be a stupid question, but are you certain that what you uploaded to Youtube doesn't have a color shift?.
    I use the simple color picker to check the before and after...this freebie works well enough : http://colorcop.net/?homepage
    That at least lets me see whether the clip as presented looks the same.

    I have now followed Jagabo's advice, added the recommended line to the AviSynth script and uploaded a short ColorBarsHD clip to You Tube, which displays pretty much as the original.

    See here:https://www.youtube.com/watch?v=LJjiLu-hf1s

    So thanks for that advice Jagabo....all fairly straightforward if you know what you're doing. (Sadly, for the most part, I don't )

    I thought I had tried something similar, but obviously not. You have to admit though, this colour business can be a bit of a minefield.

    Not made any easier here in the UK when I keep writing 'colour' into scripts in stead of 'color'. That just throws up errors of course!...
    Last edited by pippas; 3rd Mar 2016 at 12:20.
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    @pippas - the way you debug this is systematically

    First use stats for nerds and check what video you're actually "seeing" or being served. Different browsers may get different versions of the video. For example, chrome typically gets VP9 if available preferentially. Devices may get different videos (typically lower res versions)

    Download the video from youtube and compare locally. The default avspmod settings will use Rec709 based on resolution, but you can control this manually by specifying ConvertToRGB(matrix="rec709") to be sure when viewing. If it's the same as the upload (it should be if it's not flagged and standard range), you can rule out everything except a display configuration issue

    But display configuration issues can be 100's of different permutations depending on local setup where something might be different - (ie. how the YUV video is displayed - converted to RGB for display) . OS, Browser version, Flash version, GPU on vs off, GPU driver version, GPU settings, etc... It's not easy - you have to go one by one

    And if you want to rule out youtube specifically , test flash (or HTML5) playback locally in a HTML page
    Thanks for those tips PDR. As I mentioned in my earlier post... this really is a minefield!!

    I shall download and keep the tips from this thread. I'm bound to forget the details otherwise.....
    Quote Quote  
  12. jagabo was suggesting that ConvertToRGB(matrix="rec709") only to preview , not to encode. If you uploaded an RGB version it looks like you stumbled on another current YT problem. I verified this is the case at least for today - it looks like YT is encoding the RGB source to YUV in the re-encode RGB to YUV with 601, and your display is using 601 in the browser. So "2 wrongs make a right" and it ends up looking ok on your system (it's getting 601 treatment both ways) . If you download the uploaded video, it will look "wrong" in a media player because the video was actually converted to YUV with 601, not 709
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    .. If you download the uploaded video, it will look "wrong" in a media player because the video was actually converted to YUV with 601, not 709
    Correct...the downloaded file plays wrongly.

    To create the original file, the AviSynth script is only 3 lines long:

    Code:
    ColorBarsHD()
    ConvertToRGB(matrix="rec709")
    Trim(1,250)
    Opening that script in Vdub displays with the correct values. (that's unusual in itself!).

    I encoded using the x.264vfw codec, with a single pass and CRF of 18. I assumed the colorspace was now RGB, and selected 'keep input colorspace'.

    That file reports a colorspace of YUV4:2:2 in Mediainfo, and YV24 with Avisynth 'info'

    Upload that file to You tube, and it displays 'correctly'.

    If I play that file with various local players, it's all over the place:

    WMP - audio only....
    MPC-HC - colors and greys are both wrong.
    VLC - colors and greys both right (as You tube)
    Vdub - colors wrong - greys right

    I downloaded the file, as encoded by You Tube (it's now an mp4 - uploaded originally as an AVI)

    That file reports a colorspace of YUV4:2:0 in Mediainfo, and YV12 with Avisynth 'info'

    If I play that file locally, it's again all over the place - but differently!

    WMP -colors wrong - greys right
    MPC-HC - colors wrong - greys right
    VLC and Vdub - colors and greys both right (as per You Tube).

    I've attached a copy of both files below.

    I really think I'm a bit out of my depth here. I find this 'color minefield' really difficult to take in. I think I shall use the advice you and Jagabo have given me, and create different versions of my clips for different requirements. One for local replay, and one to upload to You Tube.

    At least I now know I can now upload a version to You Tube that displays correctly.. so thanks again for the information on how to do that.

    How much of this is dependant on the original format of any given video file, I shall need to check out further?

    The color bars created by my own camera are certainly in a different 'format' from the AviSynth generated ones, and require a completely different set of encoding parameters to display correctly on You Tube.

    All interesting experiments though...
    Image Attached Files
    Quote Quote  
  14. To be clear, those earlier comments assumed you uploaded an RGB video. I tested with an RGB video (encoded with --input-csp rgb --output-csp rgb in x264 , after ConvertToRGB24(matrix="rec709") ) , mediainfo will report RGB if you are using a version within the last year or so

    What you "see" later might change, because it's actually converted incorrectly. "Best practices" is actually to upload the proper video, and if youtube or some other host configuration screws it up - too bad. You don't make a "wrong" video on purpose and hope it looks right

    If you used vdub and x264, with YUV input, vdub it will convert YUV to RGB using Rec601 (wrong colors again) , unless you use "fast recompress". The reason you see correct colors with that script is you are doing the RGB conversion in avisynth instead of vdub, specifying 709. But x264vfw will also convert RGB to YUV using Rec601 (wrong colors), because you encoded YUV , not RGB
    Quote Quote  
  15. Thanks for this extra information. I shall need to take little while to take it all in.

    For the record, I did encode as 'Fast recompress'.

    The only things I changed from the default config in X.264 was CRF to 18, tick the 'VirtualDub Hack' box and changed the 'Convert to YUV2 4:2:0' box to 'Keep input colorspace' .

    EDIT: Changing the 'Keep input colorspace' box in x.264 cinfig. to 'Keep/AcceptRGB' produces a better result.
    The file reports as 4:4:4 RGB, and that version still looks fine on You tube. It's also much better on local players.

    Thanks again for your help and advice.
    Last edited by pippas; 3rd Mar 2016 at 16:23.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!