Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multi-channel recording #142

Open
Lovinity opened this issue Sep 7, 2020 · 3 comments · May be fixed by #145
Open

Support for multi-channel recording #142

Lovinity opened this issue Sep 7, 2020 · 3 comments · May be fixed by #145

Comments

@Lovinity
Copy link

Lovinity commented Sep 7, 2020

I noticed my stereo (2-channel) mediaStream was only getting its first/left channel saved into the MP3s. I also noticed in the audio process that mp3mediarecorder is only getting data from the first (left) channel.

I would like to know if/suggest mp3mediarecorder support multiple channel recordings in the future, especially since some may use this to record stereo audio (such as radio programming) for archive purposes.

Thank you!

image

@elsmr
Copy link
Owner

elsmr commented Sep 8, 2020

Hey, thanks for the suggestion.

I did some digging and I think it should be possible to combine all channels in the AudioBuffer before sending it to the encoder. I'll try to implement something soon when I find some time 😄

EDIT: I'm talking about combining the audio from all channels into mono audio, recording as true stereo (or more channels) will require changes in https://github.com/Kagami/vmsg

@elsmr elsmr linked a pull request Sep 17, 2020 that will close this issue
@EricTetz
Copy link

EricTetz commented Oct 6, 2022

I think it should be possible to combine all channels in the AudioBuffer before sending it to the encoder

That's something the user of the library can trivially do himself at the stream level.

It was heartbreaking to do the work of integrating this into my app today (lots of UI work) only to discover it only records mono. That's worthless for music. You should mention this limitation in the readme. Calling it a ponyfill and mirroring the MediaRecorder API suggests that it has at least the same capabilities, but mono-only is a show-stopping restriction in many contexts.

@EricTetz
Copy link

EricTetz commented Oct 9, 2022

Since I needed it for my project, I wrote an MP3 recorder that works in mono or stereo. It makes no attempt to emulate the MediaRecorder API. It's using lamejs, so it's roughly twice the size of this library. But it's easier to use and supports stereo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants