Broadcast video and HTML in digital set-top box environment

Author: Tommi Riikonen, Nokia Multimedia Network Terminals, Tampere, FINLAND

  1. References
  1. REC-html40-19980424: HTML 4.0 Specification, W3C Recommendation, revised on 24-Apr-1998, Dave Raggett <> Arnaud Le Hors <> Ian Jacobs <>,
  2. ISO/IEC 13818-6: "Information Technology - Generic Coding of Moving Pictures and Associated Audio Information. Part 6: Extension for Digital Storage Media Command and Control (DSM-CC)
  3. Digital Audio-Visual Council (DAVIC): DAVIC 1.3 Specification
  4. ECMA Standardizing Information and Communication Systems: ECMAScript: A general purpose, cross-platform programming language. Standard ECMA-262, June 1997,
  1. Abstract
  2. Digital set-top boxes are good in presenting full screen broadcast quality video. The digital transmission makes it possible to deliver other data as well in the DVB compatible broadcast stream. HTML documents including broadcast video will be in common use in the future. Currently we however lack a standard way to point to video content from inside HTML. In this document we propose a common video object and script language object functions to present and control the video in the HTML document. By having a standard way of including video objects into HTML we can ease the content creator's job when he does not need to learn many different (browser specific or vendor specific) ways to include video in HTML.

  3. Introduction
  4. Digital set-top boxes are good in presenting full screen broadcast quality video. Also the value added HTML content in this environment needs to utilize high quality video as much as possible to take advantage over normal PC based browsers and current web-only set-top boxes. The best way to send HTML pages to user is to do it by embedding them into DVB compatible broadcast stream. Often in this kind of environment the HTML documents are customized for TV, but there are also situations where user fetches normal HTML documents from Internet. In the future also PCs will have the capability to receive DVB compatible broadcast stream and show the same video content as digital set-top boxes today. In order to ease the access to broadcast video from HTML a common way to insert video objects into HTML is needed.

    In digital set-top box environment the typical uses of video in HTML is either on the background as full screen video or as inlined video objects in the document. Because the decoding of video and audio is done with hardware the amount of simultaneously running videos is limited to one, either background or windowed video.

    Inline video is a decimated video window (normally 1/4 or 1/8 of the full screen) that is embedded into the HTML document in the same way as normal images. I.e. it is part of the HTML document and the object flows according to rendering. Inline video objects do not start to play automatically, but only after activation, for example with the mouse click on top of the object. Only one video object can play at a time. When a video object is activated while another one is playing, then the object, which is playing, stops first and after that the activated object starts its playing.

    HTML background video is a full screen video that can be introduced in HTML's BODY tag (background attribute) or in its own object tag. The video starts playing automatically after it is initialized and it is "bound" to the HTML document so, that it stops automatically when user moves to a new HTML document.

    In addition to just showing the video also the controlling possibilities are needed in some cases. Normal broadcast video stream can be controlled only locally by calling play and pause routines. However, on-demand type video clips can be fully controlled by using the DSM-CC (Digital Storage Media Command & Control) protocol [2].

  5. Video object and its control
  6. DSM-CC UU interface

    DSM-CC User-to-User (DSM-CC UU) interface stream primitives are used to emulate VCR-like controls for manipulating MPEG continuous media streams. The following primitives are specified for stream mode objects:

    DSM Stream pause (rStop)

    Cause the video server to stop sending a stream when it reaches rStop (in Normal Play Time, NPT).

    DSM Stream resume (rStart, rScale)

    Cause the video server to resume sending the stream at rStart (NPT) at a rate and direction specified by rScale (1/1, 1/2, -1/2, etc.)

    DSM Stream status (rAppStatus, rActStatus)

    Used to request status of a stream in progress. Returns the current AppNPT position (NPT), scale and mode (pause, transport, stop, ...) of the stream.

    DSM Stream reset ()

    Used to reset the Stream state machine to the initial state.

    DSM Stream jump (rStart, rStop, rScale)

    When stream reaches rStop (NPT), jump to rStart (NPT) and play at a rate and direction specified by rScale.

    DSM Stream play (rStart, rStop, rScale)

    Plays stream from rStart (NPT) until rStop (NPT) at a rate and direction specified by rScale.

    Table 1. DSM-CC UU stream primitives

    HTML needs the same kind of "standard" way to call the corresponding DSM-CC UU functions. By combining the HTML 4.0ís [1] object model with some scripting language like EcmaScript [4], we could reach a common way to present and control broadcast type video objects in HTML. Document creator should have a wide range of possibilities to set and modify the object-related properties straight in an HTML document. By defining a common set of high level script language functions to control the video stream, any content creator could generate broadcast video enabled HTML easily, without a need to understand video control protocols deeply.

    HTML object

    First a common object describing the video object is needed. A similar type of approach to set properties could be utilized as is done in Microsoft ActiveMovie control. The following example demonstrates playing a movie from DVB stream (stream object in an object carousel). The video object appears as inline object in HTML.

    <OBJECT id = "CasablancaMovie"
    data = "dvb://e9e.f5ad.ff3b/MovieNet/films/Casablanca"
    type = "video/mpeg(TS)"
    width = "180"
    height = "144"
    onclick = "resume_pause_video(id)">

    <PARAM NAME = "AutoRewind" VALUE = "False">
    <PARAM NAME = "AutoStart" VALUE = "False">
    <PARAM NAME = "DisplayBackColor" VALUE = "#0000FF">
    <PARAM NAME = "DisplayBackImage" VALUE = "dvb://e9e.f5ad.ff3b/MovieNet/films/images/casab1per8.gif" >
    <PARAM NAME = "MovieWindowSize" VALUE = "1/8">
    <PARAM NAME = "PlayCount" VALUE = "1">
    <PARAM NAME = "Rate" VALUE = "1/1">
    <PARAM NAME = "SelectionStart" VALUE = "5.0">
    <PARAM NAME = "SelectionEnd" VALUE = "185.5">
    <PARAM NAME = "ShowControls" VALUE = "False">

    Here you should see a video object


    resume_pause_video is a script language function that pauses or resumes the playing when the object is clicked, which can again call separate resume and pause functions.

    Description of the video objectís properties:

    Property name


    Possible values


    Indicates whether or not the stream should automatically return to selectionís starting point when it reaches the end of the selection.

    "True" (default), "False"


    Indicates whether or not to automatically start playing the stream.

    "True", "False" (default)


    Specifies the current position within the stream, in seconds

    Time in seconds


    Specifies the streamís current state: stopped, paused or playing.

    Stopped (0), Paused (1), Playing (2)


    Specifies the display windowís background color.

    Color in #RRGGBB format


    Specifies the display windowís background image. Displayed when CurrentState is stopped, overrides the DisplayBackColor.

    URL to image file


    Specifies the size of the playback window. 1/1 denotes full screen background video.

    1/1, 1/4, 1/8, 1/16


    Specifies the number of times to play the stream.

    0 (forever), 1 (default), 2, Ö


    Specifies the playback rate and direction for the stream.

    1/1, 1/2, -1/1, -1/2, etc.


    Specifies the starting position in this stream, in seconds, relative to the streamís beginning.

    Time in seconds


    Specifies the ending position in this stream, in seconds, relative to the streamís beginning.

    Time in seconds


    Indicates whether or not the control panel is visible.

    "True", "False" (default)

    Table 2. Video object's properties

    When ShowControls attribute is set to true a separate control panel appears under the video window. Only those buttons that have an effect on video stream are shown. In broadcast TV-program these controls are pause and play:

    Figure 1. Video window with basic controls

    Video object allowing broader user interaction will open a full featured control panel:

    Figure 2. Video window with full controls

    Script language object

    In addition to HTML object definition, controlling functions described with some script language are needed. EcmaScript is preferred, because it is a standardized script language. These functions will construct a video object API; they will again call corresponding DSM-CC functions. Video object's control panel buttons can be bound to these functions, but these functions can also be called from other functions.

    These functions can reside in the HTML document itself or alternatively a native script language object (e.g. DVBVideo) could be generated containing the needed functions as methods. By using the defined DVBVideo-object there is no need to paste the functions every time into the HTML document itself and user do not need to have any knowledge about DSM-CC functions that the object calls internally.

    DVBVideo object:

    Constructor DVBVideo(HTMLobjectId)
    When called as part of a new expression, it creates and initializes a new DVBVideo object. Initialization parameters are gotten from the HTML object itself. Example: var vObj = new DVBVideo(CasablancaMovie)

    DSM Stream reset() and do other uninitialization routines, e.g. show the defined BackImage bitmap and set the CurrentPosition to zero.

    DVBVideo.resume(startTime, playRate)
    Convert seconds to NPT format and call
    DSM Stream resume(startNPTTime, playRate)

    Convert seconds to NPT format and call
    DSM Stream pause(pauseNPTTime)

    DSM Stream status(objectstatus, status)

    DVBVideo.jump(jumpToTime, jumpFromTime, playRate)
    Convert seconds to NPT format and call
    DSM Stream jump(jumpToNPTTime, jumpFromNPTTime, playRate), stopTime, playRate)
    Convert seconds to NPT format and call
    DSM Stream play(startNPTTime, stopNPTTime, playRate)

  7. Other issues
  8. DVB URL

    The DVB URL syntax used in the example above is specified by DAVIC 1.3 specification, part 9 [3] as follows (in italics):


    The <original_network_id>, <transport_stream_id>, <service_id>, <event_id> and <component_tag> are the values represented as hexadecimal strings without any "0x" prefix (for example, "4d2e").

    Depending on the service the following part of the URL ("/<...>") may contain a more detailed specifier that identifies the desired part of the service. For example, if the service contains a data carousel, the last part of the URL may contain the file name.

    The DAVIC definition is too general and we have extended it to cover, e.g., accessing object carousel contents (the part after the last slash character).

    Error situations

    Error situations are not covered widely in this document. There might be situations when the requested service is not available. In these cases some kind of error message should be shown to user in the video window, however it must not affect to the whole document.


    While SMIL provides a powerful way to place and present different kinds of media objects it lacks the way to control continuous media objects (like DVB video). Maybe the above presented approach to control the broadcast video could also be utilized in SMIL. There could be, in addition to media objects, also a control object that is bound to a specific media object for example in the following way:

    <video id="CasablancaMovie" region="Video1" src="dvb://e9e.f5ad.ff3b/MovieNet/films/Casablanca"
    type="video/mpeg(TS)" />

    <controls target="id(CasablancaMovie)" />

    The result would be the same as shown in Figure 1 and Figure 2.