VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. By any means other than by using a lossless or near lossless encoder?

    I'm here to tell you that surprisingly enough, it is.

    Over the past month I have been working on a wide ranging encoding test, covering x264 with all variants (8/10 bit, 420/422/444) and configurations (crf/qp/vbr/1pass/2pass); I did the same for x265, svt-hevc, svt-av1, qsv, vp9, using 6k content.

    The tests were done using Staxrip, Hybrid, Handbrake, Avidemux, on Windows 10 and Ubuntu.

    For quality assessment i used MSU's Video Quality Measurement Tool to calculate PSNR, VMAF, SSIM and MS-SSIM.

    I have done hundreds of test encodes and hundreds of quality assessments.

    I learned a lot.

    For one, my system isn't fast enough to reliably encode 6k svt-av1 or even calculate metric for that matter. My primary laptop has an i5-1035G1 that runs less than 2gz at all times, even during encodes, due to the power settings I choose. It has 16gb ram, an NVMe and an SSD, runs Win10 and Ubuntu and is my daily driver.

    I have a desktop with 16gb ddr4, a Ryzen 1600, a couple of SSD's, and a Fermi based Nvidia Quadro running LMDE.

    Encoding 6k svt-av1 eats up somewhere in the neighborhood of 12gb ram, depending on the settings and the source. This would result in constant crashes using Handbrake, Hybrid and Staxrip on Windows and Handbrake/Hybrid would crash on Ubuntu.

    When I was able to encode 6k svt-av1, it was impossible to calculate VMAF because the ram usage was so high it would crash MSU's tool; SSIM and PSNR calculations would complete just fine.

    Long story short, if you plan on encoding 6k and above av1, either use a hardware encoder or get a lot more ram than 16gb.

    During one of my test encodes I came across an interesting result, that basically changed the way I view encoding.

    I downloaded every file BM has on their site, ProRes and RAW and for the purposes of this discussion, we will be focusing on the ProRes version of Running Action found on this page, AKA Action Sport:

    https://www.blackmagicdesign.com/products/blackmagicpocketcinemacamera/workflow

    This file is 6144x2560 2.40:1 stuffed inside a 6144x3456 16:9 frame, meaning there are 448 pixels top and bottom that in theory need to be cropped out, which is what I wan initially doing. The problem is that I was getting some weird distortions with some test encodes and the ones that weren't distorted did not look that great and the objective metrics agreed.

    I decided to just encode it with Staxeip, no cropping, qsv hevc, with these parameters:

    --quality best --colormatrix bt709 --colorprim bt709 --transfer bt709 --fallback-rc --fixed-func --cqp 25:26:27

    I then used MSU's tool but configured it to not include the 448 pixels top and bottom that are black and most people would crop out.

    The results were so surprising, I initially thought the tool was malfunctioning, that I had discovered a bug. MSU's tool displays the results per frame in real time and when checking the VMAF scores I was seeing a perfect 100 for each frame. This should not be possible unless it's lossless.

    When the calculations where complete, i checked the stats:

    Min Value, 98.43783569
    Max Value 100

    Even more impressive was that out of 1367 frame, 1364 achieved a score of 100.

    Needless to say i was doubting these results, so i did PSNR, SSIM and MS-SSIM as well:

    PSNR
    Min Value 55.44417953
    Max Value 57.24985123

    SSIM
    Min Value 0.977662027
    Max Value 0.981496513

    MS-SSIM
    Min Value 0.976324201
    Max Value 0.981666148

    This in a file that is less than 100mb for nearly a minute worth of footage, that means that you could encode a pristine 6k full length movie at between 8 and 9 GBs.
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I would expect that 100mb/min HEVC would look pretty darn good. That is a lot of data!
    Quote Quote  
  3. Originally Posted by Alwyn View Post
    I would expect that 100mb/min HEVC would look pretty darn good. That is a lot of data!
    Not really, it works out to 13.6 mb/s.

    For perspective, dvd mpeg2 was max 9.8 mb/s, 1080p bluray is about 25 mb/s, uhd bluray can be up to 100 mb/s and Netflix uses about 15 mb/s for its 4k content.
    Quote Quote  
  4. Lots of scenes with out of focus background/slow motion/motion blur. And only 24 FPS. No wonder it take such a low bitrate. Try something more complex and you would get 5x more
    Quote Quote  
  5. This should not be possible unless it's lossless.
    Are you sure that VMAF score of 100 implies lossless?
    (at least a few years ago when I read about VMAF this was not the case; yes, 100 was the max, but it did not necessarily imply lossless)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Originally Posted by Selur View Post
    Are you sure that VMAF score of 100 implies lossless?
    It definitely does not. If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone -- in every frame of real video.
    Quote Quote  
  7. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone
    "The perfect encode", then
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Originally Posted by Selur View Post
    Are you sure that VMAF score of 100 implies lossless?
    It definitely does not. If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone -- in every frame of real video.
    How did you determine this?

    I do not have a 6k monitor, nor a 5k, nor a 4k, not even a 2.5k, all I have is a laptop hooked up to a 50 inch 1080p tv and my desktop is likewise connected to a 32 inch 1080p tv.

    As such, I have to rely on objective metrics.

    Of course that would explain the MS-SSIM and SSIM scores.
    Quote Quote  
  9. Originally Posted by sophisticles View Post
    Originally Posted by jagabo View Post
    Originally Posted by Selur View Post
    Are you sure that VMAF score of 100 implies lossless?
    It definitely does not. If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone -- in every frame of real video.
    How did you determine this?
    I loaded both videos into AviSynth and cropped them down to a size I can view without scaling.
    Quote Quote  
  10. Or crop a rectangle you wish, and blow it up using Point resize, you can have literally four pixels on you monitor this way to compare, to see details.
    Quote Quote  
  11. Originally Posted by jagabo View Post
    Originally Posted by sophisticles View Post
    Originally Posted by jagabo View Post
    Originally Posted by Selur View Post
    Are you sure that VMAF score of 100 implies lossless?
    It definitely does not. If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone -- in every frame of real video.
    How did you determine this?
    I loaded both videos into AviSynth and cropped them down to a size I can view without scaling.
    To me that seems like faulty way to determine quality.

    Wat size did you crop them down to? How do you know that the sections you cropped out did not have significantly more fine detail and grain?

    Further, while this was done using qsv hevc, av1 is celebrated as being innovative because it removes grain during the encode to save bits only to add them back during playback as a filter, yet in this instance removing grain is somehow a bad thing.

    If anyone wants to do better, using any encoder they choose, feel free to show a "better" encode so long as the same parameters that I used are adhered to, the resolution must be unchanged from the source and the file size must be 100 mb or less.

    I want to see x264, x265 or vp9 manage a score of 100 VMAF per frame for nearly the whole file.

    I expect svt-av1 to be able to do it, but again, ram.
    Quote Quote  
  12. Originally Posted by sophisticles View Post
    Wat size did you crop them down to? How do you know that the sections you cropped out did not have significantly more fine detail and grain?
    Use avisynth, vapoursynth previewers where you can zoom in, zoom out, repeat!
    Quote Quote  
  13. Originally Posted by sophisticles View Post
    Originally Posted by Alwyn View Post
    I would expect that 100mb/min HEVC would look pretty darn good. That is a lot of data!
    Not really, it works out to 13.6 mb/s.
    13.6 millibits per second is next to nothing. You could at least use santibits.
    Quote Quote  
  14. comparisons of just first frame I could come up with randomly, to see texture of clothes:
    frame 140, crop clip = clip.std.CropAbs(width=768, height=432, left=1012, top=1074); numpy_crop[1074:1506, 1012:1780]
    so this is selected crop:
    Image
    [Attachment 69429 - Click to enlarge]

    this is original (not 1:1, but anyway, good enough for comparison)
    Image
    [Attachment 69430 - Click to enlarge]

    and this is encoded part:
    Image
    [Attachment 69431 - Click to enlarge]
    Quote Quote  
  15. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    And the difference is evident: https://imgsli.com/MTU3ODYw (but we are talking about a zoom-in)
    Quote Quote  
  16. Yes, one has to zoom in, to actually see what is going on with texture ...
    But op says cropping is a "faulty way to determine quality". So that is why I posted it. To not look what I got?
    Quote Quote  
  17. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    So that is why I posted it.
    You did well and I agree with you 100%
    Quote Quote  
  18. Originally Posted by sophisticles View Post
    Originally Posted by jagabo View Post
    Originally Posted by sophisticles View Post
    Originally Posted by jagabo View Post
    Originally Posted by Selur View Post
    Are you sure that VMAF score of 100 implies lossless?
    It definitely does not. If you download the original and sophisticles' reencoded video you'll see all the grain and fine details are gone -- in every frame of real video.
    How did you determine this?
    I loaded both videos into AviSynth and cropped them down to a size I can view without scaling.
    To me that seems like faulty way to determine quality.
    No, it's your method of examining it that is faulty.

    When you scale it down to 1920x1080 you scale down the compression artifacts as well as the details.

    Pretend you have a 1920x1080 BD. You watch it scaled down on a SDTV . Do you think you can "see" all the "HD" details in the original BD on that SDTV ? It's silly to think so. That is similar to your viewing method

    But if you view it at 1:1, and pan around, you can see each full pixel at it's actual quality, not a resampled version

    Further, while this was done using qsv hevc, av1 is celebrated as being innovative because it removes grain during the encode to save bits only to add them back during playback as a filter, yet in this instance removing grain is somehow a bad thing.

    The claim was "pristine" - That implies near lossless.

    Removing grain and details is a bad thing because it's a deviation from the original source . You're removing the original signal. The source has grain and details

    A true lossless encode, thus 100% pristine - 100% quality - would keep 100% of all the grain and details, 100% of the original signal

    A near lossless encode, such as prores HQ re-encode - would retain most of the details and grain.

    Prores HQ re-encode certainly would not have the blocking, banding artifacts exhibited by that Intel encode

    This is 1:1 crop animated png. If it does not animate, open in a new tab . The full frames and crops are in the zip




    Removing grain and details uniformily might be ok for a low quality encode... But replacing them with ugly distracting splotchy artifacts is not. Even a Netflix/Amazon/Paramount/Disney stream would not have these types of artifacts this bad. They would preprocess it and use a better encoder

    To be fair, not all the frames are this bad; it's is just one of the lower quality frames chosen on purpose (in RGB), but the metrics on the PNG already tell you the reported metrics in the 1st post are probably wrong, or that VMAF was not done correctly, or it's that VMAF is not very reliable for this source since the min reported vmaf in the 1st post was 98.4 .

    On this frame
    PSNR r:36.243237 g:41.204289 b:37.700613 average:37.930930 min:37.930930 max:37.930930

    Does that look "pristine" to you ? Very different definition of "pristine"...
    Image Attached Files
    Quote Quote  
  19. users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

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