Opened 2 years ago

Closed 2 years ago

#9610 closed enhancement (fixed)

Sane defaults and full parameters for SVT AV1

Reported by: gvfarns Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords: av1, libsvtav1
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

With the release of SVT AV1 0.9, SvtAv1 has made tremendous encoding speed progress while retaining quality and now competes with and surpasses frequently used encoders like h.265. Yet it cannot be effectively used directly within ffmpeg because, apparently, one cannot specify the necessary options to get a good encode (see this post on reddit: https://www.reddit.com/r/AV1/comments/r9x4ea/comment/hnftcy5/?utm_source=share&utm_medium=web2x&context=3).

That thread suggests that there are no options for SvtAv1, which does not seem to be the case with ffmpeg 4.4.1. However, it does seem to be the case that not all important options are available. For example, film-grain and keyint. It would be great if the next version of ffmpeg had the capability of controlling the most important parameters in SvtAv1 and had default values that result in good encodes so that if people just specify libsvtav1 as their encoder without specifying any additional parameters, they will be happy with the result.

Here is an example of the current way to get a good encode with SvtAv1:

% ffmpeg -i Infile.mp4 -map 0:v:0 -pix_fmt yuv420p10le -f yuv4mpegpipe -strict -1  - | SvtAv1EncApp -i stdin --preset 6 --keyint 240 --input-depth 10 --crf 30 --rc 0 --passes 1 --film-grain 0 -b Outfile.ivf
% ffmpeg -i Outfile.ivf -i Infile.mp4 -map 0:v -map 1:a:0 -c:v copy -c:a copy FinalProduct.mp4

Note the 10 bit input depth and a sane keyint value (approximately 10x the fps). The three most important parameters for the user to control are preset, crf, and film-grain.

The world would be a better place if we could get the result from the above by doing

ffmpeg -i Input.mp4 -c:v libsvtav1 --preset 6 --crf 30 --film-grain 10 -c:a copy Output.mp4 

or something similar. I believe that being able to use ffmpeg effectively for SvtAv1 encodes in this manner would substantially improve the uptake of this highly efficient, open, and html5-compatible codec by debunking the pervasive idea that encoding to AV1 is not feasible because of long encode-time.

Change History (1)

comment:1 by James, 2 years ago

Resolution: fixed
Status: newclosed

svtav1-params was added in c33b4048859a191acf9b6aa22acaea248a4eb18f, so you can now pass any option you would to SvtAv1EncApp with it.

Note: See TracTickets for help on using tickets.