libaom-av1 offers a simple “Average Bitrate” or “Target Bitrate” mode.
NOTE: Use this option only if file size and encoding time are more important factors than quality alone.
time ffmpeg -i a.mp4 -c:v libaom-av1 -b:v 2M -f mp4 out.mp4
returns:
... real 106m2.063s user 601m51.372s sys 0m34.574s
NOTE:
NOTE: The bitrate limit by the -b:v where the bitrate MUST be non-zero.