go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

source Webtorrent

Open MiroG225 opened this issue 1 year ago • 7 comments

I use 3 Tapo cameras as webtorrent from one HA instance to another. Original streams are ok, but all streams over webtorrents are partly damaged or green (attached image).

Screenshot 2024-06-17 134833

MiroG225 avatar Jun 17 '24 12:06 MiroG225

This is because packet loss during UDP transfer. I'll try to see if there's anything I can improve here. It's not a priority at the moment.

PS. Are you using static or dynamic WebRTC UDP port? What is your webrtc config? Are you using Frigate or Docket port forwarding?

AlexxIT avatar Jun 17 '24 12:06 AlexxIT

Just manually shared ONVIF cameras in original go2rtc HA and used it as source in go2rtc other one.

config source:

webtorrent:
    shares:
        door-xxxxxxxx
            pwd: yyyyyyyyy
            src: chata_door
        back-xxxxxxxx
            pwd: yyyyyyyy
            src: chata_back
        gate-xxxxxxxx
            pwd: yyyyyyy
            src: chata_gate

config receive:

streams:
    chata_door: webtorrent:?share=.......................................
    chata_back: webtorrent:?share=...................................
    chata_gate: webtorrent:?share=.............................

(I've changed names, passwords and links here of course)

Then I use the names of cameras in webrtc on dashboard. I have dynamic IP's on both sides.

MiroG225 avatar Jun 17 '24 12:06 MiroG225

OK. Nothing unusual. Tapo camera usually don't have high resolution/bitrate to have packet loss. Perhaps the code that receives packets is not written optimally.

AlexxIT avatar Jun 17 '24 13:06 AlexxIT

One of the cameras is 2k, two are full HD.

MiroG225 avatar Jun 17 '24 13:06 MiroG225

If you gonna play with webtorrent, here are some notes I found (appart of main issue described above).

When I setup webtorrent on local, the local stream stoped to be realtime. Only every 5-10 seconds was stream updated. The NET graphics showed me this: image

After I removed webtorrent setup on local, I'm back on realtime stream and NET shows this: image

MiroG225 avatar Jun 27 '24 08:06 MiroG225

Will you have time to look at this and fix it in next version, please?

MiroG225 avatar Sep 05 '24 13:09 MiroG225

This won't be fixed anytime soon. External webrtc library. Limited opportunities.

AlexxIT avatar Sep 05 '24 13:09 AlexxIT