SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: Generating MP3

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    Beijing
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generating MP3

    Does anyone know if there is any available code, plugin, or software (free or paid) that can be used by PHP to generate MP3 files?

    Would appreciate if someone could point me in the right direction.

  2. #2
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use lame (it's an open source mp3 encoder) to convert wave to mp3's, and then use exec() to call it. Google for lame and you should find the SourceForge project.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    Beijing
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that is exactly what I was looking for!!

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem.

  5. #5
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi blank_man,

    some days ago I searched for a solution to convert different audio files into MP3. In my thread people told me about lame, too. But encoding seems very resource intensive (CPU) and you need root access to the webserver.

    Do you want to install it on a webserver? I really would like to hear some tests reports.

    oerdec

  6. #6
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, it's CPU intensive -- but you have to expect that with any algorithm like mp3 encoding. It doesn't slow down my server at all, but who knows.

  7. #7
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could you post any details on your server? I mean how many other websites or applications are on it?

  8. #8
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Half a dozen sites, Celeron 2.0 ghz, 512mb of ram. It sends the load up, but it doesn't affect Apache in the slightest.

  9. #9
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, I will ask our admin if he could install lame on our server. Hope he isnīt going to kill me.

  10. #10
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't install lame. It's just an executable that you run. I use it all the time locally (it's Windows and Linux) to downsample my songs to 96kbps ("lame --mp1input song.mp3 -b 96 --resample 44.1" will output song.mp3.mp3 as the 96kbps/44khz thing). You can also convert wave to mp3 by going something like "lame in.wav out.mp3 -k -q0 -ms -b128" (that -b is the bitrate, so that's 128kbps). Good luck!

  11. #11
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know, I was talking about GUIs or applications that use lame.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •