I don’t really know what I’m talking about, so I’m going to start from the beginning.
We stream live video through a workflow Camera -> Video Encoder -> satellite (as h.264 over mpeg-ts UDP) -> Wowza -> Client. Clients add comments which are linked to instants in the video (the process is basically similar to what happens if you include a time like “1:23” in a comment on a Youtube video, if I remember it correctly). We want the comments’ timestamps to be accurate enough that whatever event the comment describes is still on-screen, but we don’t need frame-level accuracy (and we can’t achieve that anyway, because the comments don’t preserve milliseconds).
The issue we face is that the satellite link introduces an unknown but large amount of latency: several seconds at best; several minutes delay is not unheard-of. This is too much for us.
We know that the video encoder writes SMPTE timecodes to the low-resolution stream, and we believe that this time is accurate. The client (JWPlayer) is able to read #EXT-X-PROGRAM-DATE-TIME playlist tags, so we want to convert one to the other. I realize that the SMPTE timecode is attached to individual frames while the #EXT-X-PROGRAM-DATE-TIME is attached to chunklists, so we don’t need to read every single timecode - the first timecode in a chunk is sufficient.
I’m running an old mp4 file as a live stream using the instructions in Publish a video file as a live stream with Wowza Streaming Engine, and I’m trying to read the timecodes with custom modules based on a few articles:
- Control the display of program date and time headers in HLS chunklists for Wowza Streaming Engine live streams
- Listen for stream events and codec information with the Wowza Streaming Engine Java API
(I’d link to those articles, but as a new forum user I’m not allowed to.)
These APIs capture a variety of timecodes, but none of the timecodes I’ve been able to read appear to be based on the SMPTE timecode.
I’ve also read HLS Live stream Timecode issue, but the suggestions there involve using the Wowza server’s time, which we know isn’t accurate for our purposes.
Does Wowza have an API that allows me to read the SMPTE timecodes? If not, is there any API that exposes the raw stream, so I can extract them myself?