In the last days, I investigated the capabilities of FFmpeg to support hardware acceleration during video processing. In the following I give a rough overview about my results.

First of all, one has to know the different available hardware acceleration APIs in FFmpeg. The FFmpeg trac gives an overview about this: https://trac.ffmpeg.org/wiki/HWAccelIntro

NVIDIA

NVIDIA describes the possibilities with their hardware and FFmpeg:
„GPU Accelerated Library FFmpeg“
„FFMPEG WITH NVIDIA ACCELERATION ON UBUNTU LINUX“ (Installation guide)
„NVIDIA VIDEO CODEC SDK“
„CUDA GPUs“ (list of supported cards, you need CUDA >= 2.0 for hardware acceleration)

Intel

Intel describes the possibilities with their hardware and FFmpeg:
„Get Fast Media Application Performance through Hardware Acceleration“
„Intel® Quick Sync Video and FFmpeg Installation and Validation“ (Installation guide)

Android

Google describes the possibilities with their operating system and FFmpeg:
„Compatibility Definition – Android 6.0“ (includes an overview about supported video/audio codecs depending on the Android version)

Supported video codecs

In the following tables I list all special codecs which can be used for hardware accelerated video processing under the corresponding operating system. Additionally, I have marked each tested codec with green text color. The results will be updated while the ongoing tests.

NVIDIA cards are supported by the nvenc modules.
Intel cards are supported by the qsv modules.

CodecDecodingEncoding
H.263
H.264h264_qsvh264_nvenc (Source),
h264_qsv
H.265/HEVChevc_qsvhevc_nvenc (Source),
hevc_qsv
MPEG 2mpeg2_qsvmpeg2_qsv
MPEG 4
VC1vc1_qsv
VP8
VP9

The embedded cards are supported by the MediaCodec modules.

CodecDecodingEncoding
H.263
H.264h264_mediacodec (Source)
H.265/HEVChevc_mediacodec (Source
MPEG 2
MPEG 4mpeg4_mediacodec (Source)
VC1
VP8vp8_mediacodec (Source
VP9vp9_mediacodec (Source

The graphic cards are supported by the VideoToolBox modules.

CodecDecodingEncoding
H.263
H.264h264_videotoolbox
H.265/HEVC
MPEG 2
MPEG 4
VC1
VP8
VP9

NVIDIA cards are supported by the nvenc modules.
Intel cards are supported by the qsv and vaapi modules.

CodecDecodingEncoding
H.263h263_cuvid (Source)
H.264h264_cuvid (Source),
h264_qsv
h264_nvenc (Source),
h264_qsv,
h264_vaapi
H.265/HEVChevc_cuvid (Source),
hevc_qsv
hevc_nvenc (Source),
hevc_qsv,
hevc_vaapi
MJPEGmjpeg_cuvid (Source)mjpeg_vaapi
MPEG 2mpeg2_cuvid,
mpeg2_qsv
mpeg2_qsv
MPEG 4mpeg4_cuvid (Source)
VC1vc1_cuvid (Source),
vc1_qsv
VP8vp8_cuvid (Source)
VP9vp9_cuvid

The embedded cards are supported by the MMAL modules.

CodecDecodingEncoding
H.263
H.264h264_mmal
H.265/HEVC
MPEG 2mpeg2_mmal
MPEG 4mpeg4_mmal
VC1vc1_mmal
VP8
VP9

Example for NVIDIA hardware

For a usual transcoding you would use a command like this to create H.264 video output:

ffmpeg -i big_buck_bunny_1080p_stereo.avi -c:v libx264 output_x264.mp4

Instead of the above, for a hardware accelerated encoding you can use the following command:

ffmpeg -i big_buck_bunny_1080p_stereo.avi -c:v h264_nvenc -profile high
-pixel_format yuv420p -preset default output_nv264.mp4

Especially for the nvenc modules you can use the following commands to get a list of supported profiles and presets.

ffmpeg -h encoder=nvenc_h264
ffmpeg -h encoder=nvenc_hevc