On Mon, 18 Feb 2019 at 18:45, Laurentiu CHERA <[email protected]> wrote:
> 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 > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". Hi, 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 source. Hope that helps, Jaka
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
