go2rtc
go2rtc copied to clipboard
Purpose and how to use Produce-stream API
https://alexxit.github.io/go2rtc/api/#tag/Produce-stream
Please provide an example for the purpose/use case of this API.
Thanks
https://github.com/AlexxIT/go2rtc#incoming-sources
Section "Incoming sources" has zero go2rtc config examples :(
Example:
streams:
camera1:
From docs:
You can push data only to existing stream (create stream with empty source in config)
Yes. This is basically what I tried before commenting about the absence of the config. If one writes config:
streams:
camera1:
publish:
camera1:
- rtmp://127.0.0.1:1937/live
And then executes go2rtc, they get an error:
xaionaro@void:~/go/src/github.com/AlexxIT/go2rtc$ go run ./
10:57:22.776 INF go2rtc platform=linux/amd64 revision= version=1.9.4
10:57:22.776 INF config path=/home/xaionaro/go/src/github.com/AlexxIT/go2rtc/go2rtc.yaml
10:57:22.776 INF [rtsp] listen addr=:8554
10:57:22.776 INF [api] listen addr=:1984
10:57:22.776 INF [webrtc] listen addr=:8555/tcp
10:57:23.776 ERR internal/streams/publish.go:31 > error="streams: unknown error"
You can't publish empty stream
Yes. But I intent to start streaming to this endpoint (e.g. using OBS) soon after running go2rtc (and hoping to get this stream re-published). I thought this was the use case intended by the support of "empty" sources.