Hi, I followed the guide at https://mediasoup.org/documentation/v3/communication-between-client-and-server/#guidelines-for-node-sctp to try to broadcast through WebRTC to mediasoup-client in the browser. Eventually the goal is to livestream from x11 and alsa, but for demonstrating the issue I’m facing, I have set up a simple example with just a looping .webm file instead.
I’m experiencing unusually high videos stream packet loss: pretty much every single packet is lost save for a few small chunks spread far apart. Here are some graphs from chrome://webrtc-internals:
My ffmpeg options look something like:
ffmpeg \ -re \ -stream_loop -1 \ -i ~/a.webm \ -map 0:a:0 \ -c:a libopus -ab 48k -ac 2 -ar 48000 -application lowdelay -cutoff 12000 \ -map 0:v:0 \ -pix_fmt yuv420p -c:v libx264 -tune zerolatency -preset ultrafast -threads 0 -crf 23 -minrate 5M -maxrate 5M -bufsize 10M \ -f tee \ "[select=a:f=rtp:ssrc=11111111:payload_type=101]rtp://127.0.0.1:3301?rtcpport=4502|[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://127.0.0.1:3501?rtcpport=2989"
I’m not sure what the source of the problem is exactly. These options seem to work perfectly fine when simply outputing to a file. Is there some detail I’m missing?