rio38 Posted December 19, 2008 Share Posted December 19, 2008 I have created a site that allows the user to upload mp3 files and create a promo package out of them which are available for download. Right now I only allow them to upload the audio in mp3 format which forces them to convert teh audio into mp3 manually before uploading it. Not all users will know how to do this if they have their music on iTunes or on CD. This is for an independent music site so it is not illegal copies or pirating. It is for independent bands that are putting promo packages together for record labels, etc. Is there a way to take an audio file of any format and convert it to mp3 on the web server after it is uploaded? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/ Share on other sites More sharing options...
carrotcake1029 Posted December 19, 2008 Share Posted December 19, 2008 I am sure someone took the time to write something to do this, but this would put quite a task on your server depending on how much traffic you get. PHP simply wasn't meant to do these types of operations. If your server supports SSH or you can get direct access to it, you could have a program server side that runs every 24 hours or so and could convert any new uploads. In my opinion, converting media files with php is somewhat inefficient. Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719804 Share on other sites More sharing options...
premiso Posted December 19, 2008 Share Posted December 19, 2008 I believe the ffmpeg package allows it, and you have to use exec to do it. Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719806 Share on other sites More sharing options...
redarrow Posted December 19, 2008 Share Posted December 19, 2008 All you need to do is use a free small program and use exec()... Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719809 Share on other sites More sharing options...
rio38 Posted December 19, 2008 Author Share Posted December 19, 2008 All you need to do is use a free small program and use exec()... Could you give me an example of that free small program? And can I use this on say a GoDaddy account? Thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719840 Share on other sites More sharing options...
premiso Posted December 19, 2008 Share Posted December 19, 2008 All you need to do is use a free small program and use exec()... Could you give me an example of that free small program? And can I use this on say a GoDaddy account? Thank you very much. Probably not, you would need access to the SHELL to install it, unless they have it installed for you. LAME is an example of the dll you would need to do it. It offers a command line mode etc. But the chances of this actually being allowed by godaddy is slim to none. Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719848 Share on other sites More sharing options...
redarrow Posted December 19, 2008 Share Posted December 19, 2008 Sorry but your need to get a proper full php 5 functional host first, then use a small 3rd party free program... Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719866 Share on other sites More sharing options...
redarrow Posted December 19, 2008 Share Posted December 19, 2008 have a look at this it based on linux theo... http://www.andrews-corner.org/abcde.html Quote Link to comment https://forums.phpfreaks.com/topic/137700-is-it-possible-to-convert-audio-to-mp3-via-web-server/#findComment-719878 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.