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.
解碼經(jīng)過系統(tǒng)內(nèi)存
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
這種情況,解碼器會將解碼后的數(shù)據(jù)拷貝到系統(tǒng)內(nèi)存。
完全硬件轉(zhuǎn)碼
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完成。
部分硬件轉(zhuǎn)碼
Partial hardware transcode, with frames passed through system memory:
ffmpeg -c:v h264_cuvid -i input -c:v h264_nvenc -preset slow output.mkv
部分硬件解碼。解碼后的數(shù)據(jù)會通過系統(tǒng)內(nèi)存。