Why M-series Macs are special
Apple Silicon SoCs have dedicated media engines (the M3 Pro has 2 of them, the M3 Max has 4). They're staggeringly fast at H.264/HEVC/ProRes encode/decode. You won't get this speed from any consumer CPU. Even an M1 Pro outperforms a desktop Ryzen 9 + RTX 4080 on H.265 hardware encode for daily clips.
The optimal pattern
Decode in hardware (-hwaccel videotoolbox), keep frames on the GPU memory if you can avoid filters that force a CPU round-trip, encode in hardware. Result: a 4K 30-min source transcodes to H.265 in about 2 minutes.