FFmpeg on Linux supports QSV either through the h264_qsv encoder or through some soon-to-be-merged va-api changes. On Mac I think you need to use the VideoToolbox API to access the GPU codec, and there is support for this in FFmpeg as well, but I haven't used it myself.