AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
3.7k stars 303 forks source link

Discarded packets, 0 fps on Firefox #984

Open chatziko opened 3 months ago

chatziko commented 3 months ago

I stream from a Tapo camera (h264, pcma) via WebRTC using the embeded stream.html. Only on Firefox (version 123 on Ubuntu) the image occasionally freezes for a few seconds and then unfreezes again. about:webrtc shows that framesPerSeconds drops to zero for that period, and at the same time discarded packets increases (see image below).

Screenshot from 2024-03-05 19-26-50

On Chrome the issue does not appear at all.

Consumer info:

    {
      "type": "WebRTC/WebSocket async passive consumer",
      "remote_addr": "udp4 host 192.168.2.21:57889",
      "user_agent": "Mozilla/5.0 (Linux; Android 12.0; Build/STTL.231114.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.0 Safari/537.36 CrKey/1.56.500000 DeviceType/AndroidTV",
      "medias": [
        "video, sendonly, VP8, RTX, VP9, H264, RED, ULPFEC, FLEXFEC-03",
        "audio, sendonly, OPUS/48000/2, ISAC/16000, G722/8000, PCMU/8000, PCMA/8000, CN/16000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/16000, TELEPHONE-EVENT/8000, L16, PCML"
      ],
      "senders": [
        "104 H264, bytes=400285903, receivers=1",
        "8 PCMA/8000, bytes=50983936, receivers=1"
      ],
      "send": 456514576
    }

Any help would be greatly appreciated.

AlexxIT commented 3 months ago

Firefox has very awful WebRTC realisation. Don't know why.