SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    645
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Convert wav to mp3 but not with ffmpeg?

    My page is hosted on Hostmonster and I want to convert uploaded wav-files to mp3 on a page.
    But I can't use FFMPEG on hostmonster, since, as they say, it's too processor intensive.

    Is there any other thing I could use for this to work?

  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,075
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    Any command line tool can be used with PHP using passthru(), which will just send a command to the OS. You are probably going to be in the same boat with the rest of the tools that are out there though.

  3. #3
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,807
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by K. Wolfe View Post
    Any command line tool can be used with PHP using passthru(), which will just send a command to the OS. You are probably going to be in the same boat with the rest of the tools that are out there though.
    Yep, I was thinking the same thing.

    @brad62 ; Any tool to convert wav to mp3 will be resource intensive and likely not allowed by hostgator. So without moving to a VPS or a dedicated server, I don't see how you'll be able to achieve this.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  4. #4
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    645
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to stay at Hostmonster and just have the converting tool on another server. I found some on this page: http://www.hostingdiary.com/2008/02/ffmpeg-hosting.html
    There are a lot of things I like about Hostmonster that I am using and especially Cron Jobs.
    But if a user is uploading a wav-file. Is it possbile for me to convert it from another place and then either connect the file to a folder over there or move it in some way to my area when it's converted.
    I want to do this, since the user is uploading an uncompressed wav-file and I just want to convert a part of it a a 30 second mp3 sample of the audio file.

  5. #5
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,807
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    Unless you have some serious programming chops, that could prove a bit difficult. I'm not saying you should ditch hostgator, but maybe just look into some of their higher services (VPS/Dedicated Server). As what you are trying to achieve really does need a dedicated server (or VPS).

    I can't seem to visit the hostingdiary.com (blocked at work...), so I can't really see how the service works or is meant to work to give you an idea on how difficult/easy it would be to use for your purpose, but here is a brief outline of the complications you'd ensue:
    1. User uploads the file to your account at hostgator
    2. You need to send that file and any relevant details for encoding to a third party location, all the while keeping track of where that file should be located on your hostgator account (as you may receive 2-3 of these at the same time)
    3. You need to either give details to the third party to send the file back to, or you have to receive notification of completion or ask the third party if it is completed yet
    4. Once completed and the file is received, you have to place it where you want it to be stored


    It can be done, but the amount of effort you are going to put into it, will make the VPS or dedicated server worth the money on its own. Just my 2 cents.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  6. #6
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    988
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    One alternative would be to find an open source converter and port the code to PHP. You are just dealing with binary data after all, there's nothing stopping you doing the conversion with PHP itself.... however that is not going to be an easy task and it's going to be a lot of work!


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
  •