Hey guys, quick question for any experts out there. I am allowing users to upload and post mp3s so other users can listen to/stream. I was wondering if anyone had any tips for reducing bandwidth, or any tips or methods for streaming mp3s. I currently just reference the location of the file with my flash mp3 player after the file has been uploaded. I would ask about images as well, but I am pretty sure they can be compressed using gzip or mod_deflate
+1
A:
You could downsample the MP3 to a lower bitrate or go to mono instead of stereo. I doubt you'd have any luck with gzipping since MP3 is already a compressed file type. It's like zipping a zip - you might save a couple of kB, but it wouldn't be worth it.
nickf
2010-04-07 01:02:32
That is a great idea about lower bitrate, appreciate it. Would you have any suggestions on how to accomplish that in php. I know video handling is done in FFMPEG, but I am unfamiliar with any widely used mp3 handler that works with php. Also, is it possible for someone/or a bot to somehow execute an mp3 a thousand times and kill your bandwidth? If so how could you prevent that?
Scarface
2010-04-07 01:55:27
You can use Lame - see http://stackoverflow.com/questions/2304736/how-do-you-run-a-command-line-program-like-lame-or-svn-with-phpAs for the other question, perhaps ask that as a new question.
nickf
2010-04-07 04:04:42