[FFmpeg-user] What are my options for adding ffmpeg to a webserver for audio conversion?

Nick Putman nick_harambee at me.com
Wed Mar 30 12:03:32 CEST 2011


Thanks.  Just to be more specific about what I am trying to do.

I have a playlist on a webpage that dynamically reads songs from a folder on my server and adds these tracks to the playlist (users can upload songs to the folder).  I am looking for a method of converting any audio format uploaded (within reason) to MP3 192kbps once they have been uploaded (unless they are already MP3s of 192kbps or less), and then deleting the original file. 

I have a method of doing this using ffmpeg locally, using my Mac as a server, and folder actions attached to the folder the audio files are uploaded to.  I am wondering if there is a way of doing the same thing on a remote server, using ffmpeg and PHP (it would seem that this is possible), and if so, what the most straightforward way of doing this would be. I am prepared to change my remote host to get this working. 

The media server solution, as I understand it, would still mean hosting the webpage locally rather than remotely, which is what I am trying to do.

Nick

On 29 Mar 2011, at 10:01, Corne Beerse <cbeerse at gmail.com> wrote:

> On 28-3-2011 20:03, Nick Putman wrote:
>> I have used ffmpeg as a command line tool on my Mac, and am now interested in adding it to a webserver so that files uploaded to a website can be automatically converted to mp3.
> 
> If it is for streaming purposes, see ffmpeg's sister ffserver.
> 
> If it is only for converting to mp3, I'd say to see how the mp3 tools are called from ffmpeg and use that direct. As far as I know the 'lame' libraries are in use there.
> 
>> I have limited experience of using PHP, but having done some searching around it would seem that it is possible to convert audio files that are uploaded using PHP and ffmpeg. The audio files would be uploaded using an upload script called 'Uploadify'.
> 
> There are also ready-made services, most in the upnp and/or dlna area that can do your stuff on the fly, they use ffmpeg where necessary. By head, twonky, tversity and such are names. Media-servers are the tools to look for.
> 
>> I am currently using Hostpapa for hosting my website, and I understand that they don't include ffmpeg, and also don't allow ssh. I read on one website that I could still install a compiled version of ffmpeg on a shared server, but I am not sure if this means that it would work on Hostpapa, or whether I would need to change my host to get ffmpeg working.
> this all indicates you move your service out of the current used box to a box in your network. Hence, I'd say to use a media server.
> 
> 
> CBee
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list