HTML5 Video and SMIL

Example 1: Video with Captions

HTML5

<video src="video.ogg">
  <track src="video_cc.dfxp" type="application/ttaf+xml" lang="en" role="caption">
</video>

SMIL

<par>
  <video src="video.ogg"/>
  <textstream src="video_cc.dfxp" systemCaptions="on">
</par>

Example 2: Video with Audio Description rendered as textstream

HTML5

<video src="video.ogg">
  <track src="video_tad.srt" type="text/srt" lang="en" role="textaudesc">
</video>

SMIL

  <par>
    <video src="video.ogg">
    <textstream src="video_tad.srt" systemAudioDesc="on">
  </par>

Example 3: Video with English Captions and Text Audio Description, and Subtitles in English, German, and Japanese

HTML5

<video src="video.ogg">
  <track src="video_cc.dfxp" type="application/ttaf+xml" srclang="en" role="caption">
  <track src="video_tad.srt" type="text/srt" srclang="en" role="textaudesc">
  <trackgroup role="subtitle">
    <track src="video_sub_en.srt" type="text/srt; charset='Windows-1252'" srclang="en">
    <track src="video_sub_de.srt" type="text/srt; charset='ISO-8859-1'" srclang="de">
    <track src="video_sub_ja.srt" type="text/srt; charset='EUC-JP'" srclang="ja">
  </track>
</video>

SMIL

  <par>
     <video src="video.ogg" />
     <textstream src="video_cc.dfxp" systemLanguage="en" systemCaptions="on" />
     <textstream src="video_tad.srt" systemLanguage="en" systemAudioDesc="on" />
     <switch>
       <textstream src="video_sub_en.srt" systemOverdubOrSubtitle="subtitle" systemLanguage="en">
       <textstream src="video_sub_de.srt" systemOverdubOrSubtitle="subtitle" systemLanguage="de">
       <textstream src="video_sub_jp.srt" systemOverdubOrSubtitle="subtitle" systemLanguage="jp">
    </switch>
  </par>

Updated: 18 February 2010 - MHakkinen