Here is what I found on the topic:
For starters, here's a pretty good answer right here on superuser.com relating to how you can increase your
Apple M1 7-Core GPU
Next, here is probably the best resources I found on the topic for you and your M1 Mac at least:
 https://superuser.com/a/1324326/1211883 ⭐️⭐️⭐️⭐️
 https://trac.ffmpeg.org/wiki/HWAccelIntro#VideoToolbox ⭐️⭐️⭐️⭐️⭐️
 https://doesitarm.com/tv/running-ffmpeg-on-mac-with-apple-silicon-m1-i-woz7p7zmz2s/ ⭐️⭐️⭐️⭐️
 https://github.com/cdgriffith/FastFlix/issues/196 ⭐️⭐️⭐️
On macOPS there’s videotoolbox.
Check this out for the encoder options:
ffmpeg -hide_banner -h encoder=hevc_videotoolbox
Essentially you've got to use the
encoder=hevc_videotoolbox hardware encoder.
And here are probably the best resources I found relating to nvidia gpus, just incase someone has one of those instead:
It states that:
"Activating support for hardware acceleration when building [ffmpeg] from source requires some extra steps:"
Which you'll probably want to do what it says there and add support for hardware acceleration onto your ffmpeg installation.
Then under the "Multi-GPU" heading within  it states the following:
Encoding and decoding work must be explicitly assigned to a GPU when using multiple GPUs in one system. GPUs are identified by their index number; by default all work is performed on the GPU with index 0. Use the following command to obtain a list of all NVIDIA GPUs in the system and their corresponding ID numbers:
ffmpeg -vsync 0 -i input.mp4 -c:v h264_nvenc -gpu list -f null –
Once you know the index, the -hwaccel_device index flag can be used to set the active GPU for decoding and encoding. In the example below the work will be executed on the gpu with index 1.
ffmpeg -vsync 0 -hwaccel cuvid -hwaccel_device 1 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4
Other Helpful Resources
Lastly, the ffmpeg docs themselves probably wouldn't hurt to check out:
Again, this resource is awesome showing all the different
ffmpeg platform availabilities and
ffmpeg gpu options by platform:
I'm trying to level up so I can actually vote on some posts going forward, so I hope this helps!
But yea, trying to transcode video in a timely manner is always fun; 🤞😉 I do wish you the best of luck in all your endeavors!! 😂