XML for Online Multimedia
Ralph Giles
Xiph.org Foundation
- Not-for-profit, volunteer-based standards organization
- Grew out of an open source project
- Provides royalty- and licence-free multimedia technology
Xiph Compression technology
- Vorbis for general-purpose audio
- Theora for general-purpose video
- Speex special-purpose for voice
- FLAC lossless audio compression
Multimedia Formats
- Ogg Multimedia container
- File storage and transmission
- Container like AVI, Quicktime MOV, MPEG PS
- Optimized for streaming
- bounded overhead
- RFC 3533,
3534
- Also support RTP for conferencing and multicast
But enough about me...
- The Internet is about exchange and interoperability
- Balkanized formats and common upgrades require extensibility
- XML's stengths play to this
XML Video Encoding
<video>
<format>
<width>640</width> <height>480</height>
<rate>29.97<rate>
</format>
<frame>
<pixel>
<red>125</red>
<green>23</green>
<blue>54</blue>
</pixel>
<pixel>...</pixel> ...
</frame>
<frame> ...
</video>
XML Video Encoding (joke)
<video>
<format>
<width>640</width> <height>480</height>
<rate>29.97<rate>
</format>
<frame>
<pixel>
<red>125</red>
<green>23</green>
<blue>54</blue>
</pixel>
<pixel>...</pixel> ...
</frame>
<frame> ...
</video>
Podcasting: RSS
- Really Simple Syndication
- <rss>, <channel>, <item>, <item> ...
- Poll the server for an updated file
- Various versions, 2.0 is reasonable
- Also an RDF-based version (1.0)
Podcasting: RSS Example
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>My New Links</title>
<link>http://my.blog.com/</link>
<description>Interesting links to funny stuff</description>
<item>
<title>Cool video</title>
<link>http://waycool.net/video/shiny.ogg</link>
<description>This one completely rocks. Way better than
yesterday's link.</description>
<pubDate>Tue May 10 02:03:17 UTC 2005</pubDate>
</item>
...
</channel>
</rss>
Podcasting: Bittorrent
- Swarming download application by Bram Cohen
- Works well for popular files over a few MB
- Reduces server load by a factor of 1000
- Aggregation, fairness metric
Podcasting Summary
- RSS feeds links to anyone interested
- Bittorrent makes serving affordable
- Players, blog software, CMS are all clients
MusicBrainz metadata
- "CDDB done right"
- Extensive database of recording metadata
- PD
and Creative
Commons licenses
- Peer-review system with volunteer editors
- Auto tagging applications using
Relatable's audio hash
MusicBrainz Metadata Initiative
- RDF/XML and Dublin Core
- Basic and Extented tag sets for music
- Query schema for database interaction
- See musicbrainz.org for
details.
XSPF: XML Playlist
- XML Shareable Playlist Format
- pronounced spiff
- Most recent audio players use XML for their playlist
- Need for a standard outside '.m3u' and SMIL
XSPF: Why another playlist format?
- XSPF allows publishing, sharing
- Virtual radio stations at services like WebJay
- Not a metadata or catalog format
- Audio, video, whatever
XSPF Example 1
A simple example:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns = "http://xspf.org/ns/0/">
<trackList>
<track><location>file:///music/song_1.ogg</location></track>
<track><location>file:///music/song_2.ogg</location></track>
<track><location>file:///music/song_3.ogg</location></track>
</trackList>
</playlist>
XSPF Example 2
A less simple example:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns = "http://xspf.org/ns/0/">
<trackList>
<track><location>http://example.com/song_4.ogg</location></track>
<track><location>http://example.com/video_29.ogg</location></track>
<track><location>rtsp://www.nasa.gov/encoder/nasatv.rm</location></track>
<track><location>http://webjay.org/by/OddioKatya/brasilado.xspf</location></track>
</trackList>
</playlist>
XSPF General tags
- <trackList/> the general sequence of resources
- <track> individual playlist item
- <link> reference external resources
- <meta> reference external metadata (RDF, MusicBrainz)
XSPF General Playlist tags
- Metadata (rough) for the playlist itself:
<title>,
<creator>,
<date>,
<annotation>
- Also
<info>,
<image>,
<license>,
<attribution>
- <extension> for application data
XSPF General Track tags
-
<location> and
<identifier>
-
<title>,
<creator>,
<annotation>,
<info>,
<image>.
-
<album>,
<trackNum>,
<duration>.
XSPF: Summary
- Open - not controlled by any one corporation
- Portable - send a playlist to your friends
- Doesn't suck - someone thought about the design
- Spec and examples at XSPF.org
CMML: Content Markup
- Developed by CSIRO in Australia
- XML markup language for time-based multimedia
- Recommended for and embeddable in Ogg
- Firefox plugin
CMML: The key idea
- Audio and Video files are alien to the web
CMML: The key idea
- Audio and Video files are alien to the web
- We need to integrate continuous media into the hypertext
Time-based media
- Text exists out of time
- Recordings must be watched continuously
- Some only have a relative timeline
- Some are absolute
If multimedia is hyperlinked!
- direct access: link to a point in a clip
- surf: link out from points in a clip
- Search: content becomes indexable (google)
- dynamic content from servers
Components of the project
- URI format for timed fragments
- XML markup (CMML)
- Streamable container (Ogg)
- Together this is an annodexed file
URI scheme
- http://www.example.com/film.anx#t=npt:47:25.6
- http://example.com/webcam.ogg?t=utc:20031127T0615Z
- http://foo.net/track.theora?t=smpte-24-drop:12:25:07/13:07:16
CM Markup Language
<cmml>
<stream>
<import src="shrek2_review.ogg" contenttype="video/x-theora"/>
</stream>
<head>
<title>Shrek 2 Review</title>
<meta name="author" content="AAP/Urban Cinefile"/>
</head>
...
CM Markup Language
...
<clip id="introduction" start="npt:15">
<a href="http://media.annodex.net/AAP/movies/shrek2_trailer.ans">
Watch the trailer
</a>
<meta name="KEYWORDS" content="Ogre, Prince Charming"/>
<desc>Shrek and Fiona get an invitation...</desc>
</clip>
...
</cmml>
Multiplexed "Annodex" file
Multiplexed "Annodex" file
CMML markup in action
Note: you'll need the firefox plugin for this demo to work. See
annodex.net for the download.
In Summary
- XML is XML
- Quit with the non-free multimedia formats, already!