ffmpeg 将转码使用到显卡上

ffmpeg.exe -hwaccels

Hardware acceleration methods:
cuda
dxva2
qsv
d3d11va
opencl
vulkan

ffmpeg -decoders


 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid)
         (encoders: libx264 libx264rgb h264_amf h264_mf h264_nvenc h264_qsv)
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid)
        (encoders: libx265 hevc_amf hevc_mf hevc_nvenc hevc_qsv)

 

 

//ok
 ffmpeg.exe  -i E:\D\video\music\libgav1-china.mp4  -c:v h264_nvenc -preset slow E:\D\video\music\libgav1-china-xx.mp4

 

 

//视频会有卡顿
使用CUVID和NVENC实现全硬件转码:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv

部分硬件转码,帧通过系统内存(这是必要的转码10位内容):
ffmpeg -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv

posted @ 2024-11-27 22:44  YZFHKMS-X  阅读(0)  评论(0编辑  收藏  举报