[Libav-user] Extracting DNx compression id from ARES

Jaka Bac jakabac at gmail.com
Mon Feb 18 23:34:50 EET 2019

On Mon, 18 Feb 2019 at 18:45, Laurentiu CHERA <chera.laurentiu at gmail.com>

> Dear all,
> Is there a way to get the codec compression id from FFmpeg at the moment?
> I know that we can change the source code to get that particular
> information, but I was wondering whether there's already an API in place
> for doing that.
> For example DNX 444 = 1270 - Compression ID 1270.
> Thanks,
> Cristian
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".


It looks like that the dnxhd decoder will populate AVCodecContext->profile
member when parsing DNxHD header.

It will do this:
ctx->avctx->profile = dnxhd_get_profile(cid);

and dnxhd_get_profile() is defined as:
static int dnxhd_get_profile(int cid)
       switch(cid) {
       case 1270:
           return FF_PROFILE_DNXHR_444;
       case 1271:
           return FF_PROFILE_DNXHR_HQX;
       case 1272:
           return FF_PROFILE_DNXHR_HQ;
       case 1273:
           return FF_PROFILE_DNXHR_SQ;
       case 1274:
           return FF_PROFILE_DNXHR_LB;
       return FF_PROFILE_DNXHD;

The FF_PROFILE_* macros are defined in avcodec.h, so those are part of the
public API

If you need the CIDs for DNxHD then you will probably need to modify the

Hope that helps,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190218/1fd85095/attachment.html>

More information about the Libav-user mailing list