Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in podcasting. My only worry is how to create an xml file to give all the information about the audio file.

share|improve this question

If you're trying to make one compatible with iTunes's format, what you need is a species of RSS XML. Apple's website gives as good a description of it as you probably need: Look here.

Here, I'll give you a template. The XML file begins with something like this:

 <?xml version="1.0" encoding="utf-8"?>
 <rss xmlns:itunes="" xmlns:atom="" version="2.0">
 <atom:link href="http://PATH-TO-RSS/XML/FILE" rel="self" type="application/rss+xml" />
     <title>PODCAST TITLE</title>
     <description>DESCRIPTION OF PODCAST (SHORT)</description>
     <lastBuildDate>Mon, 27 Dec 2010 17:16:55 GMT</lastBuildDate>
     <copyright>Copyright 2010 © WHOEVER</copyright>
     <itunes:subtitle>PODCAST SUBTITLE</itunes:subtitle>
     <itunes:author>PODCAST AUTHOR</itunes:author>
     <itunes:summary>PODCAST SUMMARY (LONGER)</itunes:summary>
         <itunes:name>PODCAST MAINTAINER</itunes:name>
     <itunes:image href="http://PODCAST-IMAGE-URL/something.jpg" />
     <itunes:category text="Category1" />
     <itunes:category text="Category2">
            <itunes:category text="Subcategory" />

There follows any number of items, which look like this:

    <title>ITEM TITLE</title>
    <itunes:author>Item Author</itunes:author>
    <description>Item description</description>
    <itunes:summary>Item summary</itunes:summary>
    <enclosure url="" length="filesize-in-bites" type="audio/mpeg"/>
    <pubDate>Current Date (same format as above)</pubDate>

And the file ends after all the items like this:


Perhaps you're wondering how to extract the information you need from the file itself. Assuming its id3v2 metadata tag is in good shape you can use id3v2 commandline too for some of it, e.g., I use:

songtitle="$(id3v2 --list "$file" | grep "TIT2" | sed 's%TIT2.*:\s*%%')"

to get the title of the track. (where $file is set to the filename).

To get the filesize, I use:

filesize=$(stat -c %s "$file")

To get the duration, I use:

fileduration=$(exiftool -S -Duration "$file" | sed 's/Duration: //' | sed 's/ (approx)//')

To get the current date in a suitable format for the date fields:

currdate=$(date -u -R | sed 's/\+0000/GMT/')

share|improve this answer
Thanks for your time and patience. Years ago I used easypodcast which is very easy to use and it's open source. Surprisingly I am not aware of any version for linux. – Daniel P Bartolo Dec 28 '10 at 6:33
Your method is very good but sincerely it's a little bit time consuming. Just for the benefit of our readers I found two other programs but still don't know how to install in Ubuntu:; – Daniel P Bartolo Dec 28 '10 at 6:37
I do it all via a BASH script which use sed to insert the relevant parts. It's not time consuming at all. The web services I found online actually took more time and added advertisements to the feeds, but I haven't checked your links. – frabjous Dec 28 '10 at 6:40
ok thanks! So is it possible to combine all these scripts into one and put them directly into one file? – Daniel P Bartolo Dec 28 '10 at 7:40
Those aren't scripts... sigh. This is too difficult a conversation to have in comments fields. Open a thread at or similar and put a link here and I'll elaborate there. – frabjous Dec 28 '10 at 17:30

xml files: Can I use openoffice to create such a file? If yes, which one? As I can save in two different xml formats.

share|improve this answer
I wrote to ubuntu forums. The link is:… – Daniel P Bartolo Dec 29 '10 at 6:54

If all you want to do is put up a podcast and not write your own podcast hosting software, you might want to consider either a hosting service like libsyn or setting up your own WordPress installation with the PodPress or PowerPress plug-in.

share|improve this answer
Yes thanks. I noticed that about wordpress. – Daniel P Bartolo Jan 28 '11 at 4:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.