MediaSDK icon indicating copy to clipboard operation
MediaSDK copied to clipboard

Any sample code on encoding D3D11 texture on QSV encoder using FFMPEG?

Open caioavidal opened this issue 2 years ago • 2 comments

Hi. I've been looking for a way to start encoding d3d11 texture on QSV encoder using ffmpeg lib. So far I have derived qsv device from d3d11va device and also mapped the frames from d3d11va to qsv. However when I try to encode the frames I'm getting device failed.

OBS: Same texture is working well on nvenc.

Do we happen to have any sample code for it anywhere?

caioavidal avatar May 29 '22 11:05 caioavidal

Hi @caioavidal did u find any way to achieve what u want ? I want to encode also ID3D11Texture2d using qsv and ffmpeg but no luck I was able to copy bytes of the texture from GPU to CPU memory and then encoding them using ffmpeg and qsv but I want to skip transferring the bytes from GPU to CPU and send them back to GPU thx in advance

hassan379 avatar Aug 27 '22 12:08 hassan379

Hi @caioavidal did u find any way to achieve what u want ? I want to encode also ID3D11Texture2d using qsv and ffmpeg but no luck I was able to copy bytes of the texture from GPU to CPU memory and then encoding them using ffmpeg and qsv but I want to skip transferring the bytes from GPU to CPU and send them back to GPU thx in advance

Nothing yet. I managed to do the same as you did but seems that copying directly from GPU to encode simply does not work. What error are you facing when you try to encode the frame?

caioavidal avatar Aug 27 '22 17:08 caioavidal