Try compiling ffmpeg with `--enable-librav1e` and use the `rav1e` encoder implementation. It's supposed to be the fastest software encoder, though of course it can still quite slow depending on the settings.
If you have a newish Intel CPU they're supposed to have good AV1 hardware encoding support. See SVT-AV1. (which ffmpeg also supports: https://trac.ffmpeg.org/wiki/Encode/AV1#SVT-AV1 )