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

wm4 nfxjfg at googlemail.com
Thu May 1 11:45:15 CEST 2014

On Thu, 1 May 2014 15:47:17 +1000
Jean-Yves Avenard <jyavenard at gmail.com> wrote:

> Hi
> What would be the best way to detect if a video is using 9 or 10
> bits-depth video?
> As VDPAU (and many other hardware accelerated decoding) do not support
> this, I'd like to detect those video and use software decoding
> instead.

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.

More information about the Libav-user mailing list