I want to encode a video using ffmpeg’s av1_nvenc encoder, however I notice that the bitrate seems arbitrarily capped at specific values:
| -cq value used | Output bitrate (as reported by ffmpeg) |
|---|---|
| -cq 30 | 30,211 kbits/s |
| -cq 25 | 30,206 kbits/s |
| -cq 20 | 120,890 kbits/s |
| -cq 15 | 120,890 kbits/s |
| -cq 10 | 120,893 kbits/s |
| -cq 5 | 120,896 kbits/s |
It would seem that I run into some sort of level limit, but even when I manually specify a level like “-level 6.3” I get the same results. MediaInfo reports that the output videos for -cq 20 and lower have a level of “Main@L7.3” which is apparently the highest level anyway.
You can reproduce my tests using the command below which creates a noise video (I notice the same capping behaviour with real videos):
ffmpeg.exe -filter_complex "nullsrc=s=960x480,geq=r=random(1)*252,geq=g=random(2)*172,geq=b=random(3)*52,scale=3840x2160:flags=neighbor;aevalsrc=-2+random(0)" -t 30 -c:v av1_nvenc -rc:v vbr -cq:v 5 "output_video.mkv"
Switching the -cq parameter for “-b:v 200M” instead does output a video with 201,387 kbits/s. My question is: how can I use the -cq constant quality mode without running into bitrate caps?
References: