Changes between Version 66 and Version 67 of HWAccelIntro
- Timestamp:
- Dec 31, 2018, 11:57:50 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HWAccelIntro
v66 v67 17 17 || ||= AMD =||= Intel =||= NVIDIA =||= AMD =||= Intel =||= NVIDIA =||= =||= macOS =||= iOS =||= Raspberry Pi =|| 18 18 ||= AMF=|| N || N || N || **Y** || N || N || N || N || N || N || 19 ||= CUDA / CUVID / NVENC=|| N || N || **Y** || N || N || **Y** || N || N || N || N ||19 ||= NVENC/NVDEC/CUVID=|| N || N || **Y** || N || N || **Y** || N || N || N || N || 20 20 ||= Direct3D 11=|| N || N || N || **Y** || **Y** || **Y** || N || N || N || N || 21 21 ||= Direct3D 9 ^(DXVA2)^=|| N || N || N || **Y** || **Y** || **Y** || N || N || N || N || … … 41 41 || || Internal || Standalone || Hardware output || Standalone || Hardware input || Filtering || Hardware context || Usable from ffmpeg CLI || 42 42 || AMF || N || N || N || Y || Y || N || Y || Y || 43 || CUDA / CUVID / NVENC|| N || Y || Y || Y || Y || Y || Y || Y ||43 || NVENC/NVDEC/CUVID || N || Y || Y || Y || Y || Y || Y || Y || 44 44 || Direct3D 11 || Y || - || Y || - || - || F || Y || Y || 45 45 || Direct3D 9 / DXVA2 || Y || - || Y || - || - || N || Y || Y || … … 115 115 [https://developer.apple.com/documentation/videotoolbox VideoToolbox], only supported on macOS. H.264 decoding is available in FFmpeg/libavcodec. 116 116 117 = NVENC = 118 119 NVENC is an API developed by NVIDIA which enables the use of NVIDIA GPU cards to perform H.264 and HEVC encoding. FFmpeg supports NVENC through the {{{h264_nvenc}}} and {{{hevc_nvenc}}} encoders. In order to enable it in FFmpeg you need: 120 121 * A supported GPU 117 = NVENC/NVDEC = 118 119 NVENC and NVDEC are NVIDIA's hardware-accelerated encoding and decoding APIs. They used to be called CUVID. They can be used for encoding and decoding on Windows and Linux. 120 121 == NVENC == 122 123 NVENC can be used for H.264 and HEVC encoding. FFmpeg supports NVENC through the {{{h264_nvenc}}} and {{{hevc_nvenc}}} encoders. In order to enable it in FFmpeg you need: 124 125 * A [https://developer.nvidia.com/video-encode-decode-gpu-support-matrix supported GPU] 122 126 * Supported drivers 123 * {{{ffmpeg}}} configured with out {{{--disable-nvenc}}}127 * {{{ffmpeg}}} configured with {{{--enable-nvenc}}} (default if the drivers are detected while configuring) 124 128 125 129 Check [https://developer.nvidia.com/nvidia-video-codec-sdk the NVIDIA website] for more info on the supported GPUs and drivers. … … 143 147 }}} 144 148 145 = CUDA/CUVID/NVDEC = 146 147 CUVID, which is also called NVDEC by NVIDIA now, can be used for decoding on Windows and Linux. 148 In combination with NVENC, it offers full hardware transcoding. 149 150 CUVID offers decoders for H.264, HEVC, MJPEG, MPEG-1/2/4, VP8/VP9, VC-1. 151 Codec support varies by hardware. The full set of codecs being available only on Pascal hardware, which adds VP9 and 10 bit support. 152 153 Sample decode using CUVID, the cuvid decoder copies the frames to system memory in this case: 154 {{{ 155 ffmpeg -c:v h264_cuvid -i input output.mkv 149 == NVDEC/CUVID == 150 151 NVDEC offers decoders for H.264, HEVC, MJPEG, MPEG-1/2/4, VP8/VP9, VC-1. Codec support varies by hardware (see the [https://developer.nvidia.com/video-encode-decode-gpu-support-matrix GPU compatibility table]). 152 153 Note that FFmpeg offers both NVDEC and CUVID `hwaccel`s. They differ in how frames are decoded and forwarded in memory. 154 155 The full set of codecs being available only on Pascal hardware, which adds VP9 and 10 bit support. The note about missing `ffnvcodec` from NVENC applies for NVDEC as well. 156 157 Sample decode using NVDEC: 158 159 {{{ 160 ffmpeg -hwaccel nvdec input output 161 }}} 162 163 Sample decode using CUVID: 164 165 {{{ 166 ./ffmpeg-git -hwaccel cuvid -c:v h264_cuvid -i input output 156 167 }}} 157 168 158 169 Full hardware transcode with CUVID and NVENC: 159 {{{ 160 ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv 161 }}} 162 163 Partial hardware transcode, with frames passed through system memory: 164 {{{ 165 ffmpeg -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv 166 }}} 170 171 {{{ 172 ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output 173 }}} 174 167 175 168 176 If ffmpeg was compiled with support for libnpp, it can be used to insert a GPU based scaler into the chain: 169 177 {{{ 170 ffmpeg -hwaccel_device 0 -hwaccel cuvid - c:v h264_cuvid -i input -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow output.mkv171 }}} 172 The {{{-hwaccel_device}}} option can be used to specify the GPU to be used by the cuvid hwaccel in ffmpeg. 173 174 The note about missing `ffnvcodec` from NVENC applies for CUVID/NVDEC as well. 178 ffmpeg -hwaccel_device 0 -hwaccel cuvid -i input -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow output.mkv 179 }}} 180 181 The {{{-hwaccel_device}}} option can be used to specify the GPU to be used by the hwaccel in ffmpeg. 182 175 183 176 184 = libmfx =
