Embedding timestamp into H.265

Hello hackers!

We want to synchronize multiple devices that stream mpeg-ts over SRT, we have noticed that we do not get perfect sync when relying on the mpeg-ts clock retrieval.

The devices are AXIS cameras, and for H.264 we can ask the cameras to embed timestamp information in SEI header in a way that AXIS dictates: Trigger data | Network video | VAPIX® Library

We then use these timestamps to sync multiple devices later in our processing pipeline.

But. Axis does not provide these for H.265. We can dig out a NTP based timestamp via some ONVIF header extension, but we have no clear way of embedding these into the H.265. Do you guys have any idea of what a nice way forward would be?

Could something similar like the update-timecode property on h264parse be added to h265parse ? Would that give us what we need? Does anyone have any pointers on how one would implement that in that case?

Or am I missing some simpler way?


Check this thread for some ideas.

Generally, having this inside the parser seems like the wrong way forward. This should be done in a separate element, either by directly making use of the codec parser APIs and modifying the bitstream accordingly, or via the new API mentioned in that thread.

1 Like

Thank you! I followed the API specified in that thread!