Intel GPU及NVIDIA GPU對視頻編解碼支持情況

 編解碼可以軟編實現(CPU),或者硬編(GPU),當然還可以使用專用的編解碼卡(IC),他們各有優點,但是基於硬件的處理往往速度更快。但是也有人說軟編有更大的可調節性。這裏我們只記錄硬編的硬件支持情況,尤其是軟編效率沒有上來的情況下這顯得尤其重要。

廢話不多說,先上intel GPU QSV硬編解情況:

摘自:https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding

ffmpeg qsv使用方法:https://trac.ffmpeg.org/ticket/5899

重點:

CQ:

./ffmpeg_g -y -i in.mp4 -an -c:v hevc_qsv -load_plugin hevc_hw -q 30 out.mp4

CBR:

./ffmpeg_g -y -i in.mp4 -an -c:v hevc_qsv -load_plugin hevc_hw -b 5M -maxrate 5M out.mp4

注意:hevc_qsv只輸出IB幀,無P幀。我反覆嘗試了N次後依然如此,尤其是其中有個-r 1(no B frames)給人無B幀的希望

。有段Intel人員給的解釋如下:

 Sorry for a delayed response. Media SDK HW HEVC encoder uses Low Delay B-frames (LDB) or Generalized P/B (GPB) instead of P-frames. So, instead of encode P-frame with L0, Media SDK encodes LDB or GPB with the same L0 and L1. That's why you see just such LDB or GPB frame where both the L0 and L1 lists have the same I frame for reference and no P-frames. 
出處:https://software.intel.com/en-us/forums/intel-media-sdk/topic/623600

nvidia nvenc:


摘自:https://developer.nvidia.com/nvidia-video-codec-sdk#NVENCFeatures

https://developer.nvidia.com/video-encode-decode-gpu-support-matrix#Encoder