question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhance the audio quality while sharing only the sound (or with the video)

See original GitHub issue

What are you trying to do?

I’m trying to have the best possible audio quality, if the presentator wants to share his audio output stream. For example: sharing a music during the meeting.

How can the documentation be improved to help your use case?

Is there another part than setContentAudioProfile(AudioProfile.fullbandMusicMono() and mixIntoAudioInput(stream) ? Theses parts do not have much information.

What documentation have you looked at so far?

I tried to mix the audio stream from getDisplayMedia, and mix it with the audio input: mixIntoAudioInput(stream) -> nothing happened, perhaps I’ve done something wrong I tried to directly put the stream from getDisplayMedia into chooseAudioInputDevice(stream) -> it worked, but the quality is very poor (voice from microphone ok, but the music is not) I configured setContentAudioProfile(AudioProfile.fullbandMusicMono()), but still very poor.

Is there a better way to do that ? To share a music (from a tab/window or output) with the clearest and best possible audio quality?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zhemitu-amzncommented, Nov 12, 2021

@LouisMx Currently the best audio quality configuration is audio: { autoGainControl: false, channelCount: 1, echoCancellation: false, googAutoGainControl: false, latency: 0, noiseSuppression: false, sampleRate: 48000, sampleSize: 16, volume: 1.0 } This will give you a 64 kbps 48 kHz sampled Opus audio stream.

1reaction
richnew10commented, Oct 26, 2021

When you share content in a meeting, the content share attendee has its own audio and video streams. It should be sufficient to set the content audio profile without trying to mix input. You must set the audio profile prior to starting to share content.

You can try specifying higher bitrates and see if that helps:

setContentAudioProfile(new AudioProfile(100_000));

but I suspect you’re getting lower quality audio from the capture stream itself. Try capturing the display with different audio constraints, such as these (untested, so please try various options):

const input = await navigator.mediaDevices.getDisplayMedia({
  video: true, 
  audio: { 
    autoGainControl: false,
    echoCancellation: false,
    noiseSuppression: false,
    sampleRate: 48_000,
  }
});
await audioVideo.startContentShare(input);
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Improve the Audio Quality in Your YouTube Videos
These tips can help improve the sound quality. ... However, it's only the starting point; when you record your audio, you should probably ......
Read more >
How to Improve Audio Playback Quality in Zoom - YouTube
How to improve the quality of the audio when you are screensharing in Zoom. ... Your browser can't play this video.
Read more >
How to Improve Sound Quality on a Home Recorded Video?
How to improve sound quality on a home recorded video this tool has the power to enable you mute, detach or even denoise...
Read more >
5 Tips to Improve the Audio Quality in Your Video Presentations
Here are 5 simple tips that can ensure that the audio in your presentation recordings are as clear and easy to hear as...
Read more >
Top Tips To Improve Audio Quality in Your Zoom Meetings
Your sound quality may also suffer if you're in an empty room with hard surfaces that produce lots of echoes. Instead, pick smaller...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found