VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Hi, new to the forum and mostly a newbie to ffmpeg.

    I perform this quite simple encoding test using different input files: I choose x265, crf 28, and mkv as output container.

    Using the new 4.1.4 ffmpeg version the resulting files show up in MediaInfo as "Color Range: Limited".
    Using previous versions of ffmpeg, they don't.


    Can someone please explain what's changed in the new version (and maybe why)?
    Quote Quote  
  2. Your encodings were probably "limited range" all along. The only thing that's changed is it's now flagged by ffmepg and reported by MediaInfo.
    Quote Quote  
  3. This is one of the reasons I'm not a big fan of ffmpeg as my main encoder, they change things, you need to have a programmer lever to understand what is going on, etc. From what I understand from the x264 encoder, you can change that with "--range" set to "pc" (--range pc) will give the result you want.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Your encodings were probably "limited range" all along. The only thing that's changed is it's now flagged by ffmepg and reported by MediaInfo.
    Thanks for your answer, jagabo

    That was my suspicion: the only change being that new version is flagging it properly now... but I can't find any differences between old/new output files using ffprobe, so where's the new flag?

    Maybe ffprobe can't see it?
    Or maybe ffprobe could always see it but the flag is written now in a way MediaInfo can finally detect?
    Quote Quote  
  5. It may be related to removing uncertainty in ffmpeg:
    https://git.ffmpeg.org/gitweb/ffmpeg.git?a=search&h=HEAD&st=commit&s=Color+Range
    particularly this: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cb78d14cf9b5ab59b4a9177f390f5e1abff58644
    or similar changes in x265 code (to remove situation where unspecified\uncertain colour range is present in video).
    One of basic rules in good programming and in good HW design is to remove uninitialized/unspecified data and/or states.
    Quote Quote  
  6. Originally Posted by amaipaipai View Post
    This is one of the reasons I'm not a big fan of ffmpeg as my main encoder, they change things, you need to have a programmer lever to understand what is going on, etc. From what I understand from the x264 encoder, you can change that with "--range" set to "pc" (--range pc) will give the result you want.
    My input files are most probably "limited color range", too. They're xvid-avis and x264-mkvs. MediaInfo don't report them as limited, though.

    I have a DVD-to-xvid and a BluRay-to-x264 encoded files from a year ago. They don't show up as limited range but as far as I understand, at least the DVD should be. So MediaInfo isn't showing all the info properly, I suspect, and I don't know what other tool to use to get a confirmation on this.

    So... I can't say for sure if ffmpeg is encoding the file differently or, as jagabo said, it is only flagging it properly now.
    Quote Quote  
  7. Originally Posted by pandy View Post
    It may be related to removing uncertainty in ffmpeg:
    https://git.ffmpeg.org/gitweb/ffmpeg.git?a=search&h=HEAD&st=commit&s=Color+Range
    particularly this: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cb78d14cf9b5ab59b4a9177f390f5e1abff58644
    or similar changes in x265 code (to remove situation where unspecified\uncertain colour range is present in video).
    One of basic rules in good programming and in good HW design is to remove uninitialized/unspecified data and/or states.
    That's another possibility I've tried to confirm searching... but those commits seem to be pre-4.1.3 release... and I'm seeing this change in behaviour between versions 4.1.3 and 4.1.4.
    (I mean... encoding with 4.1.3 > no "limited range" found by MediaInfo, but enconding with latest 4.1.4 > "limited range" reported)
    Quote Quote  
  8. Yes, is possible to be just a flag thing, nothing to worry about.
    Quote Quote  
  9. Originally Posted by bokeron2020 View Post
    That's another possibility I've tried to confirm searching... but those commits seem to be pre-4.1.3 release... and I'm seeing this change in behaviour between versions 4.1.3 and 4.1.4.
    (I mean... encoding with 4.1.3 > no "limited range" found by MediaInfo, but enconding with latest 4.1.4 > "limited range" reported)
    Check source for x265 - x265 is external library not maintained by ffmpeg developers. Changes may be introduced in x265 and simply derived in ffmpeg as part of libx265. Also another explanation is that Mediainfo began to report colour quantization range - check your source pre and post change in some H.265 analyzer - VUI video_signal_type_present_flag & video_full_range_flag
    Last edited by pandy; 1st Aug 2019 at 12:54.
    Quote Quote  
  10. Originally Posted by pandy View Post
    Check source for x265 - x265 is external library not maintained by ffmpeg developers. Changes may be introduced in x265 and simply derived in ffmpeg as part of libx265. Also another explanation is that Mediainfo began to report colour quantization range - check your source pre and post change in some H.265 analyzer - VUI video_signal_type_present_flag & video_full_range_flag
    Hm, I forgot that. I'll have a look at x265 itself. Maybe that's where I should look for this "mistery". Thanks, pandy.

    By the way, any free-to-use or free-to-test tool you can recommend for a quick and newbie-friendly H.265 analysis?
    Quote Quote  
  11. Originally Posted by bokeron2020 View Post
    By the way, any free-to-use or free-to-test tool you can recommend for a quick and newbie-friendly H.265 analysis?
    Check this slightly outdated list:
    https://hdfpga.blogspot.com/2013/02/hevch265-analysis-tools.html
    Don't forget about Intel https://software.intel.com/en-us/video-pro-analyzer 9seem it was Intel product)
    and there is few other very similar projects
    https://sourceforge.net/projects/gtilhevcanalyzer/
    Quote Quote  
  12. Originally Posted by pandy View Post
    Originally Posted by bokeron2020 View Post
    By the way, any free-to-use or free-to-test tool you can recommend for a quick and newbie-friendly H.265 analysis?
    Check this slightly outdated list:
    https://hdfpga.blogspot.com/2013/02/hevch265-analysis-tools.html
    Don't forget about Intel https://software.intel.com/en-us/video-pro-analyzer 9seem it was Intel product)
    and there is few other very similar projects
    https://sourceforge.net/projects/gtilhevcanalyzer/
    Thanks for your help, pandy. I'll check those programs and learn quite bit more.
    It is clear that, at some point, you need to stop dong things just following a tutorial and start learning the basics carefully to get a better idea about what you're doing and why, and that's where I seem to be now with my simple video processing needs.
    Quote Quote  
  13. Originally Posted by bokeron2020 View Post
    ..... ffmpeg is encoding the file differently. ....
    Encoder can select range flag or not.

    But it doesn't matter what is set or not, encoder would encode in the same manner, using your YUV values in video and getting new YUV video. YUV values are not changed to limited or full. The only way to change YUV values would be after a conversion. But that is something else.

    That flag is only used and comes alive if video is converted to RGB on screen. Videoplayers look for that flag. Or they should. If there is no flag, most likely video player would assume limited YUV as input and full RGB as output.
    Quote Quote  



Similar Threads

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