Question

for my personal Website I'd like to implement a gadget for me and my friends. Aim of this script should be to convert an uploaded .flac audio file to .mp3 choosing the music quality eg 128kbit/s or 320kbit/s. Is this possible an if so, how? Interesting is only the core part (converting), the rest I already have implement :)

Thanks very much :)) Niklas

Was it helpful?

Solution

Are you familiar with ffmpeg? If it is installed on your server, you can try running on CLI

ffmpeg -i input.flac output.mp3

If that works, you can go on trying passing that command from your application to the shell (if you use for example PHP for your application and a Debian Linux as hosting.)

To include the bitrate you can use

ffmpeg -i input.flac -ab 128k output.mp3

or

ffmpeg -i input.flac -ab 320k output.mp3

If you can use it, see also the documentation: http://ffmpeg.org/ffmpeg.html It is possible, that you have to use a different command for the bitrate depending on your version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top