Open lrobot opened 1 week ago
sorry that, This may not a bug, I found that: below config will cause issue
streams:
browser_stream:
- ""
and below config work well with: version: go2rtc version 1.8.4 linux/amd64 this may be the really "empty stream", the error config is a stream with "empty source url". because of documentation not show how to config "empty stream". I create a issued config!!
streams:
browser_stream:
Incoming source also may have empty url. So it will be skipped. I needs to test this case.
version: go2rtc version 1.8.4 linux/amd64
reproduce issue: I create go2rtc.yaml
and start ./go2rtc
producer stream("dst") : http://localhost:1984/webrtc.html?dst=browser_stream&media=camera+microphone consumer stream("src"): http://localhost:1984/webrtc.html?src=browser_stream&media=video+audio
I can notice: http://localhost:1984/api/streams?src=browser_stream, produce work well. but consumer can not hook to producer, error log is: "streams: unknown error"
I think may be this is because of below loop request check:
https://github.com/AlexxIT/go2rtc/blob/dbe9e4aadeeae306b2e90a4668f077d405448eff/internal/streams/add_consumer.go#L26 I notice that the producer url is "" empty string. and the consumer source maybe also "" empty string. so that may is the cause of this issue.