Previously, the Blender video renderer did not have support for encoding
video to AV1 (not to be confused with the container AVI). The proposed
solution is to leverage the existing FFMpeg renderer to encode to AV1.
Note that avcodec_find_encoder(AV_CODEC_ID_AV1) usually returns
"libaom-av1" which is the "reference implementation" for AV1 encoding
(the default for FFMpeg, and is slow). "libsvtav1" is faster and
preferred so there is extra handling when fetching the AV1 codec for
encoding such that "libsvtav1" is used when possible.
This commit should only affect the options available for video
rendering, which includes the additional AV1 codec to choose from, and
setting "-crf".
Also note that the current release of FFMpeg for ArchLinux does not
support "-crf" for "libsvtav1", but the equivalent option "-qp" is
supported and used as a fallback when "libsvtav1" is used (as mentioned
here: https://trac.ffmpeg.org/wiki/Encode/AV1#SVT-AV1 ). (Actually, both
"-crf" and "-qp" is specified with the same value in the code. When a
release of FFMpeg obtains support for "-crf" for "libsvtav1" is
released, the code shouldn't be needed to change.)
The usage of the AV1 codec should be very similar to the usage of the
H264 codec, but is limited to the "mp4" and "mkv" containers.
This patch pertains to the "VFX & Video" module, as its main purpose is
to supplement the Video Sequencer tool with the additional AV1 codec for
encoded video output.
This is my first contribution to Blender, so I think it may be expected
to find issues that need to be fixed. In other words, I am certain that
this first patch submission may be rejected upon review to fix something
I may have overlooked. If it somehow passes review on the first patch,
then cool.