Saturday, July 08, 2006

Basics of Blogging Series: Part 18 - RSS - Podcasting, VideoCasting & The Magic of the Enclosure Sub-Element

Now it is time for Magic. Ever hear the term "PodCasting?" Well it originally came from the Apple IPod and that little device that has swept the world allowing everyone to hook into their favorite music (and now video etc.) The RSS specifications grew with the world around it and therefore the little XML "enclosure" command came to be found within the files.


What does this mean? Well at first RSS was limited to the text format. What RSS first generation files were doing were spreading the news of the world in small little text headline files. Of course the human desire for ever more and more is impossible to stop. What if we wanted to send picture? Well there is the [!Cdata command which we will discuss in the next article. But what if I wanted to send some type of information that was not text? That is where the enclosure does its magic.


Why would an author want to create a Podcast? Well there are many valid reasons to do so. Let us say you are just beginning and are writing poetry. You place some of it on your Website, or just the fact that you are writing poetry. You can then record a few poems, put them in the appropriate file format and place the recordings to your poetry within a Podcast. Or if you are an artist, and you want to sell some of your pictures. You can put them up on your web site, create an RSS/XML feed with pictures and sound explaining each picture, and let people update themselves with your feed everytime you update the web site. There are a 1001 legitimate uses for podcasting, videocasting and placing simple pictures within your feed. (To place pictures within a specific entry you will have to read about the [!Cdata command in the next few articles.)


Within enclosure I can actually place any audio, mpg, jpeg. or whatever into that little element. And what this means to the aggregator is, "Hey, my RSS file also has a few small additions that come with it. Grab those as well." And as part of this element the RSS file also says, "Hey, this is the format and this is the size of the file. Because I am being courteous and nice, and I want you the aggregator to know just how much you have to grab."


For those quick thinkers out there, what one can actually do in an RSS file is this. Take Janis Joplin and her album "Ball & Chain". Well we would create an item for each of the songs, (I will show you how to do this in another article), describe each one of them in the "description" element and put an mp3 of the song defined in the item in the enclosure command. And then anyone who wanted to get my RSS feed on Janis would be able to read a description of the songs and listen to them.


Or say I wanted to release a few short-shorts on Shakespeare's Sonnets. I would read them, record them, and then put the text of each into the description and my mp3 recording into the enclosure. Voila! An RSS on Shakespeare.


One critical caveat. Remember these are not text files and therefore they can get large. The larger they are the more the aggregator has to grab, the more bandwidth etc. Remember that when you release your songs on the Net in an RSS file for those IPod-ers out there!


Just to remind you. The enclosure command consists of three parts:



  1. url - The URL of the actual enclosure.

  2. length - The size in bytes and not an estimate but a total size

  3. type - A standard MIME type, e.g. Audio, Video, Text etc. A list and explanation of standard MIME types can be found here - http://www.fileformat.info/info/mimetype/standard.htm


Lets see how this would be done, without too much coding. We will begin with the Item Element, so this is just a part of the RSS file. (I left
out the guid here.)

<Item>


<title>Summertime by Janis Joplin</title>
<link>http://www.janisjoplin.com/songs/summertime.html</link>
<description> Summertime, And the livin' is easy,  Fish are jumpin' And the cotton is high,  Your daddy's rich And your mamma's good lookin',  So hush little baby Don't you cry,  One of these mornings You're going to rise up singing, Then you'll spread your wings And you'll take to the sky  But till that morning There's a'nothing can harm you  With daddy and mamma standing by Summertime, And the livin' is easy  Fish are jumpin' And the cotton is high Your daddy's rich And your mamma's good lookin'  So hush little baby Don't you cry </description>
<author>George Gershwin sung by Janis Joplin</author>
<category>Blues</category>
<category>Jazz</category>
<comments>http://www.janisjoplin.com/comments/summertime.html</comments>
<enclosure url="http://www.janisjoplin.com/mp3s/summertime.mp3"  length="4368242"  type="audio/mpeg"/>
<pubDate>Sat, 10 Dec 2006 23:00:00 GMT</pubDate>

</Item>

There you have it. An RSS PodCast. One item of the song "Summertime". Of course your RSS will have every song on the album. Anyone who applies to the feed will be able to listen to all of Janis's songs in their RSS feed - Their Podcast. And you can do the same with a video, pictures etc. For all the "current" terminology take a look at Wikipedia.


The next article we will attack the controversial [!Cdata command structure. After that you will have a complete well formed XML - RSS file.




Previous Articles In This Series:



  1. The Basics of Blogging and Web Site Creation - Part One: Content Is King

  2. The Basics of Blogging and Web Site Creation - Part Two: Introduction To Keywords

  3. Part Three - Keywords, Tags, Categories - Oh Vey! I Am So Mixed Up!

  4. Blogging & Website Basics - Part Four: So How The Hell Do I Get Bonafide Links To My Blog?

  5. Blogging - Part Five: Trying to Understand the Psychology Behind It All

  6. Blogging - Part Six: Viral Technology - An Introduction

  7. Blogging - Part Seven: Article Submission As A Tool To Extend Your Reach

  8. Basics Of Blogging Series - Part Eight: Using Email As An Advertising Tool

  9. Basics of Blogging Series: Part Nine - RSS Mania Addiction An Introduction To RSS and the Terminology

  10. Basics of Blogging Series: Part Ten - Outline of How to Create an RSS Feed

  11. Basics of Blogging Series: Part Eleven - Debunking a Few RSS Myths

  12. Basics of Blogging Series: Part Twelve - The RSS Feed Template File

  13. Basics of Blogging Series: Part Thirteen - The Basic Elements in the "Channel" Element

  14. Basics of Blogging Series: Part 14 - How the RSS Feed Works & Some Programming Constructs

  15. Basics of Blogging - Part 15 - Editor Tools - Qumana & Performancing Extension for Firefox

  16. Basics of Blogging - Part 15A - Qumana's Drop Pad

  17. Basics of Blogging Series: Part 16 - RSS Channel Sub-Elements Specifically "Image" (& How To Use It)

  18. Basics of Blogging Series: Part 17 - RSS - The Elements Within the "Item" Element


Click Here For The Cumulative Index To All Posts @ Cobwebs Of The Mind


Tags: , , , , , , , , , , , , ,
Categories: technology, internet, Basics of Blogging Series, What Is RSS Series
Basics of Blogging Series: Part 18 - RSS - Podcasting, VideoCasting & The Magic of the Enclosure Sub-Element


Edited With Qumana


No comments: