libaom-av1 has a constrained quality (CQ) mode that will ensure that a constant (perceptual) quality is reached while keeping the bitrate below a specified upper bound or within a certain bound.
time ffmpeg -i a.mp4 -c:v libaom-av1 -crf 30 -b:v 2000k -f mp4 out.mp4
returns:
... real 104m57.062s user 599m4.884s sys 0m32.345s
NOTE:
NOTE: The quality is determined by the -crf, and the bitrate limit by the -b:v where the bitrate MUST be non-zero.