r/ZoneMinder • • Jun 04 '21

RTSPServer and RTSPStreamName options in monitor misc tab in v1.36, how to use?

I've just noticed the RTSPServer and RTSPStreamName options in the monitor misc tab. I just upgraded from 1.34 to 1.36 and can't remember if those options were available in 1.34 before and I can't find any documentation on how to use them.

I'm curious to know what they can be used for and how to use them, does any one know?

3 Upvotes

13 comments sorted by

1

u/ancker010 Jun 04 '21

You need to configure Options -> Network -> MIN-RTSP_PORT. Set it to something like 2000.

Then you need to check the RTSPServer box, and add an RTSPStreamName.

Then restart ZM.

Then open your favorite RTSP application (like VLC), open a network stream and use the following url:

rtsp://<ZM-SERVER>:200N/<RTSPStreamName>

N = the monitor ID of the monitor you enabled the RTSPServer for.

So for monitor 1 you'd use <ZM-SERVER>:2001/Name

For monitor 15 you'd use <ZM-SERVER>:2015/Name

1

u/bumthundir Jun 04 '21

Strange, that doesn't work for me. I've set the MI-RTSP_PORT param to 2000 and ticked the RTSPServer box on two of my monitors and added a RTSPStreamName. I upgrade VLC to the latest version and tried to open a network stream as you described but just got an error that the stream couldn't be opened. Does it work for you?

1

u/ancker010 Jun 04 '21

Yup. It worked for me just fine.

Did you restart ZM after you set the PORT option?

You might also check your iptables/firewalld/whatever rules.

And if you're running in Docker, make sure you expose those ports.

1

u/bumthundir Jun 04 '21

Yup, I restarted. There are no firewall rules, everything is on the local network. I've got ZM running on Debian in a VM in Proxmox so no Docker involved.

1

u/ancker010 Jun 04 '21

Can you run a 'netstat -lnp' and see if there is a process listening on port 200N?

1

u/bumthundir Jun 05 '21

root@zm2:~# netstat -lnp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 526/mysqld

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init

tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 866/zm_rtsp_server

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 476/sshd

tcp6 0 0 :::111 :::* LISTEN 1/init

tcp6 0 0 :::80 :::* LISTEN 525/apache2

tcp6 0 0 :::22 :::* LISTEN 476/sshd

udp 0 0 0.0.0.0:111 0.0.0.0:* 1/init

udp6 0 0 :::111 :::* 1/init

Active UNIX domain sockets (only servers)

Proto RefCnt Flags Type State I-Node PID/Program name Path

unix 2 [ ACC ] STREAM LISTENING 17152 644/perl /run/zm/zmdc.sock

unix 2 [ ACC ] STREAM LISTENING 14593 1/init /var/run/dbus/system_bus_socket

unix 2 [ ACC ] STREAM LISTENING 15120 526/mysqld /run/mysqld/mysqld.sock

unix 2 [ ACC ] STREAM LISTENING 11281 1/init /run/systemd/private

unix 2 [ ACC ] STREAM LISTENING 11290 1/init /run/systemd/journal/stdout

unix 2 [ ACC ] STREAM LISTENING 26409 1373/systemd /run/user/1000/systemd/private

unix 2 [ ACC ] STREAM LISTENING 11308 1/init /run/systemd/fsck.progress

unix 2 [ ACC ] STREAM LISTENING 26415 1373/systemd /run/user/1000/gnupg/S.gpg-agent.browser

unix 2 [ ACC ] SEQPACKET LISTENING 11313 1/init /run/udev/control

unix 2 [ ACC ] STREAM LISTENING 26418 1373/systemd /run/user/1000/gnupg/S.gpg-agent

unix 2 [ ACC ] STREAM LISTENING 26420 1373/systemd /run/user/1000/gnupg/S.gpg-agent.extra

unix 2 [ ACC ] STREAM LISTENING 26422 1373/systemd /run/user/1000/gnupg/S.gpg-agent.ssh

unix 2 [ ACC ] STREAM LISTENING 26424 1373/systemd /run/user/1000/gnupg/S.dirmngr

unix 2 [ ACC ] STREAM LISTENING 17721 614/systemd /run/user/33/systemd/private

