Changes between Version 33 and Version 34 of HWAccelIntro
- Timestamp:
- May 17, 2016, 8:57:34 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HWAccelIntro
v33 v34 1 [[PageOutline(2, Contents)]] 2 1 3 FFmpeg provides a subsystem for hardware acceleration. 2 4 … … 53 55 † Actually yes, but is deprecated and should not be used. 54 56 55 == VDPAU (Video Decode and Presentation API for Unix) == 57 == VDPAU == 58 [http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/index.html Video Decode and Presentation API for Unix]. Developed by NVidia for UNIX/Linux systems. To enable this you typically need the libvdpau development package in your distribution, and a compatible graphic card. 56 59 57 Developed by NVidia for UNIX/Linux systems. To enable this you typically need the libvdpau development package in your distribution, and a compatible graphic card. 58 59 Official website: 60 http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/index.html 61 62 Note that VDPAU cannot be used to decode frames in memory, the compressed frames are sent by libavcodec to the GPU device supported by VDPAU and then the decoded image can be accessed using the VDPAU API. This is not done automatically by FFmpeg, but must be done at the application level (check for example the ffmpeg_vdpau.c file used by ffmpeg.c). Also note that with this API it is not possible to move the decoded frame back to RAM, for example in case you need to encode again the decoded frame (e.g. when doing transcoding on a server). 60 Note that VDPAU cannot be used to decode frames in memory, the compressed frames are sent by libavcodec to the GPU device supported by VDPAU and then the decoded image can be accessed using the VDPAU API. This is not done automatically by FFmpeg, but must be done at the application level (check for example the {{{ffmpeg_vdpau.c}}} file used by {{{ffmpeg.c}}}). Also, note that with this API it is not possible to move the decoded frame back to RAM, for example in case you need to encode again the decoded frame (e.g. when doing transcoding on a server). 63 61 64 62 Several decoders are currently supported through VDPAU in libavcodec, in particular MPEG Video, VC-1, H.264, MPEG4. … … 114 112 == NVENC == 115 113 116 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 {{{nvenc_h264}}} and {{{nvenc_hevc}}} encoders. In order to enable it in FFmpeg you need to locally install the {{{nvEncodeAPI.h}}} headers from the NVENC SDK and configure with {{{--enable-nvenc}}}.114 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 {{{nvenc_h264}}} and {{{nvenc_hevc}}} encoders. In order to enable it in FFmpeg you need: 117 115 118 To read more about the supported GPUs and download the NVENC SDK go to the following link: 119 https://developer.nvidia.com/nvidia-video-codec-sdk 116 * A supported GPU 117 * Supported drivers 118 * Locally installed {{{nvEncodeAPI.h}}} header files from the NVENC SDK 119 * {{{ffmpeg}}} configured with {{{--enable-nvenc}}} 120 121 Visit [https://developer.nvidia.com/nvidia-video-codec-sdk NVIDIA Video Codec SDK] to download the SDK and to read more about the supported GPUs and supported drivers. 120 122 121 123 Usage example: 122 124 {{{ 123 ffmpeg -i input -c:v nvenc -r 30 -profile high444p -pixel_format yuv444p -preset default -crf 30 -b:a 128k output125 ffmpeg -i input -c:v nvenc_h264 -profile high444p -pixel_format yuv444p -preset default output.mp4 124 126 }}} 125 127 126 you can see available presets with “-preset help” 127 128 Other [https://github.com/FFmpeg/FFmpeg/blob/079b5d4ef888bd42bf0147a6d964b8bc9ec0f3c5/libavcodec/nvenc.c#L1480 options] appear to be level, tier, cbr, 2pass, buffer_delay 128 You can see available presets, other options, and encoder info with {{{ffmpeg -h encoder=nvenc_h264}}} or {{{ffmpeg -h encoder=nvenc_hevc}}}. 129 129 130 130 {{{ 131 hq = high quality 132 hp = high performance 133 bd = Bluray Disk 134 ll = low latency 135 llhq = low latency high quality 136 llhp = low latency high performance 137 default = between llhq and llhp (same as ll?) 131 #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;" 132 '''Note:''' If you get the {{{No NVENC capable devices found}}} error make sure you're encoding to a supported pixel format. See encoder info as shown above. 138 133 }}} 139 134
