[FFmpeg-devel] How to Decode Packet Encoded in Hardware (nvenc)?

Timo Rothenpieler timo at rothenpieler.org
Mon Jan 20 01:54:23 EET 2020


On 20.01.2020 00:50, Ming Ying wrote:
> Yes, understood...my question was more about changing the pixel format from AV_PIX_FMT_CUDA to YUV420P. If I understand correctly, a frame encoded using h264_nvenc will have the CUDA pixel format (I specified this when I created the hardware frame context). When I decode the frame, how do I get it to YUV?

h264 does not have a pixel format until something decodes it.
What pixel format you get when decoding is entirely up to the decoder, 
not the video itself.


More information about the ffmpeg-devel mailing list