VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Ripping my hair off...
    Originally I just wanted to re-encode several videos to HEVC to save disk and cloud space. I used to do it before with no problems (subjective quality remained the same, but the size was greatly reduced). However, videos shot with Xiaomi 9T Pro seem to be a problem for HandBrake, after encoding to not just HEVC, but any offered format or any kind of profile, any quality, result video is always slightly greyed out, just like the contrast of the picture was lowered, see attached images.
    Additionally, I have noticed that the original video is also grayed out (the same way) when played in the basic Windows video player - but VLC or Ace players are OK (WTF, how is this possible...).
    I am also attaching the MediaInfos, but I have tried many parameters and configurations, meddling with color matrices and ranges, however, to no sucess Does anyone know what this is about?

    Thank you very much for any effort.

    HandBrake 1.1.0
    Image Attached Thumbnails Click image for larger version

Name:	orig.png
Views:	336
Size:	2.36 MB
ID:	51146  

    Click image for larger version

Name:	encoded.png
Views:	331
Size:	2.47 MB
ID:	51147  

    Image Attached Files
    Quote Quote  
  2. Just updated Handbrake to 1.3.0.
    Issue still persists
    Quote Quote  
  3. This 1st one is actually incorrect playback and screenshot . It's full range decoded and displayed incorrectly as standard range by your player. You can see the blown out levels, loss of detail in the highlights and shadows such as the cave. You might "like" the contrast, but it's technically incorrect

    The 2nd one is handbrake clamping full to limited range. So all players will play it like that (standard range decoded as standard range). That's what the image is supposed to look like. All players will play that correctly

    If you wanted it like the original (some players will play it correctly, some will not) , then you'd need to encode it full range, and flag it full range. It's possible with other software, it should be possible in handbrake with the extra option. But the command line syntax is a bit different
    Quote Quote  
  4. Thank you very much for clarification. It now makes sense at least.
    I don't understand why a player like VLC would play it incorrectly, but whatever.
    So I will convert them to standard range, even if I don't like the picture of some (namely the cave pass; it should be dark down there).

    Just out of curiosity, how would it be possible to keep the full range in HandBrake?
    You say that it should be possible in handbrake with the extra option.
    I tried using "range=full". That was reported as full range in MediaInfo, however playback in VLC was still gray - so now it was decoded correctly to standard range?
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    This 1st one is actually incorrect playback and screenshot . It's full range decoded and displayed incorrectly as standard range by your player. You can see the blown out levels, loss of detail in the highlights and shadows such as the cave. You might "like" the contrast, but it's technically incorrect
    I can't believe it's taken me this long to realize something, your brain and my brain process images (and logical train of thoughts, for that matter) very differently.

    To your eyes (and way of thinking) the 1st one, which is the original source that came out of the camera, is the "incorrect" one and shows "loss of detail in the highlights and shadows such as the cave" but the 2nd one, that has been encoded with a lossy encoder is the "correct" one and by logical implication of your critique of the first one, is more detailed. How exactly does this work in your mind?

    You seem to be implying that you believe it's possible to shoot video with a camera, take that footage, encode it with a lossy encoder, such as those found in Handbrake and somehow end up with a more detailed picture, sans the application of any filters and with the encoded picture having lower contrast than the original.

    I know that there's going to be handful of regulars here that will agree with your assessment, but I would really like to know the logical twists your mind(s) take to arrive at a conclusion such as this.

    As it stands now, I know you would hate any content I produce and I'm fairly certain I would hate any content you would produce, but I really want to understand the nature of the disconnect that exists between reason, logic and your belief systems as they relate to video.

    Thanks.
    Quote Quote  
  6. Originally Posted by sophisticles View Post

    You seem to be implying that you believe it's possible to shoot video with a camera, take that footage, encode it with a lossy encoder, such as those found in Handbrake and somehow end up with a more detailed picture, sans the application of any filters and with the encoded picture having lower contrast than the original.
    This is wrong interpretation. He is implying that it is possible to shoot a video with a camera, that is in some video players (such as VLC) played incorrectly, but after processing the video with an encoder, the video is played correctly in every video player. Incorrect display of the video causes details to be lost (details that lie in the zone between full and standard color range).
    Quote Quote  
  7. Originally Posted by vitexikora View Post
    I don't understand why a player like VLC would play it incorrectly
    VLC is very poor in this regard. It almost always uses a limited range rec.601 matrix to display YUV video. So your full range rec.601 source will be displayed with the wrong levels. Rec.709 videos are also displayed with the wrong colors.
    Last edited by jagabo; 19th Dec 2019 at 08:48.
    Quote Quote  
  8. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Originally Posted by sophisticles View Post
    Originally Posted by poisondeathray View Post
    This 1st one is actually incorrect playback and screenshot . It's full range decoded and displayed incorrectly as standard range by your player. You can see the blown out levels, loss of detail in the highlights and shadows such as the cave. You might "like" the contrast, but it's technically incorrect
    I can't believe it's taken me this long to realize something, your brain and my brain process images (and logical train of thoughts, for that matter) very differently.

    To your eyes (and way of thinking) the 1st one, which is the original source that came out of the camera, is the "incorrect" one and shows "loss of detail in the highlights and shadows such as the cave" but the 2nd one, that has been encoded with a lossy encoder is the "correct" one and by logical implication of your critique of the first one, is more detailed. How exactly does this work in your mind?

    You seem to be implying that you believe it's possible to shoot video with a camera, take that footage, encode it with a lossy encoder, such as those found in Handbrake and somehow end up with a more detailed picture, sans the application of any filters and with the encoded picture having lower contrast than the original.

    I know that there's going to be handful of regulars here that will agree with your assessment, but I would really like to know the logical twists your mind(s) take to arrive at a conclusion such as this.

    As it stands now, I know you would hate any content I produce and I'm fairly certain I would hate any content you would produce, but I really want to understand the nature of the disconnect that exists between reason, logic and your belief systems as they relate to video.

    Thanks.
    You have already made your lack of understanding of PC range and TV range very clear in that other thread you posted, and I see nothing has changed since then.

    OP's camera encoded the video to PC range (my cellphone does the same), OP then decoded the source in TV range which was wrong and caused clipped whites and blacks. OP then took that source and passed it through handbrake, which must have seen a PC range flag and then converted it to TV range correctly. Allowing OP to decode the newly encoded video correctly without having to do anything more.

    OP's source video is actually fine, it was simply decoded wrong as few video decoders expect PC range content besides maybe idiot proof Handbrake it appears.
    Quote Quote  
  9. Originally Posted by sophisticles View Post


    To your eyes (and way of thinking) the 1st one, which is the original source that came out of the camera, is the "incorrect" one and shows "loss of detail in the highlights and shadows such as the cave" but the 2nd one, that has been encoded with a lossy encoder is the "correct" one and by logical implication of your critique of the first one, is more detailed. How exactly does this work in your mind?
    This is how cameras and encoding work. It's limited range vs. full range. Read up on it

    The original source has more detail 0-255 because it's full range. But because of how some video players incorrectly display for RGB, you only see a part of the data. It's not handling the data or flags correctly

    You seem to be implying that you believe it's possible to shoot video with a camera, take that footage, encode it with a lossy encoder, such as those found in Handbrake and somehow end up with a more detailed picture, sans the application of any filters and with the encoded picture having lower contrast than the original.

    The original video has values 0-255 in YUV . VLC is only displaying 16-235 of those values and converting them to 0-255 RGB for display. That's full range original YUV camera values, but it clipping 0-15, 236-255. You lose all that data on display. It's not showing the bright highlights or dark shadows (it's still there in the original video, it's just discarding them when converting to RGB for display)

    Full range video and proper full range displays or "maps" YUV 0-255 to RGB 0-255 .

    Handbrake is converting full range to limited range. It's "squeezing" YUV 0-255, to Y 16-235, UV 16-240 . That's "standard" range . Not clipping, but "squeezing". So all that data is just squished but visible between Y16-235 UV 16-240 (which get "mapped" back to RGB 0-255 on display)
    Quote Quote  
  10. Originally Posted by sophisticles View Post
    You seem to be implying that you believe it's possible to shoot video with a camera, take that footage, encode it with a lossy encoder, such as those found in Handbrake and somehow end up with a more detailed picture, sans the application of any filters and with the encoded picture having lower contrast than the original.
    Hopefully not too many people have read your comment and it'll be a distant memory fairly soon. Still embarrassing, but hopefully forgotten.
    Quote Quote  
  11. Originally Posted by vitexikora View Post
    I tried using "range=full". That was reported as full range in MediaInfo, however playback in VLC was still gray - so now it was decoded correctly to standard range?
    You probably should let Handbrake convert to TV range so you won't have playback issues. A hardware player might expect limited range video and could possibly ignore the full range flag.
    I thought "range=full" only saved the info to the video stream for a player to use, without changing whether Handbrake is converting the levels, but the log will tell you when it's converting. If you're seeing the "greyed out" version after encoding I think it's displaying correctly. I don't use Handbrake so I don't know much else about it.

    For the record, pretty much all video that's not RGB is limited range. Displays are full range, but they often expect limited range input and expand the levels to full range themselves. PC's are traditionally full range so when you save a screenshot of a video as a jpeg it should be converted to full range as required.
    VGA and DVI outputs/inputs are always full range. Or they should be. HDMI is likely to be limited range, so make sure your inputs/outputs match. It's possible you're not seeing the correct levels normally, but check the video card's control panel. There might be two level options, one for desktop and one for video. Also check your display's options. The setting is often referred to as HDMI black level.

    VLC seems to be getting it right for the full range encode, but didn't know the source was full range. I wonder if your inputs/output are set to limited range? I think it'd explain why the source looked the way it did in VLC. Full range would need to be converted to limited range for playback (before being converted back to full range by the display). It doesn't matter too much what the input/output levels are as long as they're the same.
    What VLC does would probably be independent of any video card settings, unlike DirectShow media players. Try a few players if you change settings to make sure the video displays the same way.
    Last edited by hello_hello; 20th Dec 2019 at 05:47.
    Quote Quote  
  12. Originally Posted by KarMa View Post
    You have already made your lack of understanding of PC range and TV range very clear in that other thread you posted, and I see nothing has changed since then.
    I hadn't seen that thread until now, but.... wow.... sophisticles has dwindled his credibility to zero in the past, but if it's possible, he's achieved negative credibility now. I wonder if he's seeing the correct levels with his setup?
    Quote Quote  
  13. I just tested it and it looks like handbrake can't do it, the actual levels remain clamped even though flagged as full

    fullrange=on flags it full, but HB is still clamping Y to 16-235 actual levels (wrong levels for the flag)

    You can do it with other software, x264 directly, or ffmpeg, or some other GUI like megui
    Quote Quote  



Similar Threads

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