srs icon indicating copy to clipboard operation
srs copied to clipboard

WebRTC: Audio downmix to mono in Chrome and Safari

Open streamthing opened this issue 3 years ago • 6 comments

Description'

Please ensure that you maintain the markdown structure. Chrome and Safari has only mono audio. Same issue as: https://github.com/AirenSoft/OvenMediaEngine/issues/203 https://github.com/deepch/RTSPtoWebRTC/issues/105 https://github.com/ant-media/Ant-Media-Server/issues/3368

  1. SRS version: SRS/4.0.177(Leo) - Docker build
  2. The configuration of SRS is as follows:'

Please ensure that you maintain the markdown structure.

rtc_server {
    enabled on;
    listen 8000;
    candidate $CANDIDATE;
}

vhost __defaultVhost__ {
    rtc {
        enabled     on;
        rtmp_to_rtc on;
        rtc_to_rtmp off;
    }
}

Replay

Please ensure that you maintain the markdown structure.

  1. Open stereo WebRTC Stream in Chrome
  2. Change balance in OBS between left and right channel

Expect

Please make sure to maintain the markdown structure. Working stereo audio in Chrome and Safari

TRANS_BY_GPT3

streamthing avatar Oct 13 '21 11:10 streamthing

So what's the problem for transcoding to mono?

winlinvip avatar Oct 15 '21 23:10 winlinvip

SRS isn't transcoding to mono. WebRTC from SRS is playing in Chrome/Safari in mono.

We are streaming live music in stereo, so user also should hear stereo in every browser. This was fixed in Oven, Ant Media and other servers. In SRS also should.

streamthing avatar Oct 15 '21 23:10 streamthing

I found the way to fix this. Created PR: https://github.com/ossrs/srs/pull/2683

streamthing avatar Oct 16 '21 18:10 streamthing

@streamthing

  1. Open stereo WebRTC Stream in Chrome
  2. Change balance in OBS between left and right channel

Do you mean, publish rtmp stream using obs with single channel(mono), and play it by srs using webrtc?

xiaozhihong avatar Nov 12 '21 14:11 xiaozhihong

@streamthing Another question, how can I confirm Chrome or Safira play audio in stereo or mono?

xiaozhihong avatar Nov 12 '21 14:11 xiaozhihong

The stereo audio makes it as good as possible to get a higher quality.

winlinvip avatar Apr 26 '24 23:04 winlinvip