[Libav-user] packet flag AV_PKT_FLAG_KEY

Don Moir donmoir at comcast.net
Sat Nov 23 09:07:44 CET 2013


----- Original Message ----- 
From: Andy Shaules 
To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. 
Sent: Saturday, November 23, 2013 4:07 AM
Subject: Re: [Libav-user] packet flag AV_PKT_FLAG_KEY


On 11/23/2013 12:05 AM, Don Moir wrote:


----- Original Message ----- 
From: Andy Shaules 
To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. 
Sent: Saturday, November 23, 2013 12:55 AM
Subject: Re: [Libav-user] packet flag AV_PKT_FLAG_KEY


On 11/22/2013 7:47 PM, Don Moir wrote:

>>>Not sure what AV_PKT_FLAG_KEY is supposed to mean. The assumption to me early on is it represented a key frame but not necessarily.

>>>Is it not a application flag ?

>>>Seems for at least H264 it doesnt have much meaning to application. If the packet dts value is in the stream index_entires then that represents a key frame for sure ( hopefully :)

>>>What if there are no index_entries ? Whats a key packet then and how to determine ?

>>>Just trying to clear up my own confusion with this.


>>For h264, the key frame network abstraction unit of the packet will be of type IDR, instant data refresh. 
>>I believe NAL type 5. 

>>Thanks Andy. 

>>Dont see that info in a packet. Only thing relevant that changes is the flags member (0 or 1). Now frame may contain additional info after decoding but it's documented that >>AV_PKT_FLAG_KEY represents a keyframe.

>>If it is for internal use, a different flag should have been used the way I see it. So trying to understand what the real intended use of AV_PKT_FLAG_KEY is.


>Imagine H264 at HD resolution with 5 or 6 horizontal slices where the key frame only equals one horizontal strip

Yeah I get that. It sure knows that a packet is a key packet when it adds it to the index_entries but packet flag does not correspond. Seems like the packet flag should correspond to the index_entries. Yes or No ?





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131123/e36d2f4d/attachment.html>


More information about the Libav-user mailing list