chrisguttandin / extendable-media-recorder

An extendable drop-in replacement for the native MediaRecorder.
MIT License
258 stars 13 forks source link

How to specify sample and bit rates for the recording? #659

Closed abhijeet-toptal closed 1 year ago

abhijeet-toptal commented 2 years ago

Is there a way I can specify the following while recording:

Channels: 1 Sample Rate: 16000 Precision: 16-bit Bit Rate: 256k Sample Encoding: 16-bit Signed Integer PCM

I have seen the recordings done via native MediaRecorder have got a single channel and less sample and bit rates.

abhijeet-toptal commented 2 years ago

@chrisguttandin can you please check this?

chrisguttandin commented 2 years ago

The number of channels and the sample rate is determined by the MediaStream that you record. At least that's how it should be. If you experience something different it's probably a bug.

There is currently no way to define the bit depth. Luckily it's hardcoded to 16 bit.

Does this answer your question?

chrisguttandin commented 1 year ago

I'm closing this since I recently added a description on how to change the sampleRate as part of #674.

There is already already another issue (#643) which tracks the missing audioBitsPerSecond option.