GST_BUFFER_FLAG_DROPPABLE to detect keyframes?

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

GST_BUFFER_FLAG_DROPPABLE to detect keyframes?

Juan Navarro
Should GST_BUFFER_FLAG_DROPPABLE be considered when trying to identify
video keyframes?

Docs on buffer flags are a bit too precise about what each flag does,
but tend to be vague about what it actually _means_ in the more general
sense, so I haven't been able to discern if this is enough to classify a
buffer as keyframe:

!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)

or if this would be a better / more robust choice:

!( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
     || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )

or if these two flags are related in such way that they will always come
together when the frame is indeed a keyframe, and thus this expression
would be better:

!( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
     && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )

Here they say "maybe" it's a good idea checking for "DROPPABLE":
https://stackoverflow.com/a/52873803

And here it is mentioned that "NON_DROPPABLE" might mean keyframe, so I
guess by extension we should assume that "DROPPABLE" might mean
non-keyframe:
https://gstreamer.freedesktop.org/releases/1.14/ (under "New RTP
features and improvements")

But I'm missing a more concrete piece of text talking about the
implications of DELTA_UNIT, DROPPABLE / NON_DROPPABLE, and the meaning
of their possible combinations, if any.

Could someone that knows about this share a bit of know-how?

Thanks :)
Juan
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GST_BUFFER_FLAG_DROPPABLE to detect keyframes?

Olivier Crête-3
Hi,

DROPPABLE isn't related to keyframes.. !DELTA is all you need. A
keyframe could even be droppable.

Olivier

On Mon, 2020-02-17 at 17:26 +0100, Juan Navarro wrote:

> Should GST_BUFFER_FLAG_DROPPABLE be considered when trying to identify
> video keyframes?
>
> Docs on buffer flags are a bit too precise about what each flag does,
> but tend to be vague about what it actually _means_ in the more general
> sense, so I haven't been able to discern if this is enough to classify a
> buffer as keyframe:
>
> !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>
> or if this would be a better / more robust choice:
>
> !( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>      || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )
>
> or if these two flags are related in such way that they will always come
> together when the frame is indeed a keyframe, and thus this expression
> would be better:
>
> !( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>      && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )
>
> Here they say "maybe" it's a good idea checking for "DROPPABLE":
> https://stackoverflow.com/a/52873803
>
> And here it is mentioned that "NON_DROPPABLE" might mean keyframe, so I
> guess by extension we should assume that "DROPPABLE" might mean
> non-keyframe:
> https://gstreamer.freedesktop.org/releases/1.14/ (under "New RTP
> features and improvements")
>
> But I'm missing a more concrete piece of text talking about the
> implications of DELTA_UNIT, DROPPABLE / NON_DROPPABLE, and the meaning
> of their possible combinations, if any.
>
> Could someone that knows about this share a bit of know-how?
>
> Thanks :)
> Juan
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Olivier Crête
[hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GST_BUFFER_FLAG_DROPPABLE to detect keyframes?

Nicolas Dufresne-5


Le lun. 17 févr. 2020 12 h 45, Olivier Crête <[hidden email]> a écrit :
Hi,

DROPPABLE isn't related to keyframes.. !DELTA is all you need. A
keyframe could even be droppable.

Be aware though that not all keyframes are synchronization point. It all depends on the use case. In some use case we track the header flag.


Olivier

On Mon, 2020-02-17 at 17:26 +0100, Juan Navarro wrote:
> Should GST_BUFFER_FLAG_DROPPABLE be considered when trying to identify
> video keyframes?
>
> Docs on buffer flags are a bit too precise about what each flag does,
> but tend to be vague about what it actually _means_ in the more general
> sense, so I haven't been able to discern if this is enough to classify a
> buffer as keyframe:
>
> !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>
> or if this would be a better / more robust choice:
>
> !( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>      || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )
>
> or if these two flags are related in such way that they will always come
> together when the frame is indeed a keyframe, and thus this expression
> would be better:
>
> !( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
>      && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )
>
> Here they say "maybe" it's a good idea checking for "DROPPABLE":
> https://stackoverflow.com/a/52873803
>
> And here it is mentioned that "NON_DROPPABLE" might mean keyframe, so I
> guess by extension we should assume that "DROPPABLE" might mean
> non-keyframe:
> https://gstreamer.freedesktop.org/releases/1.14/ (under "New RTP
> features and improvements")
>
> But I'm missing a more concrete piece of text talking about the
> implications of DELTA_UNIT, DROPPABLE / NON_DROPPABLE, and the meaning
> of their possible combinations, if any.
>
> Could someone that knows about this share a bit of know-how?
>
> Thanks :)
> Juan
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Olivier Crête
[hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel