I want to upload any audio file and want the out put in the mp3 formate . Is it possible in rails ? Is there ffmpeg code or any thing that convert any audio file to mp3? if any share
+1
A:
Is it possible in rails ?
Yes it is possible.
Is there ffmpeg code or any thing that convert any audio file to mp3?
Yes.
just follow this beautiful article
Your command something like follwing
system "ffmpeg -i #{full_filename} -r 25 -acodec flv -ar 22050 -y -s 320x240 #{full_filename}.mp3"
Salil
2010-07-10 08:10:11
@audio_conv = Audio.find(@audio.id) system "ffmpeg -i #{RAILS_ROOT + '/public' + @audio_conv.public_filename } -r 25 -acodec mp3 -ar 22050 -y -s 320x240 #{RAILS_ROOT + '/public' + @audio_conv.public_filename}.mp3" I have tryed this but it shows /home/nikhil/sites/musigigs/public/mp3/0000/0016/Airtell.mid: Unknown formatfalse
Arpit Vaishnav
2010-07-10 10:55:40