Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am attempting to have an interface in which people can upload music files and listen to them through the site. The biggest problem obviously is that someone who uploads an audio track in mp3 format into Mozilla wouldn't be able to play it back (since MF doesn't support mp3 playback since I'm using jPlayer).

I did some research and found out that I could use command line php using FFmpeg to convert the mp3 to ogg or some other supportable format. I believe I understand (a little bit) how command line php works but I was wondering how I could install it onto phpmyadmin on my hosting service? Could anyone link me to a tutorial or care to explain? I tried googling it but I just couldn't find it.

share|improve this question
add comment

migrated from stackoverflow.com Sep 18 '11 at 1:57

This question came from our site for professional and enthusiast programmers.

1 Answer

You could have the user upload their file, and use PHP's system() function to run ffmpeg command line. For example, system("ffmpeg -i inputFilePath outputFilePath");

After the file is converted, you idealy would store it somewhere and add a row to your database with the path to the file and any other information (title, description, date, uploader, etc). Phpmyadmin would only be used for setting up your database.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.