Downloading mp3s without using zip

Bruce Gust
Bruce Gust used Ask the Experts™
on
I'm being asked to look into the possibility of offering to my user the opportunity to download mp3s in a manner that would be similar to what they do on Amazon using their "Cloud" player.

At first I recommended using the "zip" approach, only because you're automatically prompted to select a location for your download, whereas a a "raw" mp3 is often opened up using quicktime and it can become less than intuitive.

The other concern I had was that in some instances, the "playlist" that's being downloaded will include a video so you're looking at a download that's over 60MB when you include the songs and the video file, so displaying the selections one at a time with a corresponding download button seemed the best route.

In any event, I'm looking for feedback to either reinforce my recommendation that my client offer the selected playlist as a:

- list of selections that are to be downloaded one at a time with each file being a zip file
- one big file (possibly cumbersome) as something other than a zip file, but I have no idea what that would look like
- duplicate of what amazon.com offers in terms of a "cloud" player, but I don't know if that's going to be feasible since we're not collecting any customer data and there will be no way to provide an individualized web interface

Bottom line: Is there another way to facilitate downloads easily without using a zip file approach? I'm thinking, "No," but I wanted to run it past some minds greater than my own.

Thoughts?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016

Commented:
My two cents:  ZIP compression is really good for plain text  with whitespace.  Binary files like MPEG-encoded data is already compressed, and the addition of ZIP compression may not be a value-added feature.
Bruce GustPHP Developer

Author

Commented:
Ray, I get that, but my challenge isn't so much in compression as much as it is in ease of use. Asking a user to right click on a link and highlight "Save Target As..." and any one of a number of other approaches is going to look and feel amateur when compared to an amazon.com or iTunes.

I'm trying to convince my client that using a zipped approach is best in that the user will automatically be prompted to download the file, select where they want it on their desktop, etc. The only other option I can see is where you have an actual application that in some instances actually interfaces with iTunes and I'm not sure, given the scope of my client's campaign, that kind of time, money and code is worth it.

When I've built a shopping cart in the past, I've always used either zen cart or, if I built something from scratch, the download was always a zip file simply because of the way an operating system processes it as a download.

I guess I just want to bounce this off of you and anybody else who's experience and knowledge is greater than my own to make sure that the recommendations I'm making go beyond my preferences and do represent the downloadable landscape as it truly exists. Namely, apart from building a standalone application, offering your downloadable mp3 files as a zip file is going to be the easiest to build and the most intuitive for the user.
Most Valuable Expert 2011
Top Expert 2016

Commented:
Was hoping to also post some examples from my own site, but as fate would have it, the server crashed and the hosting company is scrambling to replace a failing hard drive.  When they get it back online, have a look at the audio recordings of the sermons at www.nationalpres.org and see if that has a design that makes sense for your needs.

All the best, ~Ray
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Bruce GustPHP Developer

Author

Commented:
I'll do it! Thanks!
Bruce GustPHP Developer

Author

Commented:
Hey, Ray! I'm clicking on "sermons" on your page but I don't see any options for downloading the mp3. I've seen where you can download the bulletin, but I'm missing the mp3 dynamic.
Most Valuable Expert 2011
Top Expert 2016
Commented:
Try this link:
http://nationalpres.org/sermon.php?d=2011-05-01

Not all of the sermons have audio recordings online, but I am pretty sure this one does.
If you're going to be downloading a bunch of files in a single link, zip is the easiest and most intuitive way.  It may take a bit of extra time to zip the files together, and would be worthwhile to use the "fastest" compression if possible.

The part Ray was getting at (I hope) was that trying to compress an MP3 generally causes the "compressed" file to actually be slightly larger than uncompressed; in this case, using zip for a single MP3 is useless.

In any case, whether the file is MP3, ZIP, or some other format, you can force the browser to download the file by setting content type.  Instead of linking directly to the file (i.e. "/downloads/file.mp3"), point them to a wrapper script (i.e. "/downloads.php?q=file/mp3"); that script can then set a header for content type to be "binary/octet-stream" (or, my favorite, "binary/download"); any content type that the browser isn't setup to handle should cause it to prompt for download.
Bruce GustPHP Developer

Author

Commented:
Thanks, guys!

Ray, what's the m3u option you offer? That looks very, very cool in that a person can download a file that is automatically read by iTunes.
Most Valuable Expert 2011
Top Expert 2016

Commented:
Thanks for the points.  Just copy and follow the design pattern.  I am admittedly not sure why it works, but it does!  Apple is smarter than I am!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial