Greg, <div><br></div><div>I think that it's important that there be something that everyone can depend on being present across all UAs, so I commend your dedication here. I think adding subrip as a "baseline" is a great idea so that everyone knows that there's something that works everywhere, and subrip is dead simple.</div>
<div><br></div><div>However, there's a lot of uses for subtitles / captions that cannot be met with subrip. No styling (beyond the bare basics), no karaoke commands, no alpha, no nice handling for collisions, margins, shadow colors, specifying encoding, etc. Without meeting these needs there's a number of people who will just ignore <video> as they don't have something that will meet their needs in all UAs.</div>
<div><br></div><div>As long as we're specifying some base set of standards that need to be supported, you might as well pick one of the more full featured formats as well. Personally I would suggest SSAv4+ (Advanced SubStation Alpha). I don't want to get into religious wars over which is best, but the reality is that it's in wide use and there's a number of tools for working with it. </div>
<div><br></div><div>You only get one chance to set a baseline standard, might as well make sure that it covers all the use cases.<br><br><div class="gmail_quote">On Thu, Feb 19, 2009 at 2:37 PM, Greg Millam <span dir="ltr"><<a href="mailto:millam@google.com">millam@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi guys -<br>
<br>
  I'm one of the main engineers responsible for captioning support on<br>
YouTube, and I've joined the Chrome team at Google to attempt to help<br>
drive video captions and subtitling forward: Both to implement support<br>
in Chrome for it, and to push for HTML5 support for captions.<br>
<br>
  In my following statements, I am working off of a search through the<br>
mailing list and reading of the HTML 5 spec. Particularly where the<br>
Video tag is concerned. If there are any factual errors, or I'm way<br>
off, just point my way. All this is as far as I can discover.<br>
<br>
  The current state of accessibility and captions in HTML5 has been<br>
relegated to <a href="http://wiki.whatwg.org/wiki/Video_accessibility" target="_blank">http://wiki.whatwg.org/wiki/Video_accessibility</a> - a wiki<br>
page with use cases, requirements, existing solutions, and an empty<br>
"Proposed Solutions" category. I aim to fix that. My main goal here is<br>
to prevent captioning from missing out on HTML5 and being dropped<br>
"because we never got around to it". (a la HDMI)<br>
<br>
Here is my proposal:<br>
<br>
Use cases:<br>
  * Accessibility.<br>
  * Ability to audiences in other languages.<br>
<br>
Goals:<br>
  * Allow movie formats to include captioning support.<br>
  * Make it simple for an author to create and publish transcripts,<br>
without requiring them to embed it into the movie.<br>
  * Make it simple for caption or subtitle tracks to be accessible.<br>
  * Allow full javascript control: List, add, delete, and create caption tracks.<br>
  * Provide a required format to act as a baseline across all browsers.<br>
<br>
The current state of the <video> element includes support for defining<br>
a source video file, local or remote. There is no method to define a<br>
caption source or track.<br>
<br>
Proposed Solution:<br>
<br>
HTML5 / Page Author:<br>
  * Each video will have a list of zero or more Timed Text tracks.<br>
  * A track has three variables for selection: Type, Language, Name.<br>
These can be null, except for name.<br>
  * Type is a string, and may be (but is not limited to): "Caption"<br>
"Transcript" "Translation" "Subtitles", etc. Others can be defined by<br>
the user (e.g: "Commentary" "User Comments").<br>
  * Language is a language code (en, es, pt_BR, etc)<br>
  * Name is a freeform text identifier. By default, "default" or<br>
"caption". If a video file has multiple tracks, they are added as<br>
"caption1" "caption2", etc.<br>
  * <video> . . . </video> is not necessarily a standalone tag. If the<br>
author desires, they can add more elements to define tracks. Whether<br>
this should be <caption type="format" src="..." media="caption"> or<br>
<source type="timedtext/format" src="..."> can vary. (I prefer<br>
<caption> as it's more explicit).<br>
  * <caption src="foo.srt" type="caption" language="en" name="default"<br>
/> adds a new caption. <caption> is standalone.<br>
  * All timed text tracks encoded in the video file are added to the<br>
list, as an implicit caption element.<br>
  * Caption tags, when displayed, count as <span<br>
class="caption">...</span> unless they have style associated with them<br>
(uncommon). So they can be tweaked via CSS. Whether by the author or<br>
overridden by useragent.<br>
<br>
User Agent:<br>
  * Implements support for <caption> tag.<br>
  interface MediaCaptionElement : HTMLElement {<br>
             attribute DOMString src;<br>
             attribute DOMString format; // default: "auto".<br>
             attribute DOMString type;<br>
             attribute DOMString language;<br>
             attribute DOMString name;<br>
             attribute DOMBoolean enabled;<br>
  };<br>
  * Media elements now have a list of Captions associated with it.<br>
<br>
  * Support for (at minimum) "Subrip" format. Subrip I choose here for<br>
the same reason we picked it for YouTube: It's readable,<br>
understandable, and simple. You can create one with your favorite<br>
editor. Subrip has no style associated with individual captions, so<br>
can be subject to CSS caption rules for "SPAN.caption"<br>
  * Support for other formats (608, 708, .ass, dfxp, etc) up to the<br>
user agent. (But preferred!)<br>
<br>
Javascript:<br>
  * Media or Video elements now have additional features exposed via javascript.<br>
  * getCaptionList(): returns an array of caption elements.<br>
  * addCaption({src:'',name:'',language:'',type:''}) - Adds a Caption element.<br>
  * enableCaption(captionElement) - Enables a CaptionElement for<br>
display. If captionElement is null, enable the first track in the<br>
list.<br>
  * disableCaption(captionElement) - Disables CaptionElement for<br>
display. If captionElement is null, disabled all tracks in the list.<br>
<br>
User Agent UI: (Only relevant if User Agent adds its own controls for media):<br>
  * Must be able to enable caption Elements.<br>
  * Preferably by a button on the UI with either "CC" or a double<br>
underscore (preferred).<br>
<br>
User Agent Context Menu:<br>
  * Must have captions, with a list to enable/disable.<br>
<br>
...<br>
<br>
Well - That's a start, and that's what I'd like to see and implement<br>
over the next several months. Input and discussion would be much<br>
appreciated! If anybody here has worked on it, I'd also like to talk<br>
to you.<br>
<br>
Thanks,<br>
<br>
- Greg Millam<br>
<font color="#888888"><br>
--<br>
<br>
Every time you give up a dream, a chicken stays on its side of the road.<br>
</font></blockquote></div><br></div>