2

I would like to find a way to record audio (not video) in mp4 format on the web.

Reason for this is ios/android are both generating in this format, and I want to be able to be consistent with the audio format. (android mediarecorder for example does not do mp3, thats the reason why this is the preferred format)

Is there a recorder that records mp4 audio for web/html5/rails?

UPDATE:

I found out recorderjs https://github.com/mattdiamond/Recorderjs

Im guessing if I could change encodeWAV to encodeMPEG4 in here: https://webaudiodemos.appspot.com/AudioRecorder/js/recorderjs/recorderWorker.js

This is the target audio outcome Im trying to achieve:

Type: Audio

Codec: MPEG AAC Audio (mp4a)

Axil
  • 2,835
  • 5
  • 43
  • 97

2 Answers2

1

There is an example which uses Web Audio API. I think your front-end(HTML and Javascript) should handle audio recording which will generate mp4 file then you can save it in your rails app via Carrierwave or something else.

Mr.D
  • 5,765
  • 8
  • 41
  • 95
  • hmm, im not sure if it does generate mp4. so far i'ved found other formats. https://github.com/higuma/web-audio-recorder-js. not clear yet how to build the file codec (aac) and container for mp4. – Axil Feb 22 '16 at 06:47
0

Try to use ffmpeg,

www.ffmpeg.org

streamio-ffmpeg