How to identify I frame or IDR frame?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to identify I frame or IDR frame?

penguin flying
After reading a frame like this:

AVFormatContext *ifmt_ctx = NULL;
AVPacket pkt = { .data = NULL, .size = 0 };
...

if ((ret = av_read_frame(ifmt_ctx, &pkt)) < 0)
            break;

How to identify this video frame is IDR frame or not ?

as far as I know,
(pkt.flags & AV_PKT_FLAG_KEY)  only show it is a keyframe,
but can not identify is a IDR frame.

PS: video codec is 264 or 265
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to identify I frame or IDR frame?

penguin flying
In the situation without decoding, how to identify it ?

penguin flying <[hidden email]> 于2020年7月19日周日 上午11:56写道:

> After reading a frame like this:
>
> AVFormatContext *ifmt_ctx = NULL;
> AVPacket pkt = { .data = NULL, .size = 0 };
> ...
>
> if ((ret = av_read_frame(ifmt_ctx, &pkt)) < 0)
>             break;
>
> How to identify this video frame is IDR frame or not ?
>
> as far as I know,
> (pkt.flags & AV_PKT_FLAG_KEY)  only show it is a keyframe,
> but can not identify is a IDR frame.
>
> PS: video codec is 264 or 265
>
>
>
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".