[FFmpeg-devel] [PATCH] lavc/cuvid: fail early if GPU can't handle video parameters

Philip Langdale philipl at overt.org
Sun Jan 22 21:40:51 EET 2017


On Sun, 22 Jan 2017 12:12:26 -0700
Pavel Koshevoy <pkoshevoy at gmail.com> wrote:

> Yeah, but I don't even get a 1st frame failure with YUV420P 8K from 
> h264_cuvid -- all I ever get is a 0 from avcodec_send_packet and 
> AVERROR(EAGAIN) from avcodec_receive_frame.  This is what I've
> observed with GeForce GT 730 and GeForce GTX 1060 on openSUSE 42.2
> and Ubuntu 16.04 with latest nvidia drivers.
>
I tested the 8K h.264 sample, and my experience is the same as yours.
It really does just stall out.

Given that, it looks like the dimensions check can only be done in the
way that you've done it. But we shouldn't add the chroma format check;
we already have the check after the parser calls handle_video_sequence
so that the first frame will fail - and that's reliable because it uses
the cuvid parser and doesn't rely on the externally probed values.

So, can you update the patch to just check the dimensions?

 
> I will try to make my application more robust too -- I will have to 
> buffer all the packets sent to the decoder until the 1st frame either 
> succeeds or fails, so I can re-send the same packets to another
> decoder in case of 1st frame failure.

Yeah. It's not fun but it is necessary. wm4 did this for mpv.

Thanks,

--phil


More information about the ffmpeg-devel mailing list