I have an RTMP stream coming from my app (via ffmpeg). Into this stream, I am injecting timed metadata using an HTTP Provider/Module like so.
I read Wowza’s information on Metadata Workflows Here:
That document states:
To prevent directly-ingested metadata from getting ahead of the video, either inject the metadata at the source or delay the direct injection into Wowza Streaming Engine: watch RTMP or WOWZ playback of the stream from Wowza Streaming Engine, and initiate the API call to inject the metadata as soon as you see the frame you want to sync to. (There’s less latency with RTMP and WOWZ playback, so you can see the desired frame before it appears for HLS playback.)
I want my metadata very closely aligned with the video time/frame. I am wondering how to accomplish this "Initiate the API call to inject the metadata as soon as you see the frame you want to sync to? What event can I use to inspect the video as it is processed to know what the absoluteTimeCode is on each frame?
I was thinking of storing an array of metadata being sent from my app with a timestamp, and I would store this data array in a Wowza Module. As each frame was processed I would get the encoded video time and inject the metadata when the current frame time matches the data timestamp (within some tolerance). What event runs on each frame of an HLS encoding session? Is there an example of this to look at?