Comments (1)
- Chrome currently unable to capture microphone with stereo channels. Mono is the only format captured by chrome. Chrome uses custom wrappers to convert mono audio into stereo format i.e. dual channels. This is one of the biggest factors in the audio latency.
- If you explorer chromium code; you'll see that some APIs can only be successfully called for WAV files with stereo audio. Stereo audio is only supported for WAV files.
Though we can convert stereo back into mono; however we can't encode mono audio into WAV container. We need to choose mp3 or other formats.
Chrome is still missing native mp3 encoders. You need to be using Empcrypten/etc. implementation in JavaScript.
Both MediaStreamRecorder.js and RecordRTC.js are using bufferSize=4096
. Buffer-size is passed as 1st argument over createScriptProcessor
.
if (context.createJavaScriptNode) {
__stereoAudioRecorderJavacriptNode = context.createJavaScriptNode(bufferSize, 2, 2);
} else if (context.createScriptProcessor) {
__stereoAudioRecorderJavacriptNode = context.createScriptProcessor(bufferSize, 2, 2);
} else {
throw 'WebAudio API has no support on this browser.';
}
Possible values for Buffer-size are:
[256, 512, 1024, 2048, 4096, 8192, 16384]
From the spec: This value controls how frequently the audioprocess event is
dispatched and how many sample-frames need to be processed each call.
Lower values for buffer size will result in a lower (better) latency.
Higher values will be necessary to avoid audio breakup and glitchesThe size of the buffer (in sample-frames) which needs to
be processed each time onprocessaudio is called.
You can reduce WAV file's size using low-bufferSize however it'll result in audio quality lost.
from mediastreamrecorder.
Related Issues (20)
- ondataavailable not being called HOT 2
- Allow receiving of ArrayBuffer instead of blobs
- 'onstart' event is not implemented
- how to record the sound of bluetooth headset
- Save recording as MPEG-TS HOT 3
- No MediaRecorder handler can be created HOT 2
- Very high CPU utilization on chrome version 77.X HOT 2
- How to record the system sound or the other party's voice
- Audio Channels constraint
- Float32 to Int16 in StereoAudioRecorderHelper.js
- why I can't save my record file,it's downloaded,but cant play in my player but the bolb link can play in browser HOT 2
- streams with audiotracks only are not recorded and give any data on ondataavailable event HOT 3
- Example of how to record the screen? HOT 1
- MultiStreamRecorder with 1 audio only and 1 video stream results in poor video quality (low resolution) HOT 1
- Deprecation: ScriptProcessorNode
- I want to open two (or more) screens with different sources.
- ERROR TypeError: Failed to construct 'MediaRecorder': parameter 1 is not of type 'MediaStream'.
- exact sync of video and audio HOT 1
- Get audio blob on demand explicitly.
- gif chrome
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediastreamrecorder.