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 > VP9 and AV1

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th November 2023, 14:52   #1  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 116
What settings do you recommend for SVT-AV1

I only have experiences encoding my movie collection to HEVC. Now I want to start and get a bit more experiences with AV1. I use HandBrake to encode which uses SVT-AV1 (v.1.7.0). After a bit of experimenting I think preset 5 or 4 would be good for movie archiving. 4 takes around double as long as 5. I was wondering, is 4 that much better then 5 to invest the longer encoding time? What preset do you use?

For HEVC I put together a set of parameters to pass to the encoder to improve quality, size and speed to my needs. For AV1 and would need to do this all again. Or is this not needed for AV1? A quick search in the internet gave me some parameters that are often used:
Code:
enable-overlays=1:scd=1:enable-tf=0
.
What do you think, is this useful? This flags do increase file size a little bit. Or what do you recommend?
ShortKatz is offline   Reply With Quote
Old 16th November 2023, 16:12   #2  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
hi I'm in the same situation as you, personally I do preset 4 at 5000kb/S it's magnificent and preset 4 is much better than 5 but 5 is not bad too it's up to you to see what you want is strange is that my 16 cores are only used at 30% I have to find a way to ensure that more CPU is used like at 80% like that the encoding time would be shorter
__________________
charliebaby is offline   Reply With Quote
Old 16th November 2023, 19:40   #3  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,724
Quote:
Originally Posted by charliebaby View Post
hi I'm in the same situation as you, personally I do preset 4 at 5000kb/S it's magnificent and preset 4 is much better than 5 but 5 is not bad too it's up to you to see what you want is strange is that my 16 cores are only used at 30% I have to find a way to ensure that more CPU is used like at 80% like that the encoding time would be shorter
Don't assume that using more cores will always improve quality, as a lot of threading techniques can sacrifice some quality. Bigger frames certainly can increase core utilization, but lower resolutions can struggle to find enough to parallelize.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 19th November 2023, 23:21   #4  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 116
Quote:
Originally Posted by charliebaby View Post
hi I'm in the same situation as you, personally I do preset 4 at 5000kb/S it's magnificent and preset 4 is much better than 5 but 5 is not bad too it's up to you to see what you want is strange is that my 16 cores are only used at 30% I have to find a way to ensure that more CPU is used like at 80% like that the encoding time would be shorter
Thanks for your recommendation , I will try 4 at 5000kb/s and see. There I found another suggestion of using 4: https://forum.jellyfin.org/t-encodin...&mode=threaded

I also found this, and there seems just a little difference between 4 and 5: https://ottverse.com/analysis-of-svt...nd-crf-values/

The difference between 4 and 5 according to this table are "Filter intra", "Difference-weighted prediction", "Distance-weighted prediction" and "Restoration Filter - SG Filter": https://gitlab.com/AOMediaCodec/SVT-...hat-presets-do
But I have no clue what this is all doing.
ShortKatz is offline   Reply With Quote
Old 25th November 2023, 15:23   #5  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 116
After some testing with different setting and sources, I'm now quite happy with the following settings in HandBrake:

Codec: AV1 10bit (SVT)
CRF: 26
Preset: 5
Profile: main
Level: auto
Additional parameter: enable-tf=0:film-grain-denoise=0:film-grain=8:mbr=10m (for 2D/3D animation change film-grain from 8 to 4)

The quality of the video is perfect (in some cases I like it more than the original), encoding is much faster than my x265 encodings and the file size is also smaller.
ShortKatz is offline   Reply With Quote
Old 26th November 2023, 14:19   #6  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 48
Quote:
Originally Posted by ShortKatz View Post
Additional parameter: enable-tf=0:film-grain-denoise=0:film-grain=8:mbr=10m (for 2D/3D animation change film-grain from 8 to 4)
By setting film-grain-denoise=0 you are disabling film-grain=8, because film-grain sets the level of denoising and is not for preserving grain but the contrary, see https://gitlab.com/AOMediaCodec/SVT-.../Parameters.md . The name "film-grain" is very misleading here and it would have been much more user friendly if the level of denoise would be set directly in film-grain-denoise like e.g. film-grain-denoise=8.

