VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I have used Handbrake to reencode a 1080p Blu-Ray source (VC-1) to mkv (AVC) using H.264 (x264).

    For the filters I have everything off / default - apart from Deinterlace = Decomb.

    I was taking screenshots of the video to test different RF settings.

    Comparing the source m2ts (1) with the handbrake encoded mkv - currently constant RF16 (2); but also with a third copy of the film (not created by me) that uses average bitrate 14 Mbps (3).

    I noticed that on playback on my laptop using Windows Media Player Classic (MPC-HC) that the color between 1 and 3 were the same, but 2 was different.

    When I play it back in VLC on my laptop the color for all three is the same; BUT all were much darker than all those played on MPC-HC.

    The Color Space for all three (checked using MediaInfo) is YUV.

    I understand that Luma standards come in to play here, as well as the Luma ranges.
    And that since I am viewing the videos on my laptop a different range (and color interpretation) will apply compared to viewing on TV:

    Luma values ranges:
    PC: 0-255
    TV: 16-235

    BT.601 - standard definition TV
    BT.709 - high-definition TV

    And looking at the MPC-HC options it seems to apply a series of Shaders on playback:

    Image
    [Attachment 61776 - Click to enlarge]


    I am assuming that VLC doesn't which is why they look (unacceptably?) darker in VLC, and MPC-HC using Shaders is trying to give the best color interpretation it can on a laptop.

    My question is do I need to worry about the inconsistenct in playback in MPC-HC?
    How would I make the color render the same on MPC-HC for all three versions of the video?
    Or is this irrelevant - that - it is how they render on my HD TV that is more important?

    Is there something in the video settings when I created my vid in Handbrake that is causing MPC-HC to treat it / render it differently?

    Are there better color settings to use with Handbrake (ffmpeg) to give better overall color rendering between different platforms (PC + TV)?

    Here is the MediaInfo for all three:

    1. M2TS Blu-Ray source
    Video
    ID : 4113 (0x1011)
    Menu ID : 1 (0x1)
    Format : VC-1
    Format profile : Advanced@L3
    Codec ID : 234
    Duration : 2 h 9 min
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy

    2. My Handbrake mkv using RF16
    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L5.1
    Format settings : CABAC / 16 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 16 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 2 h 9 min
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Writing library : x264 core 163 r3059 b684ebe0
    Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Default : Yes
    Forced : No
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    3. The mkv using Average Bit Rate 14 Mbps
    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.1
    Format settings : CABAC / 4 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 4 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 2 h 9 min
    Bit rate mode : Variable
    Bit rate : 14.0 Mb/s
    Maximum bit rate : 30.0 Mb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.282
    Stream size : 12.7 GiB (70%)
    Writing library : x264 core 138 r2358 9e941d1
    Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=1 / keyint=24 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=14020 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=30000 / vbv_bufsize=30000 / nal_hrd=vbr / ip_ratio=1.10 / aq=1:1.00
    Language : English
    Default : Yes
    Forced : No

    Is it the:
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709


    ...that MPC-HC is acting upon to render differently?


    Here are the screenshots:

    1. & 3. on MPC-HC
    Image
    [Attachment 61777 - Click to enlarge]


    2. on PC-HC
    Image
    [Attachment 61778 - Click to enlarge]


    All on VLC
    Image
    [Attachment 61779 - Click to enlarge]



    I just want to make sure that I have the color settings right on Handbrake / ffmpeg before spending months encoding my collection!!

    I did see a thread where there was mention of a 'full color' setting - wondering if that is what I should be using??

    https://forum.videohelp.com/threads/382129-FULL-color-setting-in-Handbrake-and-Vidcoder
    Quote Quote  
  2. yuv420 8bit limited range BT.709 1080p is the most common format in use for video today.

    However in all video players there is conversion to rgb and built-in processing. Check you haven't got a filter enabled somewhere.

    You are not applying any external shaders based on your mpc-hc screenshot (neither should you need to).
    Quote Quote  
  3. Thank you for your reply butterw.

    I think perhaps I need to look at the Encode settings as shown in the Media Info outputs and see if they give a clue to a filter that might be changing color on playback for 2.

    If anyone can spot anything obvious in these... ...please let me know.

    I think the answer lies in understanding ffmpeg more, than any settings in Handbrake.
    Quote Quote  
  4. See this post: https://forum.videohelp.com/threads/393083-Why-image-looks-so-different-between-MPC-HC...PV#post2550025

    Best practice is to use rec.601 (aka bt.601, smpte170m) for standard definition video and rec.709 (aka bt.709) for high definition video; limited range (Y=16 to 235, UV=16 to 240) for both. You should also flag the matrix and range in the endoder settings. With x264 CLI it's one of the following:

    Code:
    --colorprim smpte170m --transfer smpte170m --colormatrix smpte170m   --range=tv
    Code:
    --colormatrix=bt709 --colormatrix=bt709  --colormatrix=bt709  --range=tv
    For proper playback usually only the --colormatrix parameter is required.

    in ffmpeg:
    Code:
    -colorspace bt709 -color_range tv
    That will give you the best chance of the video playing properly. But some players or graphics cards will will still display them incorrectly. It's jungle out there.

    Also, with older graphics cards only one player can use "video overlay" at a time -- the first player that starts up. On such a device the same video with two instances of the same player with the same settings may look different as one gets video overlay (hardware YUV to RGB conversion), the other uses software YUV to RGB conversion.
    Quote Quote  
  5. mpc-hc (and mpc-be) are directshow based players unlike vlc (and mpv).
    both players have many settings >> for troobleshooting going back to defaults is probably best.

    the basic display chain in mpc-hc is:
    built-in LAV filters >> renderer >> RGB surface
    typically using Dxva2 hardware acceleration.
    Quote Quote  
  6. Originally Posted by holgrave View Post
    I understand that Luma standards come in to play here, as well as the Luma ranges.
    And that since I am viewing the videos on my laptop a different range (and color interpretation) will apply compared to viewing on TV:

    Luma values ranges:
    PC: 0-255
    TV: 16-235
    The difference is, a TV traditionally expects TV range at it's input, which it then expands to full range.
    PC displays traditionally expect a full range input so the limited range video should be expanded to full range before it's sent to the display.
    These days things are a bit more murky because HDMI inputs on a computer display usually default to expecting TV range, while traditional PC inputs (VGA, DVI) should expect full range. And most TV's these days have a HDMI input or two that can be configured for full range (possibly only for an RGB input rather than YUV). For my Samsung TV the setting is labelled "HDMI Black Level" and the choices are "low" and "normal", and even though to me it completely defies logic, "normal" is the full range input setting. As long as there's no mismatch though (TV range output to TV range input, or full range output to full range input) the video should look the same.

    Of course on a laptop screen there's no connection between another device and display as such, so you just need to ensure the player or the video card is expanding the levels.

    The first place to check is in your video card's control panel. If any picture enhancing crap for video is enabled (dynamic contrast etc), disable it. As MPC-HC is a DirectShow player the video card can have a major effect on how the video looks, but I don't think it'll touch VLC's video.

    When you save a screenshot with MPC-HC (using the "File/Save Image" menu) I'm pretty sure MPC-HC saves a screenshot of the untouched video converted to full range (images are full range). If the saved screenshot looks different to what you're seeing when you're viewing the video, something's wrong or messing with it or both. My money's on your video card because the difference between the MPC-HC and VLC screenshots look way more than a limited/full range levels mismatch to me.
    Last edited by hello_hello; 20th Nov 2021 at 20:08.
    Quote Quote  



Similar Threads

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