Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th November 2018, 19:36   #41  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,434
Quote:
Originally Posted by benwaggoner View Post
Going to a fixed file size at a reasonably challenging bitrate (so you're going to see some artifacts) is what I've found as the most efficient way to do these comparisons.
Then again, if bitrate is a property that I don't need to control (because I cannot tell a static average bitrate for all material), I shouldn't worry about it. As CRF is as close to constant quality that we can ever get, I have been able to set a satisfying CRF level which means it should be fixed to that.

For example, I just ran two test encodes; aq-mode 1, strength 1.0 gave me 6013 kbps and strength 1.8 needed 11610 kbps for the same clip with all the other settings kept the same. Running a 2-pass encode comparison at 6000 kbps, it's quite easy to predict that strength 1.0 will have less artifacts or is sharper and more detailed. It still doesn't mean it's any better at my desired base quality level
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 12th November 2018, 20:50   #42  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,623
Quote:
Originally Posted by Boulder View Post
Then again, if bitrate is a property that I don't need to control (because I cannot tell a static average bitrate for all material), I shouldn't worry about it. As CRF is as close to constant quality that we can ever get, I have been able to set a satisfying CRF level which means it should be fixed to that.

For example, I just ran two test encodes; aq-mode 1, strength 1.0 gave me 6013 kbps and strength 1.8 needed 11610 kbps for the same clip with all the other settings kept the same. Running a 2-pass encode comparison at 6000 kbps, it's quite easy to predict that strength 1.0 will have less artifacts or is sharper and more detailed. It still doesn't mean it's any better at my desired base quality level
The challenge is how to respond when something is, say 11% smaller but looks a little bit worse.

Because CRF is really not that close to constant quality. It's just a psychovisual offset from QP, and lots of changes can impact how good a given CRF value looks in practice. For example, try adding --nr 1000 to your string. It'll be a lot smaller and will look quite different. Pretty much all the psychovisual stuff changes appearance and efficiency with a given CRF value.


One can think of codec parameter tuning as finding ways to make the worst parts of the video look better so that a higher CRF value can be used for the same perceptual quality.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 12th November 2018, 23:23   #43  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 59
Quote:
Originally Posted by Boulder View Post
On HDR sources, mode 2 seems to produce noticably smaller files for the same CRF than mode 1.
With the footage I'm currently encoding (yes, its HDR) it's the other way arround.
AQ-Mode 1 turned out a lot smaller than AQ-Mode 2.
So it is highly dependant on the type of footage (grain, motion, contrast,...).

So, as Ben says, its always recommended to use 2-pass when comparing.
Or even 3-pass because there still is quite a difference between the resulting bitrates when using 2-pass.
Maybe 3-pass is more accurate? (don't have the time to test it, sadly)

So far, my (quick) tests on current project AQ-Mode 2 turned out as the 'winner'.
Its HQ footage with slight (but noticeable) noise. AQ-Mode 2 preserved details better in the chroma channels and resulted in quite a bit less distortion.
Keep in mind though this probably varies from type of footage... When having footage which has a lot of grain, then distortion might be a more acceptable type of artifact and result in a perceptually better image. (ill test that probably another time)

Last edited by K.i.N.G; 12th November 2018 at 23:35.
K.i.N.G is offline   Reply With Quote
Old 12th November 2018, 23:33   #44  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 59
Quote:
Originally Posted by Boulder View Post
Using aq-strength 1.8 for mode 1 makes the bitrate shoot through the roof compared to strength 1.0.
Yeah, thats normal. Just use higher CRF.

When testing to compare quality:
Test using 2-pass and then when you find your desired 'target' try to match that by raising/lowering CRF until you get close enough to the desired result you got with 2pass.

Last edited by K.i.N.G; 12th November 2018 at 23:37.
K.i.N.G is offline   Reply With Quote
Old 13th November 2018, 05:16   #45  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,434
Quote:
Originally Posted by K.i.N.G View Post
With the footage I'm currently encoding (yes, its HDR) it's the other way arround.
AQ-Mode 1 turned out a lot smaller than AQ-Mode 2.
So it is highly dependant on the type of footage (grain, motion, contrast,...).

So, as Ben says, its always recommended to use 2-pass when comparing.
Or even 3-pass because there still is quite a difference between the resulting bitrates when using 2-pass.
Maybe 3-pass is more accurate? (don't have the time to test it, sadly)

So far, my (quick) tests on current project AQ-Mode 2 turned out as the 'winner'.
Its HQ footage with slight (but noticeable) noise. AQ-Mode 2 preserved details better in the chroma channels and resulted in quite a bit less distortion.
Keep in mind though this probably varies from type of footage... When having footage which has a lot of grain, then distortion might be a more acceptable type of artifact and result in a perceptually better image. (ill test that probably another time)
I've compared them on two quite different sources, the first Harry Potter movie (lots of noise) and then the Solo movie (quite clean). Aq-mode 1 kept the flat backgrounds better looking, mode 2 oversmoothed them even if I raised aq-strength to get the bitrate closer to what mode 1 gets. Didn't try lowering strength yet to see what happens. Nevertheless, the background looked ugly at default strength and mode 2 in both cases. Also in both cases the difference in bitrate was huge, mode 1 much higher than mode 2.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 13th November 2018, 13:43   #46  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,434
Out of interest, would it be possible to run a 2-pass CRF encode so that the first pass uses a manually tonemapped version of the video and then the actual encode uses the real one? This would be really interesting to test at least
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 13th November 2018, 17:14   #47  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,623
Quote:
Originally Posted by Boulder View Post
I've compared them on two quite different sources, the first Harry Potter movie (lots of noise) and then the Solo movie (quite clean). Aq-mode 1 kept the flat backgrounds better looking, mode 2 oversmoothed them even if I raised aq-strength to get the bitrate closer to what mode 1 gets. Didn't try lowering strength yet to see what happens. Nevertheless, the background looked ugly at default strength and mode 2 in both cases. Also in both cases the difference in bitrate was huge, mode 1 much higher than mode 2.
Yeah, that's what I mean about VBR comparisons: "looked worse at a much lower bitrate" isn't that informative . It could be that aqm 2 and lowering CRF by 2 could be better and smaller.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 13th November 2018, 17:48   #48  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,434
Quote:
Originally Posted by benwaggoner View Post
Yeah, that's what I mean about VBR comparisons: "looked worse at a much lower bitrate" isn't that informative . It could be that aqm 2 and lowering CRF by 2 could be better and smaller.
Well, going down on CRF so that the bitrates are close to each other still shows the ugly banding-like artifacts of mode 2

I think I also need to compare aq-modes 1 and 3 with SDR sources in a similar way.
EDIT: tested, and aq-mode 3 looks better at least in the video I checked. So it would seem to be the go-to setting for SDR but jury's very much out on aq-mode 2 and HDR.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 13th November 2018 at 18:52.
Boulder is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.