XML technologies / RSS & Atom / RSS 2.0 / Adding multimedia data with enclosure

(Excerpt from "Newsfeeds with RSS and Atom" by Heinz Wittenbrink, published by Galileo Press, 2005)

With the RSS element enclosure the RSS success story has been replayed on a smaller scale since 2004. Developers discover the enormous potential of simple constructs; prototype applications create market demand and trigger an avalanche of products and business ideas. "Podcasting" has become the buzzword for new publishing forms based on enclosure. This success depends on inexpensive broadband being available almost everywhere and on popular devices for playing Internet media, foremost Apple’s iPod, which gave podcasting its name.

Dave Winer added enclosure to RSS in version 0.92. (Winer describes the podcasting concept in Payloads for RSS.) The element references audio, video, and other multimedia data within an RSS feed. RSS can thus publish digital media online very simply. RSS documents can contain the data applications need to find multimedia content online, access it, organize and present it to users, exchange it, and republish it.

An aggregator can download multimedia automatically while the computer is not in use. You subscribe to feeds instead of "clicking and waiting" and can receive media regularly from the same sources. Publishers, in turn, regularly reach subscribers to a feed containing enclosures. enclosure thus enables asynchronous broadcasting for standardized client software.

In the RSS vocabulary, enclosure thus serves binary data much as description serves text data. Unlike description an enclosure element always belongs to an item, never directly to a channel. And whereas description has no attributes describing the content type, enclosure requires the type of the referenced data to be specified.

enclosure is always an empty element. It has three required attributes:

A item may contain only one element of type enclosure. Removing this restriction was discussed, but would lose RSS’s benefits: metadata such as author and publication date could not be specified separately for each attached file (see Dave Winer: Multiple enclosures on RSS items?).

<item>
   <enclosure url="http://triest.fh-joanneum.at/SDR25FEB.mp3" length="1024" type="audio/mpeg"/>
   ...
</item>

Code example: using the RSS element "enclosure"

BitTorrent via RSS

It is also possible to retrieve the element enclosure through BitTorrent. Use type "application/x-bittorrent" and use only the size of the .torrent file as the length. If both a complete download and a BitTorrent seed are offered, however, use the BitTorrent extension element (see The BitTorrent module).

Broadcatching

RSS and BitTorrent can also deliver TV or radio programs regularly through RSS. (Andrew Grumet describes the simplest approach in Experimenting with BitTorrent and RSS 2.0.) The receiving device can be a television or a multimedia PC with TV capabilities operated by remote control. The RSS feed then acts like a program guide and the aggregator like a program selector. This technique is sometimes called "broadcatching".

For enclosure see also the page The enclosure element in the RSS 2.0 reference.

   

 

 

 

Creative Commons license
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

back to top