Speed up the AV1 encoding process

116 views
Skip to first unread message

klaus zhang

unread,
Dec 28, 2021, 4:33:04 AM12/28/21
to AV1 Discussion
hello,buddies
AV1 encoding on mobile platforms is a bit slow,How can we speed up the process?I have some strategy below to try to speed it up.
  • obvious way is that setting the highest value for AOME_SET_CPUUSED to speed 9 or speed 10 for real-time mode.
  • try to use multi-threads,1,2,4,8,....2**n
  • set super block size to `AOM_SUPERBLOCK_SIZE_128X128` rather than `AOM_SUPERBLOCK_SIZE_64X64`.I'm not sure that if this will work.Appreciated that if someone can explain this.
  • set correct tile mode with the given input image size.for example,choose `AV1E_SET_TILE_COLUMNS` if width > height,othersie,choose `AV1E_SET_TILE_ROWS`.for a 720x1280 frame,choosing `AV1E_SET_TILE_ROWS` and for a 1280x720 frame choosing `AV1E_SET_TILE_COLUMNS`.I'm not sure that if this will work,Appreciated that if someone can explain this.

Apprecitated for adding more strategies on speeding up the AV1 encoding process,thanks very much.

klaus zhang

unread,
Jan 5, 2022, 9:35:57 PM1/5/22
to AV1 Discussion, klaus zhang
At the mean time,setting a reasonable `max bitrate` for video sender can be an option too.

James Zern

unread,
Jan 10, 2022, 9:29:43 PM1/10/22
to av1-d...@aomedia.org
Hi,

On Wed, Jan 5, 2022 at 6:35 PM klaus zhang <asplin...@gmail.com> wrote:
At the mean time,setting a reasonable `max bitrate` for video sender can be an option too.

在2021年12月28日星期二 UTC+8 17:33:04<klaus zhang> 写道:
hello,buddies
AV1 encoding on mobile platforms is a bit slow,How can we speed up the process?I have some strategy below to try to speed it up.
  • obvious way is that setting the highest value for AOME_SET_CPUUSED to speed 9 or speed 10 for real-time mode.
  • try to use multi-threads,1,2,4,8,....2**n
  • set super block size to `AOM_SUPERBLOCK_SIZE_128X128` rather than `AOM_SUPERBLOCK_SIZE_64X64`.I'm not sure that if this will work.Appreciated that if someone can explain this.
This might only help with large content at a low bitrate, otherwise the search space will be increased. 
  • set correct tile mode with the given input image size.for example,choose `AV1E_SET_TILE_COLUMNS` if width > height,othersie,choose `AV1E_SET_TILE_ROWS`.for a 720x1280 frame,choosing `AV1E_SET_TILE_ROWS` and for a 1280x720 frame choosing `AV1E_SET_TILE_COLUMNS`.I'm not sure that if this will work,Appreciated that if someone can explain this.
You can set the rows/columns to their max (6) and allow the encoder to decide the layout. This will help when using threading on both the encode and decode side. 
 

Apprecitated for adding more strategies on speeding up the AV1 encoding process,thanks very much.

--
You received this message because you are subscribed to the Google Groups "AV1 Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to av1-discuss...@aomedia.org.
To view this discussion on the web visit https://groups.google.com/a/aomedia.org/d/msgid/av1-discuss/59d12e2a-af8c-4a6a-bdba-c26d51cec155n%40aomedia.org.

klaus zhang

unread,
Jan 13, 2022, 4:34:16 AM1/13/22
to AV1 Discussion, James Zern
Hi,James
Thanks for your nice reply.^^ I will try to implement what you suggested.
* AOM_SUPERBLOCK_SIZE_64X64 is better option if we just want to improve the performance of encoding speed ,regardless of the video quality.As AOM_SUPERBLOCK_SIZE_64X64 does less searching than  what AOM_SUPERBLOCK_SIZE_128X128 does,by which the encoding speed can speed up.

By the way,Do you know that is there any official advices on 'target bitrate' we SHOULD used for encoding?
As we know,AV1 can save 30% bitrate in comparison with H.265 to achieve the same VMAF scores. However,so far as I know,there is no official advices on bitrate corresponding with different resolution/fps.
For example,to achieve VMAF scores to 90 with input frame 720p@30fps, wtat's the exact value the 'target bitrate' SHOULD be set. There isn't a table unfortunately. 

Reasons that why I want know the table of 'target bitrate'
* Do not waste the limited bandwidth
* Try to improve the performance of AV1.As I do think that less bitrate will help improving the performance.

Do you have any advices on this topic ? Hope and thanks to receive your reply.

James Zern

unread,
Jan 13, 2022, 2:52:49 PM1/13/22
to AV1 Discussion
On Thu, Jan 13, 2022 at 1:34 AM klaus zhang <asplin...@gmail.com> wrote:
Hi,James
Thanks for your nice reply.^^ I will try to implement what you suggested.
* AOM_SUPERBLOCK_SIZE_64X64 is better option if we just want to improve the performance of encoding speed ,regardless of the video quality.As AOM_SUPERBLOCK_SIZE_64X64 does less searching than  what AOM_SUPERBLOCK_SIZE_128X128 does,by which the encoding speed can speed up.

By the way,Do you know that is there any official advices on 'target bitrate' we SHOULD used for encoding?
As we know,AV1 can save 30% bitrate in comparison with H.265 to achieve the same VMAF scores. However,so far as I know,there is no official advices on bitrate corresponding with different resolution/fps.
For example,to achieve VMAF scores to 90 with input frame 720p@30fps, wtat's the exact value the 'target bitrate' SHOULD be set. There isn't a table unfortunately. 

It's hard to generalize this as it will depend on the content and the goals for the project (e.g., same quality/reduced bandwidth or higher quality/equivalent or slightly reduced bandwidth). 30% can be used as a starting point for testing.

klaus zhang

unread,
Jan 13, 2022, 10:01:44 PM1/13/22
to AV1 Discussion, James Zern
在2022年1月14日星期五 UTC+8 03:52:49<James Zern> 写道:
On Thu, Jan 13, 2022 at 1:34 AM klaus zhang <asplin...@gmail.com> wrote:
Hi,James
Thanks for your nice reply.^^ I will try to implement what you suggested.
* AOM_SUPERBLOCK_SIZE_64X64 is better option if we just want to improve the performance of encoding speed ,regardless of the video quality.As AOM_SUPERBLOCK_SIZE_64X64 does less searching than  what AOM_SUPERBLOCK_SIZE_128X128 does,by which the encoding speed can speed up.

By the way,Do you know that is there any official advices on 'target bitrate' we SHOULD used for encoding?
As we know,AV1 can save 30% bitrate in comparison with H.265 to achieve the same VMAF scores. However,so far as I know,there is no official advices on bitrate corresponding with different resolution/fps.
For example,to achieve VMAF scores to 90 with input frame 720p@30fps, wtat's the exact value the 'target bitrate' SHOULD be set. There isn't a table unfortunately. 

It's hard to generalize this as it will depend on the content and the goals for the project (e.g., same quality/reduced bandwidth or higher quality/equivalent or slightly reduced bandwidth). 30% can be used as a starting point for testing.
Thanks ^^  I will find the relative table of  H.265 as a reference. 
Reply all
Reply to author
Forward
0 new messages