[Libav-user] How to detect 9/10 bits video?

Jean-Yves Avenard jyavenard at gmail.com
Fri May 2 04:43:53 CEST 2014


Hi


On 1 May 2014 19:45, wm4 <nfxjfg at googlemail.com> wrote:
> Use the video's profile. Alternatively, you can try to setup the
> AVCodecContext to do vdpau decoding, which will fail if the video is
> 9/10 bit (it will try to fallback to software decoding, which you can
> detect). But note that there are 8 bit videos which can't be decoded
> with most hw decoders, so the profile should be checked too.

Thank for your answer.

Unfortunately, it's not quite so easy...
opening AVCodecContext for VDPAU playback with 9/10 bits video doesn't fail.
It's only when you attempt to decode the video frame that it will and
by this time it's too late as everything as been set for vdpau.

I wanted to find a way early on, and would prefer not to test for just
the profile as I'm sure there will be others that will fail and I
can't think of right now...

Any ideas on how to make sure opening the stream, context or codec
that will cause it to fail early?


More information about the Libav-user mailing list