tags:

views:

98

answers:

3

How can I convert flv file to a mp3 file by using php?

+2  A: 

This is not possible in plain php. At least I don't know of any library that would support this transformation. What you can do is call ffmpeg using system() or exec() and execute the desired tranformation (requires ffmpeg to be installed on the host system).

Best wishes,
Fabian

halfdan
+1  A: 

Check this question for a ready-made ffmpeg approach.

Pekka
+2  A: 

I would suggest using ffmpeg to do the actual conversion.

So you could use the system() function to call an ffmpeg command such as:

ffmpeg -i input.flv -acodec copy output.mp3

Alternatively, this might help: http://www.phpclasses.org/browse/package/3747.html

mopoke
Does it take long to convert 5 minute low quality flv file to mp3 file ?
Oguz