-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple parents and fix hanging producer #1431
base: master
Are you sure you want to change the base?
Conversation
I think i have experienced this problem. let me try grab a copy of your version and see if it works for me. hopefully Alex incorporates this in the next release if it fixes it. |
|
Thanks! sad. fwiw my config is doorbell_audio2way:
and what works fine on 1.9.4 - except, then, sometimes, eventually, theres a very long long long long list of children, and a stream that wont work properly anymore. where how-long-eventually is maybe 10 or so activations of HA feed before it turns useless. ha card:
camera: reolink doorbell poe with second-latest fw as i dont want to update |
Yeah there are two issues
Edit: Alex knows about the 1st issue and said he is working on it |
okay thanks for the update. I guess i can just make the ffmpeg a copy of the whole thing again to see if it works |
what about this one? doorbell_audio2way:
- ffmpeg:rtsp://admin:password@10.98.1.215/Preview_01_sub#video=copy#audio=copy#audio=opus Edit: Two way will not work with this |
Yep. Now i have
and it does work with 2 way :) PC (no mic) and phone 2way, 2 way worked and i closed both and all was well. phone (with mic) and tablet (with mic) it went crazy. and when i closed everything, this was left behind
But i could reconnect and it was ok again. This exact case above, is the one I had hoped your changes would fix. Because, this causes my 2way audio stream to die eventually in 1.9.4 |
I did a stress test with this config on my reolink doorbell: ` doorbell_audio2way:
and this ha card
In my stress test i basically pressed the muted/speaking button to switch streams quickly until go2rtsp shows upto 20 consumers on each. and then watched how far down they went, followed by closing the ha browser window go2rtc 1.9.2 made it back down to 0 not sure if my issue is the same as this issue or a separate one :/ |
Currently, go2rtc does not allow a node to have multiple parents, which in the case of e.g. 2 WebRTC streams (with microphone) leads to a hanging producer when the consumers close their connection. The Producer remains active until go2rtc is restarted.
Two-way audio also doesn't work with multiple consumers if they all want to push data to producer via backchannel.
Reproduction
Open 2 different tabs with same WebRTC stream (video + audio + microphone). And close the streams after a while. You will see the hanging producer
This PR allows to have multiple parents, like childs, which will cleaned up correctly after consumer dies
Edit:
There are still some issues like:
If two or more consumers are connected to the stream with two-way audio, the audio may be a bit choppy. Idk if its a camera issue or something in go2rtc, but it seems the camera can not handle this very well (tested a few)
Streams with multiple sources have still some bugs