Trying to get a reasonable frame number and timestamp

Thibault Saunier tsaunier at gnome.org
Fri Jun 14 22:42:36 UTC 2019


The DTS is the "data timestamp" not really something you care about. What
you care about is the PTS, the offset is the number of frame for decoded
frame, not encoded ones. I am not sure it is standardize for encoded frames
at all.

Thibault

On Fri, Jun 14, 2019 at 6:12 PM pisymbol . <pisymbol at gmail.com> wrote:

>
>
> On Fri, Jun 14, 2019, 11:07 AM pisymbol . <pisymbol at gmail.com> wrote:
>
>> I know this has been talked about around a thousands times on list. And I
>> have read most of these threads but I am still getting what I think is
>> strange behavior.
>>
>> Here's what I'm trying to do:
>>
>> I want to intercept every frame of an h.264 30 fps stream (not variable
>> rate, life is good) and get its frame number and timestamp. So as I
>> understand the doc, that should be in the GstBuf.dts and GstBuf.offset
>> fields. I was going down the pad probe route but found that the identity
>> plugin as per the doc a much easier and better route:
>>
>> So my first pipeline looked like this:
>>
>> ... ! omxh264enc bitrate=10000000 ! video/x-h264,
>> stream-format=(string)byte-stream ! h264parse ... ! identity name=nvcamid0
>> ! muxer
>>
>> Then I connected to the "handoff" signal for my callback and saw the
>> following:
>>
>> dts : offset
>> 0 : 816445297
>> 106961 : 839200766
>> 130469 : 849786717
>> 151008 : 876858645
>> 165810 : 909811526
>>
>>
> I guess I'll take a look at source. But does anyone know what dst/offset
> represent at this stage in the pipeline? My interest again is per frame.
>
> -aps
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190614/72e3af45/attachment.html>


More information about the gstreamer-devel mailing list