VBR encoding for libsvtav1.
I was trying and searching the web to 'how to encode videos with libsvtav1 with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode. https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u... I tried to set '-rc 1' but the it says : `[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.` So, how to encode videos with Variable Bitrate rate control mode with libsvtav1 encoder ? I need help from you guys about this.
I was trying and searching the web to 'how to encode videos with libsvtav1
with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode.
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u...
I tried to set '-rc 1' but the it says :
`[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.`
So, how to encode videos with Variable Bitrate rate control mode with libsvtav1 encoder ? I need help from you guys about this. Please supply full command you have tried AND full output of that command. We cannot help without those.
On Sun, 26 Nov, 2023, 6:44 pm Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
I was trying and searching the web to 'how to encode videos with libsvtav1
with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode.
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u...
I tried to set '-rc 1' but the it says :
`[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it
is
a private option of some encoder which was not actually used for any stream.`
So, how to encode videos with Variable Bitrate rate control mode with libsvtav1 encoder ? I need help from you guys about this. Please supply full command you have tried AND full output of that command. We cannot help without those.
Video capture encoding settings *cap_soundcommand* "ffmpeg -f s16le -ar %s -ac 2 -i - -c:a libvorbis -q:a 10 -y temp_a.nut" *cap_videocommand* "ffmpeg -f rawvideo -pix_fmt rgb24 -r %r -s %wx%h -i - -c:v libsvtav1 -preset 10 -crf 20 -b:v 5000k -rc 1 -y temp_v.nut" *cap_muxcommand* "ffmpeg -i temp_v.nut -i temp_a.nut -c copy -y %f" cap_tempfile1 "temp_a.nut" cap_tempfile2 "temp_v.nut" cap_remove_tempfiles 1 cap_wipescreen 0 cap_fps 60 These settings actually are viddumping settings in the clg file of DSDA-Doom source port. (i.e they are used to convert Doom demos i.e lmp files to videos). I store the video and audio in webm format since webm supports Vorbis and Av1 codecs. Output of the command: ffmpeg version 6.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.0 (Rev10, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 Input #0, rawvideo, from 'fd:': Duration: N/A, start: 0.000000, bitrate: 2985984 kb/s Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080, 2985984 kb/s, 60 tbr, 60 tbn [out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> av1 (libsvtav1)) Svt[info]: ------------------------------------------- Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v1.7.0-3-g2f003458 Svt[info]: SVT [build] : GCC 13.2.0 64 bit Svt[info]: LIB Build date: Nov 5 2023 14:07:04 Svt[info]: ------------------------------------------- Svt[info]: Number of logical cores available: 2 Svt[info]: Number of PPCS 42 Svt[info]: [asm level on system : up to sse4_2] Svt[info]: [asm level selected : up to sse4_2] Svt[info]: ------------------------------------------- Svt[info]: SVT [config]: main profile tier (auto) level (auto) Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 1920 / 1080 / 60 / 1 Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420 Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 321 / 16 / key frame Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 20 Svt[info]: ------------------------------------------- Output #0, nut, to 'temp_v.nut': Metadata: encoder : Lavf60.16.100 Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv420p(tv, progressive), 1920x1080, q=2-31, 60 fps, 61440 tbn Metadata: encoder : Lavc60.31.102 libsvtav1 frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A frame= 0 fps=0.0 q=2.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x frame= 1 fps=0.1 q=2.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x frame= 1 fps=0.1 q=2.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x frame= 5 fps=0.6 q=20.0 size= 256kB time=00:00:00.08 bitrate=25165.9kbits/s speed=0.0096x frame= 9 fps=1.0 q=20.0 size= 256kB time=00:00:00.15 bitrate=13981.0kbits/s speed=0.016x frame= 10 fps=1.0 q=18.0 size= 256kB time=00:00:00.16 bitrate=12582.9kbits/s speed=0.0163x frame= 14 fps=1.3 q=18.0 size= 256kB time=00:00:00.23 bitrate=8987.8kbits/s speed=0.0214x frame= 17 fps=1.5 q=7.0 size= 256kB time=00:00:00.26 bitrate=7864.3kbits/s speed=0.0231x frame= 21 fps=1.6 q=20.0 size= 256kB time=00:00:00.35 bitrate=5991.9kbits/s speed=0.0269x frame= 24 fps=1.8 q=9.0 size= 256kB time=00:00:00.40 bitrate=5242.9kbits/s speed=0.0296x frame= 27 fps=1.9 q=20.0 size= 512kB time=00:00:00.45 bitrate=9320.7kbits/s speed=0.032x frame= 34 fps=2.3 q=18.0 size= 512kB time=00:00:00.56 bitrate=7401.7kbits/s speed=0.0387x frame= 37 fps=2.3 q=20.0 size= 768kB time=00:00:00.61 bitrate=10202.4kbits/s speed=0.0386x (I stopped the encoding forecfully when I saw the message about -rc in the video_stderr txt file.)
On 2023-11-26 07:21 pm, Aditya Dandavate wrote:
On Sun, 26 Nov, 2023, 6:44 pm Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
I was trying and searching the web to 'how to encode videos with libsvtav1
with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode.
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u...
I tried to set '-rc 1' but the it says :
`[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it
The doc link is for the standalone encoder program supplied with the library, not for use with ffmpeg. For ffmpeg, you should add -svtav1-params rc=1 Regards, Gyan
On Sun, 26 Nov, 2023, 7:38 pm Gyan Doshi, <ffmpeg@gyani.pro> wrote:
On Sun, 26 Nov, 2023, 6:44 pm Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
I was trying and searching the web to 'how to encode videos with
On 2023-11-26 07:21 pm, Aditya Dandavate wrote: libsvtav1
with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode.
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u...
I tried to set '-rc 1' but the it says :
`[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely reason
is
either wrong type (e.g. a video option with no video streams) or that it
The doc link is for the standalone encoder program supplied with the library, not for use with ffmpeg.
For ffmpeg, you should add
-svtav1-params rc=1
Regards, Gyan
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Thank you Gyan Sir. 🙏
On Sun, 26 Nov, 2023, 8:18 pm Aditya Dandavate, <adityadandavate04@gmail.com> wrote:
On Sun, 26 Nov, 2023, 7:38 pm Gyan Doshi, <ffmpeg@gyani.pro> wrote:
On Sun, 26 Nov, 2023, 6:44 pm Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
I was trying and searching the web to 'how to encode videos with
On 2023-11-26 07:21 pm, Aditya Dandavate wrote: libsvtav1
with help of VBR rate control mode and I found on this page that setting -rc 1 will enable Variable Bitrate mode.
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/svt-av1_encoder_u...
I tried to set '-rc 1' but the it says :
`[out#0/nut @ 00000208aba3eac0] Codec AVOption rc (Override the preset rate-control) has not been used for any stream. The most likely
reason is
either wrong type (e.g. a video option with no video streams) or that it
The doc link is for the standalone encoder program supplied with the library, not for use with ffmpeg.
For ffmpeg, you should add
-svtav1-params rc=1
Regards, Gyan
What is the quality rate control when encoding in VBR mode ? I get message : Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails. Which mode to set quality when encoding in VBR mode ?
What is the quality rate control when encoding in VBR mode ?
I get message :
Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails.
Which mode to set quality when encoding in VBR mode ?
vbr encoding does not support quality setting, you get the maximum quality that fits the specified bitrate and it uses lower bitrates if possible if the content does not require high bitrates. If you want CRF with a cap on the bitrate you need to set mbr (MaximumBitRate) -crf 20 -svtav1-params mbr=5000k You do not need to specify rc=0, because that is default. You also do not specify -b:v 5000k Or if you want VBR -svtav1-params rc=1 -b:v 5000k No quality settings like crf or qp as they require rc=0 you can however set -qmin (default 1) and -qmax (default 63) OR if you want CQP -qp 20 -svtparams aq-mode=0 -b:v 5000k qp only works when aq-mode=0 (default aq-mode=2) Hope that helps?
On Mon, 27 Nov, 2023, 4:16 am Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
What is the quality rate control when encoding in VBR mode ?
I get message :
Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails.
Which mode to set quality when encoding in VBR mode ?
vbr encoding does not support quality setting, you get the maximum quality that fits the specified bitrate and it uses lower bitrates if possible if the content does not require high bitrates.
If you want CRF with a cap on the bitrate you need to set mbr (MaximumBitRate)
-crf 20 -svtav1-params mbr=5000k
You do not need to specify rc=0, because that is default. You also do not specify -b:v 5000k
Or if you want VBR
-svtav1-params rc=1 -b:v 5000k
No quality settings like crf or qp as they require rc=0 you can however set -qmin (default 1) and -qmax (default 63)
OR if you want CQP
-qp 20 -svtparams aq-mode=0 -b:v 5000k
qp only works when aq-mode=0 (default aq-mode=2)
Hope that helps?
Yes, that helped me a lot. Thank you sir for your help 🙏
On Mon, 27 Nov, 2023, 7:32 am Aditya Dandavate, <adityadandavate04@gmail.com> wrote:
On Mon, 27 Nov, 2023, 4:16 am Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
What is the quality rate control when encoding in VBR mode ?
I get message :
Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails.
Which mode to set quality when encoding in VBR mode ?
vbr encoding does not support quality setting, you get the maximum quality that fits the specified bitrate and it uses lower bitrates if possible if the content does not require high bitrates.
If you want CRF with a cap on the bitrate you need to set mbr (MaximumBitRate)
-crf 20 -svtav1-params mbr=5000k
You do not need to specify rc=0, because that is default. You also do not specify -b:v 5000k
Or if you want VBR
-svtav1-params rc=1 -b:v 5000k
No quality settings like crf or qp as they require rc=0 you can however set -qmin (default 1) and -qmax (default 63)
OR if you want CQP
-qp 20 -svtparams aq-mode=0 -b:v 5000k
qp only works when aq-mode=0 (default aq-mode=2)
Hope that helps?
Also, a quick question about Constrained Quality Mode: In VP9, we trigger it by combination of '-crf' and 'b:v' and the value of bitrate is must be non zero to trigger the mode. How to trigger it in libsvtav1 ?
On Mon, 27 Nov, 2023, 7:32 am Aditya Dandavate, <adityadandavate04@gmail.com>
wrote:
On Mon, 27 Nov, 2023, 4:16 am Ferdi Scholten,<ferdi@sttc-nlp.nl> wrote:
What is the quality rate control when encoding in VBR mode ?
I get message :
Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails.
Which mode to set quality when encoding in VBR mode ?
vbr encoding does not support quality setting, you get the maximum quality that fits the specified bitrate and it uses lower bitrates if possible if the content does not require high bitrates.
If you want CRF with a cap on the bitrate you need to set mbr (MaximumBitRate)
-crf 20 -svtav1-params mbr=5000k
You do not need to specify rc=0, because that is default. You also do not specify -b:v 5000k
Or if you want VBR
-svtav1-params rc=1 -b:v 5000k
No quality settings like crf or qp as they require rc=0 you can however set -qmin (default 1) and -qmax (default 63)
OR if you want CQP
-qp 20 -svtparams aq-mode=0 -b:v 5000k
qp only works when aq-mode=0 (default aq-mode=2)
Hope that helps?
Also, a quick question about Constrained Quality Mode:
In VP9, we trigger it by combination of '-crf' and 'b:v' and the value of bitrate is must be non zero to trigger the mode.
How to trigger it in libsvtav1 ?
by setting -qp AND aq-mode=0 AND bitrate
Thank you sir. 🙏 On Mon, 27 Nov, 2023, 1:43 pm Ferdi Scholten, <ferdi@sttc-nlp.nl> wrote:
On Mon, 27 Nov, 2023, 7:32 am Aditya Dandavate, <adityadandavate04@gmail.com>
wrote:
On Mon, 27 Nov, 2023, 4:16 am Ferdi Scholten,<ferdi@sttc-nlp.nl> wrote:
What is the quality rate control when encoding in VBR mode ?
I get message :
Svt[warn]: The input q value is ignored in vbr mode 20 when I set the -crf to 20 when enabling the -svtav1-params rc=1. When I set -qp 20, the conversion fails.
Which mode to set quality when encoding in VBR mode ?
vbr encoding does not support quality setting, you get the maximum quality that fits the specified bitrate and it uses lower bitrates if possible if the content does not require high bitrates.
If you want CRF with a cap on the bitrate you need to set mbr (MaximumBitRate)
-crf 20 -svtav1-params mbr=5000k
You do not need to specify rc=0, because that is default. You also do not specify -b:v 5000k
Or if you want VBR
-svtav1-params rc=1 -b:v 5000k
No quality settings like crf or qp as they require rc=0 you can however set -qmin (default 1) and -qmax (default 63)
OR if you want CQP
-qp 20 -svtparams aq-mode=0 -b:v 5000k
qp only works when aq-mode=0 (default aq-mode=2)
Hope that helps?
Also, a quick question about Constrained Quality Mode:
In VP9, we trigger it by combination of '-crf' and 'b:v' and the value of bitrate is must be non zero to trigger the mode.
How to trigger it in libsvtav1 ?
by setting -qp AND aq-mode=0 AND bitrate _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (3)
-
Aditya Dandavate -
Ferdi Scholten -
Gyan Doshi