1 year ago

#188629

test-img

hameed abbasi

Scale AVFrame by AV_PIX_FMT_CUDA format on GPU memory using FFMPEG

I've even tried the av_hwframe_transfer_data, transferring the hardware-decoded frame to RAM and got another frame format AV_PIX_FMT_NV12 but still the sws_scale can't resize it, saying the hardware pixel format is not supported.

the funny part is, the sws_getContext makes SwsContext from those frames without any error!

I've seen suggestions about scale_npp, vf_scale_npp and etc. but couldn't find any run-able snippet about how to use those.

ffmpeg build config included these flags too:

--enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid --enable-ffnvcodec --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-gpl

Any peace of code is appreciated. Thanks in advance.

ffmpeg

npp

0 Answers

Your Answer

Accepted video resources