Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conversion problem

    hi,

    can anybody plz help me knowing how can i convert a wav file to mp3. The wave file gets generated in a form (recording) thru voice, now when the form is submitted, the wav file shud be converted to mp3 or any other small audio format and then get uploaded to another location.

    i am using windows advanced server. i am not able to figure out, how to solve this problem. my project is in php. is there any script in php that can help, or i have to integrate any other script with it for the conversion. if yes then plz help

    Gaurav

  • #2
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts

  • #3
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well I don't know of a PHP that will actually do the conversion, but I think the way you need to be thinking here is actually as follows:
    -Have the form upload the file (WAV)
    -Use a command line conversion utility to convert the WAV file to whatever
    -Save that output file (the MP3 or WMA or whatever..) to your desired location.

    That's the way I'd do it anyway. As for a good command line converter, I don't know of one off hand, but I'm sure there are a few available.

    Hope that helps,
    Sadiq.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What troubles me a little is your description of the workflow. I mean that first a sound file is saved as a .wav, and then transferred to your server to get converted to a .mp3. MP3 was introduced as a standard to compress audio files to actually save bandwidth. Your application does it in reverse though; you transfer the huge files (IIRC a .wav with music in CD quality is like 1 minute music ~= 10 MB of data!) first, and compress them later. I don't know if that's a particularly good route to follow.

    You did not write if your application has been restrained by certain factors that only make this workflow possible to implement. But I would strongly recommend to reconsider your approach. If you can demand the client to have a microphone and recording software installed, you surely can ask for MP3 compression too? That would

    a) make the upload easier, PHP isn't good at handling huge uploads, and your server usually restricts you quite much on the size of your upload
    b) lower your bandwidth bill
    c) improve the user experience as you don't have to wait ages for your browser to process the uploading
    d) prevent a lot of broken uploads because users got impatient at point c)

    Just some thoughts.
    De gustibus non est disputandum.


  •  

    Posting Permissions

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