美文网首页
ffmpeg # CUDA/CUVID/NVDEC # 完全硬件

ffmpeg # CUDA/CUVID/NVDEC # 完全硬件

作者: FlyingPenguin | 来源:发表于2018-09-10 10:05 被阅读765次

    CUVID, which is also called NVDEC by NVIDIA now, can be used for decoding on Windows and Linux.
    In combination with NVENC, it offers full hardware transcoding.

    CUVID offers decoders for H.264, HEVC, MJPEG, MPEG-1/2/4, VP8/VP9, VC-1.
    Codec support varies by hardware.
    The full set of codecs being available only on Pascal hardware, which adds VP9 and 10 bit support.

    解码经过系统内存

    Sample decode using CUVID, the cuvid decoder copies the frames to system memory in this case:

    ffmpeg -c:v h264_cuvid -i input output.mkv
    

    这种情况,解码器会将解码后的数据拷贝到系统内存。

    完全硬件转码

    Full hardware transcode with CUVID and NVENC:

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv
    

    加了 -hwaccel cuvid之后,这种情况完全通过显卡GPU完成。

    部分硬件转码

    Partial hardware transcode, with frames passed through system memory:

    ffmpeg -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv
    

    部分硬件解码。解码后的数据会通过系统内存。

    References:

    https://trac.ffmpeg.org/wiki/HWAccelIntro

    相关文章

      网友评论

          本文标题:ffmpeg # CUDA/CUVID/NVDEC # 完全硬件

          本文链接:https://www.haomeiwen.com/subject/howjgftx.html