Setting Up The Audio Module

Drupals audio module does much of the heavy lifting for many podcasting sites. The audio module provides the interface for uploading your audio, flash players, help creating iTunes RSS feeds, interacting with your audios ID3 tags and more. Lets look at setting up the audio module and some of it's supporting modules.

The first thing to do, before enabling any of the modules in the Audio category is to install getID3. This is a software package that the audio getID3 module uses to read and write the tags (e.g. artist, title, etc.) in your audio files. When you download the getID3 package make sure to get the most recent stable version and place the getID3 folder in your audio module.

Once you have this installed head over to Admin > Build > Modules and enable the Audio modules you will be using. Each provides some functionality you may want to use.

  • Audio. The audio module does the crux of the heavy lifting. It has the APIs so the other modules can extend it. This module provides your interface, flash players, and other basics. You must enable this module for any of the audio functionality to work.
  • Audio getID3. This allows you to use drupal to read and write your ID3 tags in your audio files. This information can also be used for filtering media in views, when you display your nodes, and in other places.
  • Audio Images. Cover art is common place thanks to iTunes. This is the module that lets drupal add it to your audio files. You can add more than one image to each audio file.
  • Audio Import. Ever had a site where you had a small upload limit and couldn't upload large audio files through the browser. This module was built to solve that. It lets you ftp large audio files to your site and then turn them into nodes.
  • Audio iTunes. iTunes and other popular podcast listening software now look for some specific podcast tags to be in your feeds. Standard RSS feeds don't have them. This module provides them when the views module generates a feed.

Setting Up The Audio Module

When I setup the audio module the first question that comes to mind is what should this content type be called? Will it be audio in general or specifically podcast episodes? Once I know the answer to this I head over to the content types menu (Admin > Content > Content Types) and give it a good human understandable name. Over at Geeks and God we call the audio nodes Podcast Episodes because that's what they are in our case. This is important when someone wants to do a search and choose the content type.

Next, head over to the Audio Settings at Admin > Settings > Audio Settings so we can setup your audio. On this first screen there are several options. The title and node teaser are important for the Audio Import module when it automatically generates this information on node creation. The two important settings in here are the Permitted audio file extensions and Downloadable by default options. If your podcast is an enhanced mp4 podcast you will have to add those file extensions to the list. If your podcast is in Windows Media format you will need to add that file extension to the list. If not, you would be allowed to use that file. This is put in place for security. Downloadable by default provides a download link to your audio file. Please note, if you disable this option crafty users will still be able to directly download your file.

The players tab at the top lets you select the default flash player for your site. Initially, this setting is the 1pixelout player that became popular thanks to Wordpress. This does not mean you can't use more than one type of player on your site. This is just the default player.

Audio getID3

Tying the information about your audio file like the artist, title, and album into your site is a nice option. You can not only use drupal to write this information and help you keep it consistent, but that information can be used in sortable views and searching. To access that menu go to the getID3 tab at the top. The default settings are usually good. What we are looking for are any errors. If you find any correct them.

Then go to the Metadata tags tab to select the fields. The default tags are the ones commonly used in programs like iTunes. What's nice is that you can have settings on each tab like autocomplete. This tells drupal to provide a list, as you type, of similar options you have used before.

The getID3 library will write the information to the audio file when you submit a node. Be warned, when it writes the information to the file it removes all of the old information and doesn't just preform an update. This includes images.

Audio Image

The audio image module lets you attach images in the ID3 information of an audio file. This is where the album art gets added. Go to the Images tab to set the default settings. The default image size of 170x170 is iTunes default image size for cover art.

Once this is setup, on each audio node there will be a place to select the type of art and upload a file to attach to the audio. This image can, also, be called up to display in your theme.

Audio Import

Importing audio into drupal can be a pain sometimes. Some hosting providers provide low upload limits and don't let you change the limits to be large enough. When you go to admin > settings > Audio Settings the first thing at the top is the size of a file you can upload. If this is smaller than your audio files you can try changing it by following instructions on drupal.org at . If these options don't work for you the Audio Import module can help you out. Once installed go to Admin > Settings > Audio Import Settings

In here specify the directory you will upload your audio files to. This is based on drupal root path. So, if your drupal install is in the directory drupal and you set the directory in the settings to audioimport that directory would physically be at drupal/audioimport.

Once this is setup you can go to Admin > Content > Audio import and select the files you'd like to import. The module makes them into nodes and provides you a link to them.

Audio iTunes RSS

This module provides certain elements to a RSS feed generated by views. When I dig into setting up a view I'll cover this module.

So, that's an overview of the settings for the audio module. They may seem like a lot but once you have it up and running, this module can be smooth sailing to use.

Audio Image, larger size?

Hi Matt,

Thanks for the post and the information. I've found it very helpful in understanding the audio module. I recently launched a podcasting network (www.fallingfruit.tv) and noticed that the artwork in the .mp3s actually gets stripped in Drupal. I enabled the audio images setting that you mention above, but what I'm noticing is that 170x170 is actually a bit too small. Do you know if there is any way to increase this default size limit?

take care,

-Vince Horn

Good Question

That's a good question. I'm not sure why the maximum size is set to 170 x 170. I would hope there is a good reason for it. I'd try putting in a support request at http://drupal.org/project/issues/audio asking this question. The maintainer is fairly good at responding.

The reason is because...

The reason for this is because iTunes (both the music store and software) likes to have it's images at 170X170. This assures that your image will work well in iTunes and on iPods, etc.

iTunes Feed

Hi Matt,

I was wondering if you ever touched on the setting up the iTunes Feed via a View. I am having a terrible time of it as it is not documented too well.

I found your post extremely helpful, thanks for making all this info available!

I'll post on that

That's a good question and one I think I tend to take for granted. I'll blog on that coming up.

Thanks for the question.

iTunes via View

Simple solution is to create a view, name it whatever, set the page value to something like /podcast-rss, set the description of the view to whatever you want to be the in the title tag of the feed. Then select Views RSS: iTunes RSS Feed as the view type, filter by node type of whatever you are using for your podcast, and finally add an argument of iTunes: RSS Feed and select default to display all values (adding the arugment will display the iTunes tab on the view so you can set the 'site level' settings like podcast image and copyright, etc)

Access at sitename.com/podcast-rss (if you need to tweak the output check the content template for the content type you created under the rss textarea (below the body textarea)

user pictures and audio page

I'm using Drupal 6 with the audio module (I know that it's not finished and I can be patient if more possibilities will come with the updates) and I'm having a little trouble just getting around.

I was wondering if there is any way to not have the user picture show up with the audio posting. It looks awkward to have the player, the artwork, and the user picture on that page when they can see the user picture if they just click on the name. I don't know if that makes sense. here's an example:
http://myrevolutionmedia.com/?q=node/40
I'd like the profile picture to not show up here too:
http://myrevolutionmedia.com/?q=audio

AND, final question, how can I change the name of that last page from Audio to Music?

Sorry. I know that these might be a little too much for this... but yeah.
any help would be appreciated.

David