Quote:
Originally Posted by ShortKatz View Post
The quality of the video is perfect (in some cases I like it more than the original), encoding is much faster than my x265 encodings and the file size is also smaller.
That's what I thought about preset 5 until I compared the result with preset 4 on my 48" OLED. Preset 4 is significantly better. Did you try some AV1 hardware encoding by any chance? I got a A380 last week and the results with highest quality settings and the encoding speed are stunning.
Loomes is offline   Reply With Quote
Old 26th November 2023, 19:40   #7  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 566
film-grain-denoise doesn't disable film-grain, it disables encoding from the denoised image.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 27th November 2023, 14:27   #8  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 48
Quote:
Originally Posted by quietvoid View Post
film-grain-denoise doesn't disable film-grain, it disables encoding from the denoised image.
Okay, maybe I misread the parameter description but if film-grain-denoise=0 disables denoising and film-grain=n sets the level of denoising, what exactly would be the purpose of "film-grain-denoise=0 film-grain=8" ? Or in other words: How exactly would it effect the encoding result?
Loomes is offline   Reply With Quote
Old 27th November 2023, 14:37   #9  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 566
The denoising strength is still controlled by film-grain.
When disabling film-grain-denoise, it only encodes from the original image instead of the denoised result.

It would probably end up higher bitrate if the source video is noisy.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 27th November 2023, 14:46   #10  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 48
Does this mean "film-grain-denoise=1 film-grain=8" would be 2-step process? First, film-grain-denoise=1 prepares a denoised image which is then encoded with film-grain=8 ?
Loomes is offline   Reply With Quote
Old 27th November 2023, 15:49   #11  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 48
Thanks, I think I got it now. So film-grain foremost sets the level of grain in the video, which is also used as level for denoising if film-grain-denoise=1. Is that correct? If so, the parameter description is rather

FilmGrain: Enable film grain [0: off, 1-50: level of film grain, also used as denoising strength if film-grain-denoise=1]

Since there are levels from 1-50, it raises the question how to determine the level. Is this a pure subjective matter or is there some kind of technical indicator to determine the level? Thanks.
Loomes is offline   Reply With Quote
Old 28th November 2023, 02:26   #12  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 566
Usually the more noise there is, the higher film-grain would be.
I usually stay between 10-20.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 28th November 2023, 19:38   #13  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 116
Setting film-grain-denoise=0 and film-grain=8 as a start is recommended in the SVT-AV1 CommonQuestions.
https://gitlab.com/AOMediaCodec/SVT-...rain-synthesis

Quote:
As a general rule, a film-grain level of around 8 is sufficient for live action video with a normal amount of grain. Noisier video benefits from higher levels in the 10-15 range.

Quote:
If grain synthesis levels can be manually verified through subjective evaluation or high fidelity metrics, then passing film-grain-denoise=0 may result in higher fidelity by disabling source denoising.

The effect of film-grain-denoise=0 can also be seen in this video starting at 9:00 min.
https://www.youtube.com/watch?v=5IV36FMpLqY
ShortKatz is offline   Reply With Quote
Old 28th November 2023, 21:08   #14  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,724
Note that a lot of devices with AV1 decode don't support FGS, or have buggy implementations. It's not a safe "always on" feature at this point. Hopefully AVFG1 spec will catch on, and we can use FGS with VVC, and eventually a better version in AV2.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th November 2023, 07:59   #15  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,703
Quote:
Originally Posted by benwaggoner View Post
Note that a lot of devices with AV1 decode don't support FGS, or have buggy implementations. It's not a safe "always on" feature at this point. Hopefully AVFG1 spec will catch on, and we can use FGS with VVC, and eventually a better version in AV2.
Then again, it is possible to remove the layer if it proves to be an issue.
__________________
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 29th November 2023, 21:02   #16  |  Link
birdie
Artem S. Tashkinov
 
birdie's Avatar
 
Join Date: Dec 2006
Posts: 333
Quote:
Originally Posted by ShortKatz View Post
After some testing with different setting and sources, I'm now quite happy with the following settings in HandBrake:

Codec: AV1 10bit (SVT)
CRF: 26
Preset: 5
Profile: main
Level: auto
Additional parameter: enable-tf=0:film-grain-denoise=0:film-grain=8:mbr=10m (for 2D/3D animation change film-grain from 8 to 4)

