www.vbrick.net home

TUTORIAL:  MPEG Metadata and Closed Captions

 

What is Metadata?

Metadata is "data that describes data" (view VBrick Metadata under online video training). But for our purposes, will will consider metadata to be text strings inserted into a video such that when the video is played back the text strings can be delivered to some special code that operates in conjunction with the player.

Because the metadata strings are inserted in the video itself, the metadata is retained when live video is recorded to create a file.  What's more the time relationships are maintained.  If you insert metadata into a video at time X, it is always at time X.

In the MPEG world, metadata is inserted into a live stream, not a "file".  As a result, a player can operate on the live metadata.  To the extent the video is recorded, a player can operate on the recorded metadata from a file.

Closed Captions

VBrick is the only company that supports North American Closed Captions thoughout the product lines, MPEG-1, MPEG-2 and MPEG-4.  Closed Captions are related to Metadata. For MPEG-1 and MPEG-2, Closed Captions are inserted in the video data. For MPEG-4, Closed Captions are delivered on an additional IP port and as an additional track in a MPEG-4 file.

 Metadata Uses

One popular use of metadata is to form URL "flips"  If your inserted metadata is a full path URL to a JPEG image, then the player can cause that JPEG image to be displayed at the correct point.  Because VBrick metadata is free form (there is no restriction on the format provided it is ASCII strings with a maximum length of 63 characters), metadata can be put to many uses.  For example, live GPS coordinates are inserted into the video so that position is displayed on a map in real time. 

How to Insert Metadata

The VBrick web server management interface provides a field that is useful for testing and development metadata. With video metadata set to enabled (reserves space in the video for metadata), simply type in some text and press "Insert Now".  Obviously this is not useful for real applications so you will use the VBrick 6000 SDK COM object or SNMP to command the VBrick to insert your text string.

The sample cut-and-paste code below installs the VBrick 6000 COM object in your IE browser via ActiveX control download. Once it is installed, it is available for scripting (a  tutorial on scripting the SDK COM object is in another tutorial).

 How to Insert Closed Captions

Normally, Closed Captions are encoded into the video stream by accepting the analog broadcast feed that contains Closed Captions on NTSC video line 21 (virtually all commercial television).  But like Metadata, you can also insert your own Closed Captions via the web management interface, via the control COM object, or via SNMP.  You can do live stenography using the Stenography application found on www.videoalive.com.  VBrick appliances also support the periodic automatic insertion of various text strings such as time, date, hostname, and your entered text. This is very useful for security and monitoring applications, providing an optionally visible time and date stamp on the captured video.

Metadata and Closed Caption Sample Code:

Windows Media Player does not support standard MPEG-4, and the player does not know how to "talk" to multi-vendor MPEG-4 servers. The VBrick plug-in adds this capability. The following sample code downloads and installs three ActiveX controls: The VBirck MPEG plug-in, the MPEG-4 decoder, and the VBrick control COM object. 

To view MPEG-1 or MPEG-2, you must enter the stream in the following form:

vbricksys://ip=multicastIP&port=multicastPort [& additional tags]

To view MPEG-4 via unicast, you must enter "vbrtsp://ipaddress/streamname

There are many other options, but the above URL forms will get you started.  The following sample code will display live or stored VBrick MPEG-4 video and will parse and display both inserted metadata and closed captions in real time.  The sample also allows you to insert the metadata directly from the same page. Cut and paste the following to your web page (be sure to uncomment the lines as indicated), or view here

 

 

Notes on usage:

The PresenterLive product uses this technology to deliver live and stored video with perfectly synchronized PowerPoint along with related presentation events.  PresenterLive also records the video, creates a viewing page and uploads your presentation to PowerStream service, your VBSTAR or to MCS.