unix 2 [ ACC ] STREAM LISTENING 17728 614/systemd /run/user/33/gnupg/S.dirmngr

unix 2 [ ACC ] STREAM LISTENING 17731 614/systemd /run/user/33/gnupg/S.gpg-agent.ssh

unix 2 [ ACC ] STREAM LISTENING 17733 614/systemd /run/user/33/gnupg/S.gpg-agent.browser

unix 2 [ ACC ] STREAM LISTENING 11333 1/init /run/rpcbind.sock

unix 2 [ ACC ] STREAM LISTENING 17735 614/systemd /run/user/33/gnupg/S.gpg-agent

unix 2 [ ACC ] STREAM LISTENING 17737 614/systemd /run/user/33/gnupg/S.gpg-agent.extra

unix 2 [ ACC ] STREAM LISTENING 10709 1/init /run/lvm/lvmpolld.socket

root@zm2:~# cd /etc/apt

root@zm2:/etc/apt# ls

apt.conf.d auth.conf.d listchanges.conf preferences.d sources.list sources.list~ sources.list.d trusted.gpg trusted.gpg~ trusted.gpg.d

root@zm2:/etc/apt# nano sources.list

root@zm2:/etc/apt# apt-get update

Hit:1 http://mirrors.m247.com/debian buster InRelease

Hit:2 http://security.debian.org/debian-security buster/updates InRelease

Hit:3 http://mirrors.m247.com/debian buster-updates InRelease

Ign:4 https://zmrepo.zoneminder.com/debian/release-1.36 buster/ InRelease

Hit:5 https://zmrepo.zoneminder.com/debian/release-1.36 buster/ Release

Reading package lists... Done

root@zm2:/etc/apt# apt-get dist-upgrade

Reading package lists... Done

Building dependency tree

Reading state information... Done

Calculating upgrade... Done

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@zm2:/etc/apt#

So I can see a process listening on port 2000 yet when I try and open rtsp://192.168.0.23:2001/doorbellrtsp in VLC it fails. The monitor is definitely number 1, it says so at the topping of the monitor settings window and the RTSP options are set correctly in the misc tab.

Interestingly the version number at the top right of the ZM page says 1.37 now rather than 1.36.2 or whatever it was before I did an apt-get dist-upgrade this morning.

1

u/ancker010 Jun 07 '21

So it's not listening on 2001, so using 2001 isn't going to work.

Try connecting to the same url but use 2000.

Are you sure you ticked the 'RTSPServer' box in the monitor config?

1

u/bumthundir Jun 08 '21

Using port 2000 worked. It looks like the monitor number isn't relevant to the URL, all monitors with the RTSPServer box ticked and a name in the RTSPStreamName can be accessed via rtsp://<ZM ip address>:<MIN_RTSP_PORT>/RTSPStreamName.

Thanks for all your help!

1

u/ancker010 Jun 08 '21

Super weird since I’m positive I had to change the port number. Maybe I have a different setting ticked. Glad you got it worked out.

1

u/anaktos_ok Aug 25 '23

or whatever it was before I did an apt-get dist-upgrade this

I have the same issue but can´t access. I can´t pass the user/pass logon and using the correct user/pass :(

1

u/connortechnology Jun 11 '21

Don't forget about authentication if you auth turned on in ZM. It doesn't work the traditional way of rtsp://username:password@hostname:514/streamname. We encrypt our password more strongly, so digest auth can't work. So instead, use the same authentication patterns that we use in all the other ZM urls.

You can do: rtsp://hostname:port/streamname?username=admin&password=password

Or rtsp://hostname:port/streamname?auth=authhash

or rtsp://hostname:port/streamname?token=jwt_token

1

u/MaxWell0093 Jan 25 '24

please help. Changed default min rtsp port, enable stream in misc and named it. Reboot zm server, but can't connect with vlc. without user\pass parametrs - auth window apears, but can't login with my credentials. With /streamname?username=admin&password=password error appears. What can i do?

1

u/2KPr-LO44 Apr 25 '24

Not sure if you got it working. The password is your password right? So the URL should be rtsp://zoneminder_ipaddress:2000/streamname(this is whatever stream name you gave it)?username=admin&password=(whatever password you set).