The quality of the video is perfect (in some cases I like it more than the original), encoding is much faster than my x265 encodings and the file size is also smaller.
Looks like you've never been interested in transparent encoding.

CRF 26 is a complete blurfest to me only useful for encoding anime.
birdie is offline   Reply With Quote
Old 30th November 2023, 04:40   #17  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,724
Quote:
Originally Posted by Boulder View Post
Then again, it is possible to remove the layer if it proves to be an issue.
Sure, but that can utterly change the look, as the source is denoised to use FGS, with FGS to replace the removed noise. Encoding for FGS but playing back without it can look really smoothed out and unnatural, and certainly wouldn't match creative intent.

If I can't count on FGS being used with AV1, I'd just encode AV1 without FGS. It'll increase the bitrate, but at least the visual appearance will be predictable.

AV1 and AV1 + FGS can almost be thought of as different codecs, and absolutely require different encodes.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th November 2023, 06:24   #18  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,703
Quote:
Originally Posted by benwaggoner View Post
Sure, but that can utterly change the look, as the source is denoised to use FGS, with FGS to replace the removed noise. Encoding for FGS but playing back without it can look really smoothed out and unnatural, and certainly wouldn't match creative intent.

If I can't count on FGS being used with AV1, I'd just encode AV1 without FGS. It'll increase the bitrate, but at least the visual appearance will be predictable.

AV1 and AV1 + FGS can almost be thought of as different codecs, and absolutely require different encodes.
Unfortunately with modern codecs, everything is quite smoothed out without FGS no matter what settings you use. Believe me..I have attempted to remove all the filtering in both parameters and code and still there is horrible flat area banding left even at very low quantizers (like Q12 for aomenc). And I see people are using something like Q24, which must mean that there are no details left in the encoded video

FGS won't restore the details, in my opinion it just works very well at hiding the problems and fooling your brain into thinking that the material is sharper and more detailed than it is
__________________
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 30th November 2023, 19:02   #19  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,724
Quote:
Originally Posted by Boulder View Post
Unfortunately with modern codecs, everything is quite smoothed out without FGS no matter what settings you use. Believe me..I have attempted to remove all the filtering in both parameters and code and still there is horrible flat area banding left even at very low quantizers (like Q12 for aomenc). And I see people are using something like Q24, which must mean that there are no details left in the encoded video
Too much PSNR tuning, and to a lesser degree VMAF, can cause the flattening. This can generally be addressed with AQ tuning. It's an encoder limitation, not a codec limitation.

I've done comparisons between encoding AV1 with grain preservation without FGS versus FGS, and while grain preservation requires more bits than with FGS, with proper encoder and parameter tuning the perceptual results are pretty similar, and can match what's possible with x265.

Quote:
FGS won't restore the details, in my opinion it just works very well at hiding the problems and fooling your brain into thinking that the material is sharper and more detailed than it is
FGS is best thought of as a creative intent preservation feature. If the source is supposed to have grain texture, the exact temporal and spatial location of each grain particle isn't important. So we can synthesize grain to preserve a similar creative intent and feel without having to encode the exact random locations of all those particles distributed randomly on any given frame.

And the metadata to describe the grain is a LOT more bitrate efficient than trying to encode all that high temporal and spatial frequency noise. For a premium quality experience, heavy grain can more than double the bitrate required compared the the same content without grain.

Content is going to look very different if it originally had heavy grain, but it was removed presuming it would be added back, but it was not.

There is one major flaw in the AV1 FGS implementation, in that grain particle size is rendered relative to display instead of content, so the size of a grain particle relative to the image changes. A fix for that is is in progress.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th November 2023, 23:06   #20  |  Link
ShortKatz
Registered User
 
Join Date: Aug 2018
Location: Germany
Posts: 116
Quote:
Originally Posted by birdie View Post
Looks like you've never been interested in transparent encoding.

CRF 26 is a complete blurfest to me only useful for encoding anime.
I'm very interested in transparent encoding. Seems we have different CRF 26, it's not a bluffest for me.
ShortKatz 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 21:10.


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