rtph265depay: Does not always forward all `GstReferenceTimestampMeta`s
From reading @slomo's excellent blog post here (https://coaxion.net/blog/2022/05/instantaneous-rtp-synchronization-retrieval-of-absolute-sender-clock-times-with-gstreamer/) I had expected that gstreamer 1.21.90 (aka 1.22.0 RC1) added some additional RFC6051 support - namely the ability to output GstReferenceTimestampMetaAPI
objects from a playbin
by setting the add-reference-timestamp-meta
property to true
. The expected result is that all buffers output from playbin
(or equivalent) have a GstReferenceTimestampMetaAPI
attached right from the first produced buffer.
Quote:
On the receiver-side no changes would actually be necessary. The use of the header extension is signaled via the SDP (see RFC 5285) and it will be automatically made use of inside rtpbin as another source of NTP / RTP timestamp mappings in addition to the RTCP Sender Reports.
After testing the recv
side of @slomo's code from https://gitlab.freedesktop.org/slomo/rtp-rapid-sync-example/-/tree/rapid-synchronization I am seeing strange behaviour (removed some of the log). This is connected to an iPro (formerly Panasonic) camera with up-to-date (Dec 2022) firmware.
- It is taking until buffer at 2.33s before the first
GstReferenceTimestampMetaAPI
is produced. - There appear to be multiple
GstReferenceTimestampMetaAPI
metas attached to each buffer. - At 2.56s the
GstReferenceTimestampMetaAPI
is not produced for a single buffer. - On different startups the
GstReferenceTimestampMetaAPI
never seems to be produced
There is a big chance that I have done something incorrectly but is this the expected behavior?
Buffer { ptr: 0x7f0c90057000, pts: 0:00:00.129052812, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: DISCONT | MARKER | HEADER, metas: [GstVideoMetaAPI] }
Have no sender clock time
Buffer { ptr: 0x7f0c9004fa20, pts: 0:00:00.195698104, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI] }
...
Have no sender clock time
Buffer { ptr: 0x7f0c90057000, pts: 0:00:02.269231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI] }
Have no sender clock time
Buffer { ptr: 0x7f0c9004fa20, pts: 0:00:02.335897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.012666645
Buffer { ptr: 0x7f0c802cf120, pts: 0:00:02.369231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.045999979
Buffer { ptr: 0x7f0c802c9360, pts: 0:00:02.435897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.112666645
Buffer { ptr: 0x7f0c90057000, pts: 0:00:02.469231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.145999979
Buffer { ptr: 0x7f0c9004fa20, pts: 0:00:02.535897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.212666645
Buffer { ptr: 0x7f0c802cf120, pts: 0:00:02.569231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI] }
Have no sender clock time
Buffer { ptr: 0x7f0c802c9360, pts: 0:00:02.635897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.312666645
Buffer { ptr: 0x7f0c90057000, pts: 0:00:02.669231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.345999979
Buffer { ptr: 0x7f0c9004fa20, pts: 0:00:02.735897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.412666645
Buffer { ptr: 0x7f0c802cf120, pts: 0:00:02.769231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.445999979
Buffer { ptr: 0x7f0c802c9360, pts: 0:00:02.835897999, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.512666645
Buffer { ptr: 0x7f0c90057000, pts: 0:00:02.869231333, dts: --:--:--.---------, duration: 0:00:00.050000000, size: 64, offset: 18446744073709551615, offset_end: 18446744073709551615, flags: MARKER, metas: [GstVideoMetaAPI, GstReferenceTimestampMetaAPI, GstReferenceTimestampMetaAPI] }
Have sender clock time 990987:26:32.545999979