0

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

Scarface
  • 3,845
  • 7
  • 41
  • 71

1 Answers1

1

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
  • 537,072
  • 198
  • 649
  • 721
  • 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 Apr 07 '10 at 01:55
  • You can use Lame - see http://stackoverflow.com/questions/2304736/how-do-you-run-a-command-line-program-like-lame-or-svn-with-php As for the other question, perhaps ask that as a new question. – nickf Apr 07 '10 at 04:04