DeltaCircuit / react-media-recorder

react-media-recorder is a react component with render prop that can be used to record audio/video streams using MediaRecorder API.
https://npmjs.com/react-media-recorder
MIT License
497 stars 130 forks source link

Audio recorded in mimeType audio/x-matroska despite specifying blobPropertyBag as audio/mpeg #95

Open mayurc137 opened 2 years ago

mayurc137 commented 2 years ago

Here is an example of the file generated using the media recorder-> https://botspace-inbox.s3.ap-south-1.amazonaws.com/assets/5f64256823133d00d13d7b19_1650675975443.mp3

On checking the metadata from -> https://exifmeta.com/ the results are as follows -> https://cln.sh/j6bBwz

The file mimeType is set to audio/x-matroska, I want the file mimeType to be audio/mpeg.

const { status, startRecording, stopRecording, mediaBlobUrl, } = useReactMediaRecorder({ audio: true, blobPropertyBag: { type: "audio/mpeg" } });

VishalSalunke commented 2 years ago

any update on this?

mannyakosah commented 2 years ago

Any update on this? Trying to set audio codec to AAC but neither mediaRecorderOptions nor options works.

<ReactMediaRecorder
               mediaRecorderOptions={{CODEC specified here}}
               options={{CODEC specified here}}
                video
                ...
                render={({
                ....}) => 
/>

It would be great to change the default audio codec from OPUS to other protocols.