Changes between Version 92 and Version 93 of HWAccelIntro


Ignore:
Timestamp:
Jan 19, 2024, 9:53:58 PM (3 years ago)
Author:
Roger Pack
Comment:

hope this is right

Legend:

Unmodified
Added
Removed
Modified
  • HWAccelIntro

    v92 v93  
    234234}}}
    235235
    236 
    237 If ffmpeg was compiled with support for libnpp, it can be used to insert a GPU based scaler into the chain:
    238 {{{
    239 ffmpeg -hwaccel_device 0 -hwaccel cuda -i input -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow output.mkv
     236AV1 NVDEC HW decoding requires using -c:v av1:
     237
     238{{{
     239ffmpeg -hwaccel nvdec -c:v av1 -i input_av1.mp4 output.ts
     240}}}
     241
     242An example using scale_cuda and encoding in hardware, scale_cuda is available if compiled with ffnvcodec and `--enable-cuda-llvm` (default is on, requires nvidia llvm to be present at runtime):
     243
     244{{{
     245ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i file.mkv -noautoscale -filter_complex [0:0]scale_cuda=1280:-2[out] -map [out] -c:v hevc_nvenc -cq 28 output.mp4
     246}}}
     247
     248another example
     249
     250{{{
     251ffmpeg -hwaccel_device 0 -hwaccel cuda -i input -vf scale_cuda=-1:720 -c:v h264_nvenc -preset slow output.mkv
    240252}}}
    241253
    242254The {{{-hwaccel_device}}} option can be used to specify the GPU to be used by the hwaccel in ffmpeg.
    243 
    244 AV1 NVDEC HW decoding requires using -c:v av1:
    245 
    246 
    247 {{{
    248 ffmpeg -hwaccel nvdec -c:v av1 -i input_av1.mp4 output.ts
    249 }}}
    250 
    251 Here's an example using scale_cuda and encoding in hardware, scale_cuda is available if compiled with ffnvcodec and `--enable-cuda-llvm` (default is on, requires nvidia llvm to be present at runtime):
    252 
    253 {{{
    254 ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i file.mkv -noautoscale -filter_complex [0:0]scale_cuda=1280:-2[out] -map [out] -c:v hevc_nvenc -cq 28 output.mp4
    255 }}}
    256255
    257256== cuda-nvcc and libnpp ==
     
    263262
    264263Both of these are basically "older" cuvid options that require the nvidia SDK to be present when compiled and run.  libnpp provides scale_npp (and a few other _npp filters).  They might have different options/flexibility than their XX_cuda equivalent.  Might be similar performance.  These have more funky licensing (nonfree).  cuda-nvcc has basically been replaced with ffnvcodec + cuda-llvm, scale_npp with scale_cuda.
     264
     265Example:
     266
     267{{{
     268ffmpeg -hwaccel cuda -i input -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow output.mkv
     269}}}
     270
    265271
    266272= libmfx (Intel Media SDK) =