go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Synology Container Manager (Docker) Setup

Open skyynet opened this issue 1 year ago • 5 comments

I want to use my UniFi Protect camera's stream in a browser and installer go2rtc on my Synology as Docker. As configuration, I only added the variable "camera1" with content to the stream rtsps://192.168.1.1:7441/xxxxxxxxxxxx?enableSrtp where xxx is the token. I also forwarded ports 1984, 8554. 8555, 7441.

When I access http://synologyip:1984/api/stream.m3u8?src=camera1 I get "stream not found". Opening the stream's URL on VLC works fine.

Probably just a simple configuration problem, but I couldn't figure it outwith the wiki.

skyynet avatar Nov 27 '24 16:11 skyynet

It is better to show the config exactly as you wrote it. You can remove the secret stuff.

AlexxIT avatar Nov 29 '24 11:11 AlexxIT

To be honest, I just entered the RTSP location of the stream. Since the certificate of the RTSPS stream seemed problematic for some clients, I also used the RTSP stream. Still "get stream not found".

go2rtc

skyynet avatar Nov 30 '24 21:11 skyynet

What makes you think such a config should even work? go2rtc does not read environment variables with random names.

AlexxIT avatar Dec 01 '24 06:12 AlexxIT

In the readme.md the env vars are described at https://github.com/AlexxIT/go2rtc/blob/master/internal/app/README.md Here I see:

streams:
  camera1: rtsp://rtsp:${CAMERA_PASSWORD}@192.168.1.123/av_stream/ch0

rtsp:
  username: ${RTSP_USER:admin}   # "admin" if "RTSP_USER" not set
  password: ${RTSP_PASS:secret}  # "secret" if "RTSP_PASS" not set

AFAIK, there is no possibility to define nested vars in Container Manager (Docker) at my Synology NAS. Thus I didn't knew how to define streams camara1 and only defined camera1. For RTSP I have no usr nor pwd since the stream is only in my LAN.

So how do I define the source for the stream correctly? Thanks for advice.

skyynet avatar Dec 01 '24 12:12 skyynet

This is an example of a config. It doesn't exist. You need to write it yourself.

AlexxIT avatar Dec 01 '24 13:12 AlexxIT

The example is for a config file. By now. I never had a Docker image, that didn't read the env variables passed. So the answer is, go2rtc doesn't read env vars and depends on a config file? Thanks for clarifying that.

skyynet avatar Dec 01 '24 16:12 skyynet

Go2rtc can read env variables, as described in the docs you have linked.

Can you show your config file?

AlexxIT avatar Dec 01 '24 16:12 AlexxIT

I don't have a config file. Usually, I pass all the variables in the GUI of Container Manager. So my question is: what is needed and what's the correct variables? I assumed, gotrtc would just need the URL of the RTSP stream and thought "camera1" would be the variable name. I have several MQTT bridges running which could be configured that way. If I need to create a config file, I'll figure it out. Since I'm not a Linux user, I try to avoid to ssh into my NAS and create directories and edit config files.

skyynet avatar Dec 01 '24 17:12 skyynet

Go2rtc has WebUI where you can change config file. Some random env variable means nothing without config.

AlexxIT avatar Dec 01 '24 17:12 AlexxIT

Ups, I didn't find the WebUI. Now, that I discovered, that I can access it at :1984 the configuration was easy. Sorry for bothering. Perhaps something at the Fast install section like Install docker and open ip:1984 could prevent this stupid question in the future.

skyynet avatar Dec 01 '24 18:12 skyynet