[whatwg] My proposal of a subtitle format via an XML-like markup (in progress)

I've been thinking on using an XML-like markup as a format to implement
subtitles. XML is reasonable enough to be implemented by both media players
and web browsers, and so leaves us with little problems regarding
compatibility. My proposal takes most of the elements from ASSA (save for
vectorial drawing, that can be done later or be replaced by dingbat fonts in
the meanwhile) and renders them in a nifty and easy-to-read file by using
markup. Right now I've thought of three or four main markup segments:
styles, karaoke-specialized styles, animation-specialized styles and, of
course, the time divisions to insert the text.
Here is my mock-up file, which I hope is as self-explanatory as I think.

<subtitle name="Betatesting X c001" creator="AnonIsLegion no Fansub"
date="2010/05/30">

<styledef>
<!-- rtl: right-to-left text; utd: up-to-down text; fontstyle=bold, italic,
strike, and some others; clipstyle:per_line, per_block; rotations are in
degrees -->
<style name="Kyoh" fontsize=18 fontname="serif, DejaVu Sans, Arial Unicode
MS" fontxscale=100% fontyscale=150% rtl=false utd=false fontstyle="bold"
fontcolor="red" fontalpha=100% outlinesize=1 outlinecolor="white"
outlinealpha=fontalpha karaokecolor="orange" karaokealpha=75%
karaokeoutlinecolor=karaokecolor karaokeoutlinealpha=karaokealpha
karaokeoutlinesize=outlinesize karaokeoutlinealpha=karaokealpha shadowsize=1
shadowcolor="black" shadowalpha=50% blursize=2 blurtype="square"
blurintensity=1 positionx=90% positiony=50% marginup=1 margindown=1
marginleft=2 marginright=2 rotationx=0 rotationy=0 rotationz=0
clipstyle="per_line" clipup=0 clipdown=0 clipleft=0 clipright=0 />
<style name="Kenji" inherits="Kyoh" fontcolor="blue" />

<karstyle name="kardefault" start=0:00 end=0:00.1 karaokecolor="white"
karaokealpha=75% karaokeoutlinecolor="gray" karaokeoutlinealpha=karaokealpha
karaokeoutline size=outlinesize />

<animation name="animdefault">
    <!-- start and end times here are either absolute from the section
start, or relative to the chronological order (default); ordering can be
overriden using from=element_you_want_to_start_times_from -->
    <animsection name="1" order="absolute" start=0:00 end=0:00.5
acceleration=100% accelerationtype="constant"> <!-- accelerationtype:
constant, exponential -->
        <style positionx=90% positiony=50%>
    </animsection>
    <animsection name="2" from="1" inherits="1" start=0:00 end=0:00.5>
        <style positionx=10% rotationz=180>
    </animsection>
</animation>
</styledef>

<defaultstyle setstyle="Kyoh" setkarstyle="kardefault"
setanimstyle="animdefault">

<time start=0:00 end=0:00.001>
A very brief line.<br>
Above another very brief line.
</time>

<time start=0:05 end=0:05.5>
<kar>Ka</kar><kar>ra</kar><kar><style karaokecolor="red">o</style></kar><kar
end=0:00.2>ke!</kar>
</time>

<time start=0:07 end=0:08>
<animation name="animdefault">
This text shall move.
</animation>

<!-- TODO: Importing images and SVGs to be used in subtitles. In the
meanwhile a good set of dingbat fonts should suffice. -->

</subtitle>

- Carlos Sol?s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100530/2e5235c3/attachment.htm>

Received on Sunday, 30 May 2010 11:56:44 UTC