Re: Shifting gears for a second (was RE: Codecs for <video> and <audio>)

On Fri, Jul 3, 2009 at 2:39 AM, Silvia Pfeiffer
<silviapfeiffer1@gmail.com>wrote:
>
> 10 years ago I was mkaing the same arguments that you are. But now,
> after having tried to push for time-aligned text inside audio-visual
> files for so long, I have come to the conclusion that it is actually
> easier to deal with separate files than with captions inside media
> files. As external files, they are easier to edit, easier to share,
> easier to access, easier to parse, easier to handle on a server (e.g.
> in a database) and generally easier to manage.


Agreed.  Perhaps this is naive, but something like the following seems
sensible to me:

<video src="videos/video.ogg" captions="videos/video_captions.xml"/>

Where video_captions.xml could contain something like:

<captions>
  <caption lang="en-US" start="23" end="42" position="23,43">English
caption</caption>
  <caption lang="en-US" start="43" end="84">Another caption</caption>
  <caption lang="fr-CA" start="23"
end="42" position="23,43">Légende français</caption>
  <caption lang="fr-CA" start="43" end="84">Une autre légende</caption>
</captions>

Instead of frames, @start and @end could also be specified as times.
 @position is X and Y from top left, reminiscent of image map positioning.
 @start and @end would be the only required attributes.

For convenience, the captions element could exist within the video element
as well instead of being referenced in another file.  Internal captions
would also allow them to be scriptable via the DOM.

-Matt

Received on Saturday, 4 July 2009 01:34:28 UTC