I used RecordRTC and implemented with Angular.js, audio recording is working fine in Mozilla and recorded blob type is ogg, so I saving file in server in ogg format.
But I need it in MP3 format as we have to support in different phone OS. So I further converting using ffmpeg:
exec('/usr/bin/ffmpeg -i /var/www/dtswork/bluejaypt/us/bjaypt/uploads/index.ogg -acodec libmp3lame /var/www/dtswork/bluejaypt/us/bjaypt/uploads/index.mp3 2>&1'))
Using above command but it's giving "/var/www/dtswork/bluejaypt/us/bjaypt/uploads/index.ogg: End of file".