How To Create A Music Review Site

ADDING ITEMS (AUDIO TRACKS / VIDEO CLIPS) -- Red Queen Tutorial 07

Adjust Text:  a a a a
« Red Queen User Manual   |   Tutorial Table Of Contents   |   Obtain Red Queen »


ADDING ITEMS (AUDIO TRACKS / VIDEO CLIPS)

Rinse And Repeat

Just like Mike did in the previous section, where he configured Red Queen to allow garage bands to add themselves as "suppliers", he wants to do the same thing for the Item branch which will characterize individual audio and video files uploaded by the bands. The meaning of these variables, which are analogous to the ones from the previous section dealing with Supplier submissions, should be clear enough, but we spell them out in detail anyway:

VARIABLE:   permitted_item_submissions  

 

Yes   No  

If Mike selected No, the Add Item link would disappear from Category pages and no-one would be able to submit files for Mike's consideration. So clearly he wants to select Yes here.

VARIABLE:   permitted_supplier_association  

 

When members upload their audio/video files Mike can choose to force the member to associate the Item record (which they are creating, and which may contain any number of audio/video files up to the maximum number supported by a record in the Item table) with a Supplier Profile. This is exactly what he wants to do. He wants his website visitors to know who created/supplied each track--tracks that are NOT associated with a band are not something he wants to deal with. This means a member must first have created a Supplier Profile (a Garage Band Profile), before they can successfully submit files for consideration.

VARIABLE:   permitted_category_placements  

 

Yes   No  

Mike absolutely wants his garage bands to categorize the music files they submit, so he selects Yes here. Had he selected No it would be up to him, or an editor, to categorize the file before it appeared on public pages. Clearly that is way too much work.

Also, if Mike wishes to allow members to submit tracks to different categories he will need to adjust the current default value for the User.can_populate column. By default this value is set to team, which means that memebers can assign themselves to different Teams (if Teams have been defined by the administrator).

To allow members to add existing Items (that they have submitted) to different Categories, the default value of the User.can_populate column should be changed to team,category. If members were also able to add their Supplier Profiles to different Yellowpages the default value for the User.can_populate column would be team,category,yellowpage. But remember that Mike does not want to allow members to assign their profiles to different yellowpages (geographical regions) because, in his case, that woud not make a whole lot of sense.

VARIABLE:   permitted_category_per_supplier  

 

Music tends to be fairly easy to pigeon-hole, so there is not much point allowing members to submit their audio/video files to more than a few categories. So Mike might select maybe 2 or 3 for the value of permitted_category_per_supplier.

Audio Track / Video Clip Formats

Mike will be using the Item table to capture either audio tracks or video clips that each band uploads. We will see in the next section how to add columns to the Item table to store uploaded files. In particluar, columns that can be used to store audio and video files.

Before we get to that stage, however, it is worth thinking a moment about what file format is best used to represent audio and video content on Mike's site, because there are limitations to the various formats. Of paramount importance is the final size of the file that has been used to record X minutes of audio or video content. For example, .WAV audio files use an uncompressed sound file format and therefore produce huge data files (around 250 MBytes for 40 minutes of mono sound). In contrast, the MP3 audio format uses a highly compressed representation of the audio content (around 6 MBytes for 40 minutes of mono sound).

Clearly you want to avoid making .WAV audio files available for download. Another compression format that compares favorably to MP3 is VQF. Real Audio is also fairly popular, but this format tends to be 2-5 times larger than MP3 and VQF files. So the plan of attack generally involves creating a recording in a format like .WAV, processing it to remove unwanted noise, and then using an MP3 or VQF encoder to compress it down to a conveniently small size for web uploads and downloads. Compression ratios of 10:1 will result in final MP3 or VQF audio files that are almost indistinguishable from the original file in quality. If you are prepared to sacrifice quality, 100:1 compression ratios can be achieved.

For a quick rundown on the subject of audio file formats and the problems involved with streaming audio files from a web site, check out Audio Primer Tutorial and Audio Guide Tutorial.

Whatever file formats Mike settles upon as acceptable, Red Queen will in general display a link to the file on detail pages and allow visitors to the page to download the content by right clicking and selecting the Save As option. Left clicking will cause most modern browsers to attempt to stream the content into an application on the user's PC that allows the file to be listened to as it is downloaded, or watched if it is a video clip. But Mike can do better than that if he decides to restrict acceptable file uploads to the MP3 format for audio files, and SWF or FLV formats for video files--as we will see in the next section.

Advantages Of MP3

We have seen how the MP3 file format can be used to highly compress audio content, making downloads relatively painless. This has made the format very popular on the internet and has spurred developers to create software around the format. One such suite of applications is known as the Wimpy Player, which makes audio file integration into a website fairly painless. Wimpy is not without some minor problems, but it is fairly flexible, and inexpensive. Because of this, Red Queen will accommodate the webmaster who has added one or more of the Wimpy Playes to their web site and who is in the practice of restricting audio file uploads largely to the MP3 format. Why only MP3 files for Wimpy? Well, in the words of the Wimpy creators themselves:

Wimpy is based on the Adobe Flash plugin, which currently only supports MP3 audio playback. If the folks at Adobe decide to include additional audio formats, we will definitely include the ability to playback any new audio format(s) that the plugin supports. At this time, only MP3 files can play though the plugin.

Wimpy also supports Shockwave video formats with the .swf and .flv extensions. These are formats that can be handled by Flash-based applications like the Wimpy Players. Flash itself is available on 98 percent of PCs. This means the end user will not have to download any special software to view the audio or video files that you present on your site (provided you stick to MP3, SWF, and FLV formats).

With the Wimpy MP3 Player in place, audio files can be embedded into the web page as a playable list inside an attractive Jukebox interface that provides all the controls necessary to manage the list. Likewise the Wimpy AV and WASP Players provide a means to presenting both audio and video clips. The WASP Player, in particular, is very suitable for handling video content and is recommended if you wish to add video to your Red Queen pages. More will be said about the various capabilities of the players elsewhere in this tutorial. For now, keep in mind that there are several options for presenting your content once it enters into your database. Which is the most suitable representation will depend on the number and kind of files you accept.

Now that we have a plan for representing the content once it has been collected, it is time to think about how Mike might customize his Item table to allow for those file uploads. This, of course, will involve the unique elements that go into setting up a music review site.

Next Section: ADDING AUDIO FIELDS

« Table of Contents


Copyright © 2004 Random Mouse Software. All Rights Reserved.