It’s a tricky question, and something we’ve been struggling with a bit with ourselves (you can have a look a my previous forum posts for a bit of a log of the struggle). I figure I’ll post some of my notes about how we’ve approached it on the hope that others will as well.
Looking at how people usually solve this problem, there are two general approaches: Meta data within the video itself (muxed into the mp4), or meta data within the protocol transport (that is in the HLS manifest of the RTMP meta data). For the former approach, Apple demonstrated some techniques at WWDC (http://devstreaming.apple.com/videos/wwdc/2014/505xx5j7n7h3a1q/505/505_hd_harnessing_metadata_in_audiovisual_media.mov?dl=1, http://devstreaming.apple.com/videos/wwdc/2014/504xx5n1n7eie65/504/504_hd_advanced_media_for_the_web.mov?dl=1 if you’re a registered developer) that will get you no where but does illustrate the principle. Elsewhere on these forums, there’s an example of how to transport video timing meta data into the stream with Wowza: https://www.wowza.com/docs/how-to-convert-ontextdata-events-in-a-live-or-vod-stream-to-timed-events-id3-tags-in-an-apple-hls-stream.
My simple recommendation would be this: If you run the stream and control the video input yourself, you can probably mux meta data into the stream and get it out in the other side without worrying too much about Wowza modules. If not, you’ll need Wowza to do some heavy lifting.
The solution we’ve ended up relying on is HLS-only and uses a header in the spec called EXT-X-PROGRAM-DATE-TIME. Basically, this is a line in the HLS manifest that identifies the exact time the first chunk in the chunk list was created. Unfortunately, Wowza doesn’t support this feature natively (I’d love for it to do so though!?) so instead we’ve set up a module that indexes when each chunk is created (both live and dvr) – and then hook into the HTTP delivery to add the extra line to the manifest (you can see roughly how this can be achieved in a unrelated piece of code posted here https://github.com/availo/wowza-vhost-loadbalancer/blob/master/src/com/availo/wms/httpstreamer/HTTPStreamerAdapterCupertinoRedirector.java, but even this approach has a few potential quirks that we haven’t figured out yet.)
Reading out the standard HLS header though is another story on top of it, which involves custom HLS modules in Flash and an extra AJAX request in HTML5 browsers to read and parse the manifest.
So: Any hope we’ll see the program data time as a standard feature in Wowza? Any one come up with a lighter solution than the one described above?