Looks like they're on it: Safari Technology Preview 116 is generally okay!
Only right after starting the stream there is still a brief moment of this distortion, after that it remains stable.
That's exactly the issue I have, thanks for pointing me to this bug report. The test case provided there is spot on: https://jsfiddle.net/juberti/bnmfvjo0/
In recent releases of Apple software (macOS Big Sur using Safari 14.0.1, iOS 14.2 and iPadOS 14.2) the audio of my RTSP stream starts heavily distorted when using WebRTC (Opus audio). After some time audio becomes clean but it can go back to the distorted state later on. I already tried changing...
I updated from 5.2.784 to 5.2.798 and now the same RTSP stream fails, is this again an SDP parsing issue? The SDP has not changed.
o=- 18467 41 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
a=control:*
a=range:npt=0-
t=0 0
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=0...
The freezes were caused by wrong buffer management in the encoder. The I-frames were sometimes too big and therefore arrived too late (buffer underrun situation), causing the browser to freeze the video for the duration of the whole GOP. It was fixed by new firmware from the encoder manufacturer...
Thanks for pointing me to that thread! In comment #16 and #25 a workaround is described and demoed:
So I went ahead to implement this workaround in flashphoner.js around line 14507:
//create offer and set local sdp
connection.createOffer(constraints).then(function (offer) {
// workaround...
It makes no difference whether or opus_formats=stereo=1 exists in flashphoner.properties. Safari and Chrome are always mono and Firefox is always stereo.
I updated to 5.2.784 and set up the custom SDP files for MSE and HLS as per your postings. I can confirm audio is now stereo and the quality is great when streaming to MSE and HLS from my RTSP source.
However, over WebRTC (using Opus) audio is still mono. How do I set the Opus encoder to output...