3

In the Flash world there is the concept of objects representing a live streaming connection and stream (NetConnection and NetStream). Though the Flash API these objects can be used to inject text metadata into a live stream (NetStream.send()). This data can then be listened for at the viewing end in a Flash viewing application with listeners in ActionScript code. You could pass function calls through a video stream via this and listen for them and execute them on the client end.

Does this concept exist in the Apple HTTP Live Streaming realm?

Robert
  • 828
  • 2
  • 13
  • 28

1 Answers1

3

Yes, the metadata is generated to a file by the id3taggenerator, and embedded on video using mediafilesegmenter, both are included in the HTTP Live Streaming Tools download. Example:

id3taggenerator -o camera1.id3 -text "Dolly camera"
id3taggenerator -o camera2.id3 -text "Tracking camera"

There are several kinds of metadata you can embed, including binary objects. Refer to the man page for details. Now we need to reference the generated file from a "meta macro-file". This is a plain text file with the following format:

60 id3 camera1.id3
120 id3 camera2.id3

The first number is seconds elapsed since the beginning of the video where you want to insert the notification. I don't remember the mediafilesegmenter command exactly, you have to pass the macro file, the index, and the video file at least.

The resulting video contains metadata that is posted by the MPMoviePlayerController as notifications. See this page for details: http://jmacmullin.wordpress.com/2010/11/03/adding-meta-data-to-video-in-ios/

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jano
  • 62,815
  • 21
  • 164
  • 192
  • Ahh... Good info. Very much obliged. So there are native app hooks to do this. How about purely from a browser? Can I retreive meta data from HTML5/JS? Picture commanding that items on the viewer's screen move or change in some way based on commands sent through the video stream. – Robert Nov 18 '11 at 19:11
  • I don't think so. It should be in the Safari HTML 5 Audio and Video Guide if existed. Unrelated to HTTP Live Streaming technology, there is a [ element](http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-track-element) that is only supported using a JS library named [Captionator](https://github.com/cgiffard/Captionator). – Jano Nov 18 '11 at 20:45