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 > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th February 2019, 03:19   #1  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,445
Suggested aomenc settings

Hey folks!

I thought it would be good to chat about recommended settings for using aomenc.

What I'm most interested in understanding / documenting:

I'll be updating this as I go based on findings

* Quality / speed tradeoff of various values for cpu-used
- Which value gives you most of the AV1 magic without being placebo (e.g. "veryslow" for x264)

- Which value should be considered the fastest acceptable without shooting yourself in the foot (e.g. "superfast" for x264)

- Is there a matrix describing which options cpu-used affects?


* Best practices for rate control settings like
- end-usage
Use fixed QP mode if you want constant quality. Rate control is not very good and should not be counted on.

- bias-pct
You generally shouldn't mess with this since RC is pretty bad still.

- resize options

- superres options

- buffering options

- CRF? I see it mentioned in the context of av1 in ffmpeg but not in aomenc?

* Best practices for bitstream / threading settings like
- auto-alt-ref
This is enabled by default, you shouldn't have to mess with it.

- lag-in-frames
This is maxed out by default (25 frames). You shouldn't mess with it unless you need to reduce encoder latency e.g. live streaming

- aq-mode
This is not recommended as of February 2019.

- tile-columns and tile-rows

- row-mt

- Any other mechanism to effectively multithread? Or should you really not do this, and just go massively parallel (chunked encode) if you want speed?


* Maybe example commands of
- "good quality" CBR / capped VBR encoding
No go. As of February 2019, aomenc is not capable of good quality CBR / capped VBR encoding. If you need this use case you'll need to implement the "dynamic optimizer" approach of encoding each scene at various QPs and then stitching together depending on your requirements.

- "good quality" pure VBR encoding for offline viewing
Fixed QP mode is the only way to get consistent quality today

- "HDR10" encoding (can this even be done today?)

Last edited by Blue_MiSfit; 15th February 2019 at 21:42.
Blue_MiSfit is offline   Reply With Quote
Old 12th February 2019, 04:30   #2  |  Link
utack
Registered User
 
Join Date: Apr 2018
Posts: 35
I'd like to discuss "maxsection-pct"
Is there a default bitrate limit over the targeted VBR set?
Because I had the feeling that without explicitly setting it aomenc can limit bitrate in 2pass mode, butchering "difficult" scenes unreasonably.
utack is offline   Reply With Quote
Old 14th February 2019, 20:40   #3  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,445
My initial experiments, focusing around a pure VBR low bitrate 400 Kbps 576p use case have shown the following:

- Constant QP mode makes pretty nice output, but of course it's unsuitable for streaming

- Rate control is still quite bad. Using 2 pass VBR mode there are still a few frames that completely explode for no apparent reason, despite the average quality being pretty good, and sometimes quite a bit better than HEVC.

I used cpu-used=1 for all these tests, but I'm trying the latter with cpu-used=0 just to see if there's any difference. I'm guessing 1=veryslow 0=placebo but we'll see.
Blue_MiSfit is offline   Reply With Quote
Old 14th February 2019, 21:56   #4  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,445
In chatting with TD-Linux on #aomedia I learned a few interesting things:

1) Rate control (VBR and CBR) is not very good.

2) Constant QP mode is a better solution. Most folks using AV1 use the "dynamic optimizer" approach of encoding each scene with multiple QPs and picking one per scene to hopefully get consistent quality while controlling bitrate. A good place to start would be using qp values like 20, 32, 43, 55, and 63 (for both 8 and 10 bit)

3) aq-mode is not recommended at this point

4) lag-in-frames controls the intrinsic delay. It defaults to the max and should only be reduced when targeting for low latency (e.g. live encoding)

I'm doing a range of CQ encodes
Blue_MiSfit is offline   Reply With Quote
Old 15th February 2019, 10:01   #5  |  Link
kanaka
Registered User
 
Join Date: Jan 2019
Posts: 13
Quote:
Originally Posted by Blue_MiSfit View Post
2) Constant QP mode is a better solution. Most folks using AV1 use the "dynamic optimizer" approach of encoding each scene with multiple QPs and picking one per scene to hopefully get consistent quality while controlling bitrate. A good place to start would be using qp values like 20, 32, 43, 55, and 63 (for both 8 and 10 bit)
What metrics do they use to set correct qp? vmaf at 93-95?
kanaka is offline   Reply With Quote
Old 15th February 2019, 21:27   #6  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,445
I didn't ask, but given the Netflix tech blog post on this item I'd imagine your idea is in the ballpark

This is an almost inconceivably expensive solution, though. As if encoding AV1 isn't bad enough already, let's go ahead and do each representation 5 times! Multiply that by however many representations you want to provide and the necessary compute resources are astronomical, even just doing SD content!

In my test last night at q55 I got quite good results at just over 500 Kbps.
Blue_MiSfit 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 03:48.


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