chenxinfeng4 / ffmpegcv

The ffmpegcv is a ffmpeg backbone for open-cv like Video Reader and Writer
164 stars 24 forks source link

Support for AMD gpu decoding #54

Open QBos07 opened 3 hours ago

QBos07 commented 3 hours ago

Unlike encoding, there is not a specific codec for decoding. You rather use -hwaccel d3d11va (DirectX 11) or dxva2 (DirectX 9).

A good enough fix for me would be the option of passing a custom parameter or passing a hwaccel value.

chenxinfeng4 commented 2 hours ago

Well, I don't have an AMD GPU in my possession. The DirectX 9 appears to be compatible only with Windows. Neither is interesting for me.

Additionally, NVIDIA offers a superior choice. The NVIDIA NVDEC is capable of performing crop +resize operations directly within the GPU decoding process, which is perfect. Such a feature seems to be absent in GPUs from Intel, AMD, and Apple Silicon.

Incidentally, incorporating 'custom parameter' options, as you've mentioned, is indeed a good suggestion.

QBos07 commented 2 hours ago

Decoding can be done on Linux using VAAPI or VDPAU. Encoding is expermintal on VAAPI and stable on Windows with AMF.