Feed Enclosure Generation

Introduction

In the videoblogging world it is still too difficult to set up a syndication feed with enclosures. This document will attept to enumerate some best practices that work with current tools.

The Publishing Process

Let's walk through the steps of the typical videoblogging/podcasting process. There are other ways of doing of course, but I'll pick a fairly typical one.

  1. Create a video or audio file.

    Using desktop computer software or a mobile device, a user creates an audio or video file that they wish to publish on their blog.

  2. Put the file on a web server.

    Using some kind of hosting service, the user uploads the multimedia file to a web server.

  3. Create and publish a blog entry

    Using either a web browser or a specialized program, the user creates a blog entry with a link to the multimedia file and publishes it to their blog.

  4. Create a syndication feed with enclosures

    This step should be automatic, but frequently requires manual editing of XML files or signing up for a service that will take a standard blog feed and automatically create the proper enclosure format.

In some processes these steps are combined to make things easier for users, and the main focus of this document is how to combine Step 3 and Step 4, and when the blog software doesn't (yet) provide an automated mechanism for doing this, to provide a method for podcast clients or videoblog aggregators, like ANT, to find the intended enclosures from a feed that doesn't support the RSS 2.0 enclosure tag or the Atom 0.6 link tag.

Marking Enclosures

Marking Enclosures in the Content of a Blog Entry

The best practice (it seems) for marking an enclosure in the (X)HTML content of a blog entry, is by using the rel attribute of a link, as demonstrated in this example:

<a
      href="http://pb.vlogcentral.com/movies/11899.mov"
      rel="enclosure">Click to play</a>
Since RSS 2.0 only allows one enclosure per blog entry, there should only be one link in the blog (X)HTML that is marked with the rel="enclosure" attribute.

Describing Enclosures in HTML by Andreas Haugstrup describes this method in more detail. (Although he prefers people to link to a docment of broader scope called HTML Meta Profile for Blogs which contains additional recommendations.)

Automatically Creating an RSS 2.0 Enclosure Element from a Blog Entry

There are several tools that automatically create RSS 2.0 enclosure elements from blog entries, and many of them use the rel="enclosure" attribute to decide which link should be the enclosure. Some tools will only use links marked with rel="enclosure" others will use various heuristics to identify multimedia enclosure files. The (proposed) best practice is to always use the rel="enclosure" attribute to mark enclosures in the blog content. A partial list of tools that support this mechanism follows:

Movable Type

Josh Kinberg created the MT-RelEnclosure Movable Type plug-in that creates RSS 2.0 enclosures from the rel="enclosure" attributes by extending an existing enclosure plug-in.

WordPress

See this post. (more later.)

FeedBurner

FeedBurner is a web-based service for enhancing (Atom and RSS) syndication feeds. The SmartCast feature of FeedBurner will use the rel="enclosure" marker if it is present, otherwise it will fall back to other methods of locating the enclosure. This page explains how it works.

[Note]Note

If you know of a web service, blog service, blog package or plug-in that created RSS 2.0 enclosures from the rel="enclosure" attribute, please post a message on the audvidsyn Yahoo group, and I'll add it to this list.

[Note]Note

There are other mechanisms for creating RSS 2.0 enclosures from blog entries, but this "best practices" document will only list and support methods that use the rel="enclosure" indicator.

Automatically Creating an Atom Enclosure Link Element from a Blog Entry

Enclosures are handled in Atom with a link element with the rel="enclosure" attribute. At this point I don't know of any tools that will generate an Atom enclosure link element from an HTML a element with the rel="enclosure" attribute.

Finding Enclosures Without an "enclosure" Element

Unfortunately, at present, very few blog servers will create an RSS 2.0 enclosure tag or Atom link tag for your audio or video enclosure in a blog entry. Although feed-enhancement services, like FeedBurner, can be valuable in many ways, they do require a new videoblogger or podcaster to sign up for and configure one more service. Installing a Movable Type or other plug-in is also a serious barrier for beginners. For hosted blog services, such as Blogger or Typepad, the user does not even have the option of installing a plug-in.

This section presents a mechanism for multimedia aggregators, such as ANT, to use the rel="enclosure" mechanism to find enclosures on blogs that do not have the capability of creating enclosure elements. Note that this mechanism should only be used as a fallback when there is no enclosure element in the RSS feed. Here is the proposed algorithm:

  1. Look for an enclosure in the syndication metadata for the current blog entry.

    1. If an RSS 2.0 feed, look for an enclosure element within the item element for the blog entry.

    2. If an Atom feed, look for a link element with the rel="enclosure" attribute within the entry element for the blog entry.

    This is what most podcast and videoblog clients do today (with RSS 2.0 feeds)..

  2. Look for an a element with the rel="enclosure" attribute inside the RSS description or atom content element

    In this case the multimedia aggregator is using the same method as a feed-enhancement service, blog package, or blog plug-in would (some would say should) have used to create an enclosure element. If the link to the enclosure made it into the description/content of the item/entry, then it is not necessary for the multimedia aggregator to make the additional HTTP request required by the following step.

  3. Follow the link element in the feed to the complete HTML item and look for an a element with rel=enclosure

    This step will require an extra HTTP access, but will allow an aggregator to search the entire blog post for a link to an enclosure. Since a podcast or videoblog client will be downloading large enclosures the overhead of reading an extra HTML page (without loading images) should not have a significant impact on performance.

    [Caution]Caution

    This could be tricky on blogs that don't have a permalink to an individual HTML page for each permalink entry, but instead link to an anchored HTML fragment within a multiple-entry archive page. Does anyone have any thoughts on this? If so, post it to the audvidsyn list.

Conclusion

This document suggest "best practices" for service providers and tool makers who wish to create the best possible user experience in the current Internet ecosystem. As the blog packages and blog service add built-in support for using the rel="enclosure" marker, the method proposed in the section called “Finding Enclosures Without an "enclosure" Element” can be phased out. In the meantime, we can make it easier for more people to podcast and videoblog and promote the adoption of the rel="enclosure" standard.


Creative Commons License
This work is licensed under a Creative Commons License.