<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, 18 Feb 2019 at 18:45, Laurentiu CHERA <<a href="mailto:chera.laurentiu@gmail.com">chera.laurentiu@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear all,<div><br></div><div>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.</div><div><br></div><div>For example <span style="color:rgb(0,0,0);font-family:OpenSans,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">DNX 444 = 1270 - Compression ID 1270.</span></div><div><span style="color:rgb(0,0,0);font-family:OpenSans,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:OpenSans,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">Thanks,</span></div><div><span style="color:rgb(0,0,0);font-family:OpenSans,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">Cristian</span></div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote><div><br></div><div>Hi,</div><div><br></div><div>It looks like that the dnxhd decoder will populate AVCodecContext->profile member when parsing DNxHD header.</div><div><br></div><div>It will do this:</div><div>ctx->avctx->profile = dnxhd_get_profile(cid);<br></div><div><br></div><div>and dnxhd_get_profile() is defined as:</div><div><div>static int dnxhd_get_profile(int cid)</div><div> {</div><div> switch(cid) {</div><div> case 1270:</div><div> return FF_PROFILE_DNXHR_444;</div><div> case 1271:</div><div> return FF_PROFILE_DNXHR_HQX;</div><div> case 1272:</div><div> return FF_PROFILE_DNXHR_HQ;</div><div> case 1273:</div><div> return FF_PROFILE_DNXHR_SQ;</div><div> case 1274:</div><div> return FF_PROFILE_DNXHR_LB;</div><div> }</div><div> return FF_PROFILE_DNXHD;</div><div> }</div></div><div><br></div><div>The FF_PROFILE_* macros are defined in avcodec.h, so those are part of the public API</div><div><br></div><div>If you need the CIDs for DNxHD then you will probably need to modify the source.</div><div><br></div><div>Hope that helps,</div><div>Jaka</div></div></div></div></div>