Skip to content
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

Cannot connect to RTSP via VLC nor Synology Surveillance Station #335

Open
KansaiGaijin opened this issue Jan 18, 2023 · 40 comments
Open

Cannot connect to RTSP via VLC nor Synology Surveillance Station #335

KansaiGaijin opened this issue Jan 18, 2023 · 40 comments
Labels
bug Something isn't working

Comments

@KansaiGaijin
Copy link

KansaiGaijin commented Jan 18, 2023

I have the same/similar issue to #287
Neolink running in Docker on Linux server internal IP of 192.168.0.xxx. I can access all other software on this IP with the relevant ports, no issue.
Neolink terminal states

[2023-01-18T09:35:00Z INFO  neolink] Neolink 0.4.0 (unknown commit) release
[2023-01-18T09:35:07Z WARN  neolink::rtsp] Without a server certificate, usernames and passwords will be exchanged in plaintext!
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Starting video stream Sub Stream (Fluent)
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Camera time is already set: 2023-01-18 21:35:08 +12
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Camera reports firmware version v3.0.0.400_21062500
[2023-01-18T09:35:07Z INFO  neolink::rtsp] Kitchen: Starting video stream Main Stream (Clear)

So clearly my username/password is correct.

Synology won't authenticate the camera when adding to Surveillance station.

Using VLC to open rtsp://192.168.0.xxx:8554/Camera_Name results in the following;

main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
main: playlist is empty
live555 error: Failed to connect with rtsp://192.168.0.xxx:8554/Camera_Name
main error: connection failed: Connection refused by peer
satip error: Failed to connect to RTSP server 192.168.0.xxx:8554
main error: connection failed: Connection refused by peer
access_realrtsp error: cannot connect to 192.168.0.xxx:8554
-- logger module stopped --

To Reproduce
Steps to reproduce the behavior. Example:

  1. Create this configuration file:
bind = "192.168.0.xxx"
[[users]]
name = "Neolink"
pass = "Neolink"

[[cameras]]
name = "Camera_Name"
username = "user"
password = "pass"
address = "my_IP:9000"
permitted_users = ["Neolink"]
  1. Launch Neolink in Docker:
    CMD /usr/local/bin/neolink rtsp --config /etc/neolink.toml

3.1. Navigate to add IP camera in Synology Surveilance Station and enter a user defined camera with rtsp address of:
rtsp://192.168.0.xxx:8554/Camera_Name

3.2 Open VLC on Windows computer and open a network stream using the same address as in 3.1.

Versions
NVR software: Synology Surveillance Station
Neolink software: Neolink 0.4.0 (Docker image)
Reolink camera model and firmware: Reolink E1 - firmware version v3.0.0.400_21062500

@KansaiGaijin KansaiGaijin added the bug Something isn't working label Jan 18, 2023
@QuantumEntangledAndy
Copy link
Collaborator

Have you tried with out the basic auth. So remove the users and the permitted user bit?

@QuantumEntangledAndy
Copy link
Collaborator

If you want to keep using basic auth please make sure your url is of the form:

rtsp://Username:PASSWORD@IP/CameraName

@KansaiGaijin
Copy link
Author

I have attempted to connect via VLC using rtsp://Neolink:[email protected]:8554/Camera_Name and the logs still show

main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
main: playlist is empty
live555 error: Failed to connect with rtsp://192.168.0.xxx:8554/Camera_Name
main error: connection failed: Connection refused by peer
satip error: Failed to connect to RTSP server 192.168.0.xxx:8554
main error: connection failed: Connection refused by peer
access_realrtsp error: cannot connect to 192.168.0.xxx:8554
live555 error: Failed to connect with rtsp://192.168.0.xxx:8554/Camera_Name
main error: connection failed: Connection refused by peer
satip error: Failed to connect to RTSP server 192.168.0.xxx:8554
main error: connection failed: Connection refused by peer
access_realrtsp error: cannot connect to 192.168.0.xxx:8554
-- logger module stopped --

Synology sat at Activating, which while is different to Authenticate still ends in Disconnected after a few seconds.

@QuantumEntangledAndy
Copy link
Collaborator

I see then we will need more debug information. Could you please and the environment variable GST_DEBUG=3 to neolink's docker and try to connect. It should produce a much larger log which id like you to post here.

@KansaiGaijin
Copy link
Author

0:00:04.588824438     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:04.588856633     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:04.588892081     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:04.588923845     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:04.588966584     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:04.589006552     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:04.589048264     8 0x7ff24f707140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
0:00:05.266881729     8 0x7ff24f707140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:05.267115869     8 0x7ff24f707140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:05.365672118     8 0x7ff24f707140 WARN                 nvcodec gstcudaloader.c:139:gst_cuda_load_library: Could not open library libcuda.so.1, Error loading shared library libcuda.so.1: No such file or directory
0:00:05.365724208     8 0x7ff24f707140 WARN                 nvcodec plugin.c:73:plugin_init: Failed to load cuda library
[2023-01-19T02:05:51Z WARN  neolink::rtsp] Without a server certificate, usernames and passwords will be exchanged in plaintext!
0:00:05.854970223     7 0x7fe1b64b41e0 ERROR             rtspserver rtsp-server.c:1004:gst_rtsp_server_create_socket:<GstRTSPServer@0x7fe1b64ffda0> failed to create socket
0:00:05.855004794     7 0x7fe1b64b41e0 ERROR             rtspserver rtsp-server.c:1375:gst_rtsp_server_create_source:<GstRTSPServer@0x7fe1b64ffda0> failed to create socket
0:00:05.855036386     7 0x7fe1b64b41e0 ERROR             rtspserver rtsp-server.c:1421:gst_rtsp_server_attach:<GstRTSPServer@0x7fe1b64ffda0> failed to create watch: Error binding to address 192.168.0.1:8554: Address not available

Something to do with the rtsp server? I installed Gstreamer (outside of docker which I think is the correct/only way to do it) But after going back and looking through, I didn't do anything specific for a server. Is that not included in the following instruction?

Windows/Linux
Install Gstreamer from the most recent MSI installer on Windows, or your package manager on Linux.

On Ubuntu/Debian machines gstreamer can be installed with:

  libgstrtspserver-1.0-0 \
  libgstreamer1.0-0 \
  libgstreamer-plugins-bad1.0-0 \
  gstreamer1.0-plugins-good \
  gstreamer1.0-plugins-bad

@QuantumEntangledAndy
Copy link
Collaborator

This error: Error binding to address 192.168.0.1:8554: Address not available means you have two instances of neolink running. I recommend you check that you only have one (sometimes the docker keeps running in the background). Alternativly use a different port

@KansaiGaijin
Copy link
Author

I doubt 2 instances are running as I only have one in portainer and earlier today I restarted the server for unrelated reasons. That would have terminated everything.

I did adjust the port so in docker it's still :8554 and externally it's '8555'. I can see the port is open when I check in terminal ss -na | grep :8555 however when I check https://www.yougetsignal.com/tools/open-ports/ it's not opened? Not sure if that's an issue. I have added it my router's port forwarding too.

Lastly, I updated the bind address in the .toml file to 151 to match the IP of the server and I can see in the logs it's still looking for :8554.

Have I changed the wrong setting accidentally?

@KansaiGaijin
Copy link
Author

Played with a few more settings with no further success.

Currently bound to host IP and docker is on host network. Back to port 8554.

Did ffprobe and got the following

[rtsp @ 0x564307ad7980] RTP: missed 6 packets
[h264 @ 0x564307adb440] error while decoding MB 82 19, bytestream -5
[h264 @ 0x564307adb440] concealing 8895 DC, 8895 AC, 8895 MV errors in P frame
Input #0, rtsp, from 'rtsp://192.168.0.151:8554/Kitchen':
  Metadata:
    title           : Session streamed with GStreamer
    comment         : rtsp-server
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 2304x1296, 90k tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s

The Checked the GST Debug and it says

0:00:01.744057020     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped
0:00:01.744092597     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped
0:00:01.744112425     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:01.744134956     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:01.744154726     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:01.744181786     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:01.744208705     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:01.744243737     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:01.744274813     8 0x7ffbf8b73140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
0:00:02.123630172     8 0x7ffbf8b73140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:02.123871698     8 0x7ffbf8b73140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:02.176700326     8 0x7ffbf8b73140 WARN                 nvcodec gstcudaloader.c:139:gst_cuda_load_library: Could not open library libcuda.so.1, Error loading shared library libcuda.so.1: No such file or directory
0:00:02.176751444     8 0x7ffbf8b73140 WARN                 nvcodec plugin.c:73:plugin_init: Failed to load cuda library
[2023-01-19T03:24:27Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.173:9000
[2023-01-19T03:24:27Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-19T03:24:27Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.173:9000
[2023-01-19T03:24:27Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Starting video stream Sub Stream (Fluent)
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Camera time is already set: 2023-01-19 16:24:28 +12
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Camera reports firmware version v3.0.0.400_21062500
[2023-01-19T03:24:28Z INFO  neolink::rtsp] Kitchen: Starting video stream Main Stream (Clear)
0:03:13.989866659     7 0x7f954d09af20 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<audsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:03:13.990257086     7 0x7f954d09b2e0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<vidsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:03:14.056371476     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14678 will be dropped
0:03:14.206344099     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14810 will be dropped
0:03:14.206770240     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14593 will be dropped
0:03:14.207057151     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14607 will be dropped
0:03:14.323655851     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14215 will be dropped
0:03:14.323904749     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14280 will be dropped
0:03:14.519670608     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14601 will be dropped
0:03:14.520137604     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 15009 will be dropped
0:03:14.520339383     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14794 will be dropped
0:03:14.701178532     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14332 will be dropped
0:03:14.701402077     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14843 will be dropped
0:03:14.845846020     7 0x7f954d09b280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 14728 will be dropped
0:03:14.878963289     7 0x7f954d75b220 FIXME              rtspmedia rtsp-media.c:4584:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:03:14.953778435     7 0x7f954d75b220 FIXME              rtspmedia rtsp-media.c:4584:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:03:14.953824922     7 0x7f954d75b220 WARN               rtspmedia rtsp-media.c:4623:gst_rtsp_media_suspend: media 0x7f954d349f70 was not prepared
0:03:15.010012669     7 0x7f954d75b220 FIXME              rtspmedia rtsp-media.c:2884:gst_rtsp_media_seek_trickmode:<GstRTSPMedia@0x7f954d349f70> Handle going back to 0 for none live not seekable streams.
0:03:16.929051547     7 0x7f954d75b220 WARN               rtspmedia rtsp-media.c:4935:gst_rtsp_media_set_state: media 0x7f954d349f70 was not prepared
0:03:17.076516871     7 0x7f954d75d7d0 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<audsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!
0:03:17.076704871     7 0x7f954d75d7d0 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<vidsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!```

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jan 19, 2023

Can I ask about your docker configuration. You say is on host. Was it on host before? If not then bind = "192.168.0.xxx" needs to match the internal docker ip (which means it is usually best to just leave it on 0.0.0.0 inside a bridged docker). Anyway leave it on host if you want to use UDP.

Your ffprobe seems to be successful so at least we have a connection at this point and neolink is working. The question is why is VLC (which I presume is on another machine) not getting any connection? This seems to be a network/firewall/port forward issue. Unless you can show me a neolink log with VLC connection being picked up.

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jan 19, 2023

I doubt 2 instances are running as I only have one in portainer and earlier today I restarted the server for unrelated reasons. That would have terminated everything.

I'm just reporting what the error message means. It may be that the port wasn't closed by the docker instance.

I did adjust the port so in docker it's still :8554 and externally it's '8555'. I can see the port is open when I check in terminal ss -na | grep :8555 however when I check https://www.yougetsignal.com/tools/open-ports/ it's not opened? Not sure if that's an issue. I have added it my router's port forwarding too.

Only need router port forwarding if your trying to access from outside your home network. In this case you might find it easier to set up a home assistant to handle the streams. You'll also need to change the port that is being exposed in docker and the one in the toml.

Lastly, I updated the bind address in the .toml file to 151 to match the IP of the server and I can see in the logs it's still looking for :8554.

Usually best to set the bind in the toml to be 0.0.0.0 because the internal docker Ip can be an unexpected value.
Like this in the toml

bind = "0.0.0.0"
bind_port = 8554

Have I changed the wrong setting accidentally?

Not sure maybe you could post the whole thing again with your latest test

@KansaiGaijin
Copy link
Author

KansaiGaijin commented Jan 19, 2023

VLC is being used on a different device, that is correct. Same network though.

Okay so port forwarding is irrelevant as my intention is to put the camera through my NAS which I'll have external access to.

If I bind to 0.0.0.0, does that mean it doesn't bind? Or it binds to anything?

Currently my toml reads as

bind = "192.168.0.xxx"

[[cameras]]
name = "Camera_name"
username = "user"
password = "pass"
address = "192.168.0.xxx:9000"

My compose yml looks like

- - -
version: "2"
services:
    neolink:
        image: thirtythreeforty/neolink
        container_name: neolink
        ports:
          -  8554:8554
        volumes:
          -  /etc/neolink.toml:/etc/neolink.toml
        restart: unless-stopped
        network_mode: "host"

Recreating the container gives

[2023-01-19T05:02:43Z INFO  neolink] Neolink 0.4.0 (unknown commit) release
0:00:05.143540809     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped
0:00:05.143584044     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped
0:00:05.143603528     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:05.143623889     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:05.143639875     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:05.143663964     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:05.143698715     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:05.143735521     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:05.143769743     8 0x7fe8baa81930 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
0:00:05.568815913     8 0x7fe8baa81930 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:05.569065324     8 0x7fe8baa81930 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:05.677617101     8 0x7fe8baa81930 WARN                 nvcodec gstcudaloader.c:139:gst_cuda_load_library: Could not open library libcuda.so.1, Error loading shared library libcuda.so.1: No such file or directory
0:00:05.677668158     8 0x7fe8baa81930 WARN                 nvcodec plugin.c:73:plugin_init: Failed to load cuda library
[2023-01-19T05:02:50Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-19T05:02:50Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-19T05:02:50Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-19T05:02:50Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Starting video stream Sub Stream (Fluent)
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Camera time is already set: 2023-01-19 18:02:51 +12
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Camera reports firmware version v3.0.0.400_21062500
[2023-01-19T05:02:51Z INFO  neolink::rtsp] Kitchen: Starting video stream Main Stream (Clear)

And attempting to connect to rtsp://192.168.0.xxx:8554/Camera_name in VLC, I then get this in the neolink docker terminal

[2023-01-19T05:05:04Z ERROR neolink_core::bc_protocol::connection::bcconn] caused by: Parsing error
[2023-01-19T05:05:04Z ERROR neolink::rtsp] Error streaming from camera Kitchen, will retry in 1s: Error while streaming Kitchen
    
    Caused by:
        0: Media Deserialization error
        1: Parsing error
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Logging in
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Connected and logged in
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Camera time is already set: 2023-01-19 18:05:06 +12
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Camera reports firmware version v3.0.0.400_21062500
[2023-01-19T05:05:06Z INFO  neolink::rtsp] Kitchen: Starting video stream Main Stream (Clear)

I really appreciate you taking the time out to assist with this issue.

@KansaiGaijin
Copy link
Author

Attempting to view the rtsp stream on VLC on the host machine outputs this.
Note kitchen vs Kitchen..

0:13:17.914047412     7 0x7f1beb015220 ERROR             rtspclient rtsp-client.c:1046:find_media: client 0x7f1beb0178a0: no factory for path /kitchen
0:13:17.914226553     7 0x7f1beb015220 ERROR             rtspclient rtsp-client.c:3093:handle_setup_request: client 0x7f1beb0178a0: media '/kitchen' not found

@QuantumEntangledAndy
Copy link
Collaborator

0.0.0.0 binds to every interface. It is helpful for inside the docker container because of how ips inside docker are usually assigned by DHCP and can change. Are you specifying upper or lower case in the vlc? It should match case for case

@QuantumEntangledAndy
Copy link
Collaborator

Have you tried changing your name in the toml to lower case?

@KansaiGaijin
Copy link
Author

I adjusted the bind and removed the capital letter (but I have been careful to be case sensitive)

and we have some new information!

[2023-01-19T05:26:28Z INFO  neolink] Neolink 0.4.0 (unknown commit) release
0:00:00.275895856     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped
0:00:00.275920352     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped
0:00:00.275932714     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:00.275947365     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:00.275959492     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:00.275972014     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:00.275987276     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:00.276009423     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:00.276028557     8 0x7efec2b61140 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
0:00:00.289844362     8 0x7efec2b61140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:00.289962710     8 0x7efec2b61140 WARN               souputils gstsoupelement.c:61:soup_element_init: Failed to load libsoup library
0:00:00.292675747     8 0x7efec2b61140 WARN                 nvcodec gstcudaloader.c:139:gst_cuda_load_library: Could not open library libcuda.so.1, Error loading shared library libcuda.so.1: No such file or directory
0:00:00.292698519     8 0x7efec2b61140 WARN                 nvcodec plugin.c:73:plugin_init: Failed to load cuda library
[2023-01-19T05:26:28Z INFO  neolink::rtsp] kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-19T05:26:28Z INFO  neolink::rtsp] kitchen: Logging in
[2023-01-19T05:26:28Z INFO  neolink::rtsp] kitchen: Connecting to camera at Address: 192.168.0.xxx:9000
[2023-01-19T05:26:28Z INFO  neolink::rtsp] kitchen: Logging in
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Connected and logged in
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Connected and logged in
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Starting video stream Sub Stream (Fluent)
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Camera time is already set: 2023-01-19 18:26:29 +12
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Camera reports firmware version v3.0.0.400_21062500
[2023-01-19T05:26:29Z INFO  neolink::rtsp] kitchen: Starting video stream Main Stream (Clear)
0:00:29.309866935     7 0x7f446c6a0f20 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<audsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:29.310211270     7 0x7f446c6a12e0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<vidsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:29.392237916     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 7489 will be dropped
0:00:29.392363866     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 7939 will be dropped
0:00:29.510648971     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8156 will be dropped
0:00:29.510960211     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8745 will be dropped
0:00:29.655839225     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8607 will be dropped
0:00:29.655966856     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8768 will be dropped
0:00:29.863684076     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 9056 will be dropped
0:00:29.863769664     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 9024 will be dropped
0:00:29.863829778     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8919 will be dropped
0:00:30.023617268     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8912 will be dropped
0:00:30.023779568     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8737 will be dropped
0:00:30.189870521     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8698 will be dropped
0:00:30.190018003     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8652 will be dropped
0:00:30.190130405     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 9018 will be dropped
0:00:30.340592880     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8889 will be dropped
0:00:30.340749760     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8854 will be dropped
0:00:30.575995706     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8741 will be dropped
0:00:30.576160875     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8580 will be dropped
0:00:30.576276818     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8757 will be dropped
0:00:30.638012861     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8542 will be dropped
0:00:30.638158268     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 9012 will be dropped
0:00:30.919743292     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8569 will be dropped
0:00:30.919836657     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8439 will be dropped
0:00:30.919915843     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 7986 will be dropped
0:00:31.030572933     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8122 will be dropped
0:00:31.030651556     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8374 will be dropped
0:00:31.198358920     7 0x7f446c6a1280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8348 will be dropped
0:00:31.202654604     7 0x7f446cd7b220 FIXME              rtspmedia rtsp-media.c:4584:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:00:31.202678496     7 0x7f446cd7b220 ERROR             rtspclient rtsp-client.c:3105:handle_setup_request: client 0x7f446d595a90: no control in path '/kitchen'
0:00:31.466103651     7 0x7f446cd7dcd0 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<vidsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!
0:00:31.466231175     7 0x7f446cd7dcd0 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<audsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!```

@QuantumEntangledAndy
Copy link
Collaborator

That seems to be a working connection form the logs. Anything being displayed?

@KansaiGaijin
Copy link
Author

No, VLC still pops up with the error thing saying unable to open MRL check the logs (which for some reason are no longer being created???)

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jan 19, 2023

Oh wait I missed that last line. When reading on mobile it still says missing /kitchen. Can you try the path /kitchen/subStream

@KansaiGaijin
Copy link
Author

KansaiGaijin commented Jan 19, 2023

I was case sensitive and entered subStream despite the log being all lower.

0:02:24.333304727     7 0x7f5fa8069ec0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<audsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:02:24.333857285     7 0x7f5fa806a2e0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<vidsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:02:24.526680503     7 0x7f5fa806a280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8611 will be dropped
0:02:24.614503694     7 0x7f5fa806a280 WARN               h264parse gsth264parse.c:1497:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 8553 will be dropped
0:02:24.664082612     7 0x7f5fa8758220 FIXME              rtspmedia rtsp-media.c:4584:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:02:24.664134519     7 0x7f5fa8758220 ERROR             rtspclient rtsp-client.c:3113:handle_setup_request: client 0x7f5fa8f72a90: stream 'substream' not found
0:02:24.823936849     7 0x7f5fa875ae10 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<vidsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!
0:02:24.824038882     7 0x7f5fa875ae10 WARN                  appsrc gstappsrc.c:2534:gst_app_src_push_internal:<audsrc> do-timestamp=TRUE but buffers are provided before reaching the PLAYING state and having a clock. Timestamps will not be accurate!

@QuantumEntangledAndy
Copy link
Collaborator

Seems like something is stripping the case along the way. Can you confirm that ffplay/ffprobe works from the same machine as vlc

@KansaiGaijin
Copy link
Author

KansaiGaijin commented Jan 19, 2023

SSH via PuTTy > ffprobe

Input #0, rtsp, from 'rtsp://192.168.0.xxx:8554/kitchen/subStream':
  Metadata:
    title           : Session streamed with GStreamer
    comment         : rtsp-server
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 704x480, 90k tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s

@QuantumEntangledAndy
Copy link
Collaborator

Wait why ssh? I mean on the local machine that vlc is on? If you ssh into another box/virtual box it invalidates the test I wanted to achieve

@KansaiGaijin
Copy link
Author

KansaiGaijin commented Jan 19, 2023

Since I made this comment

Attempting to view the rtsp stream on VLC on the host machine outputs this.
Note kitchen vs Kitchen..

I've been using VLC on the host machine. So I SSH'd into it to run the probe so i can copy paste easier into this thread.

@KansaiGaijin
Copy link
Author

KansaiGaijin commented Jan 19, 2023

Apologies if I misunderstood.

Jumping onto the host machine directly shows a few errors before the same output as above.

The errors are
DTS discontinuity in stream 0: packet 8 with DTS 137321, packet 9 with DTS 155360
Then it repeats for packets 10 and 11, 12 and 13, etc up to 19

@KansaiGaijin
Copy link
Author

Oh but ffplay works!
I have visual via what looks like a terminal window

@QuantumEntangledAndy
Copy link
Collaborator

Ok just time stamp issues thats fine, they are usually just coming from dropped packets.

@QuantumEntangledAndy
Copy link
Collaborator

QuantumEntangledAndy commented Jan 19, 2023

Yeah this seems to be something not being happy between gstreamer and VLC both of which external parts to neolink

@KansaiGaijin
Copy link
Author

What would you like me attempt to troubleshoot for this? I've gotten this far from understanding as much as I can about the instructions and googling the issues but I feel more than this will require a bit more patience if I don't get it. I'm obviously not very bright with linux.

Alternatively, I don't care about not seeing it in VLC - if I can get it working in Surveillance Station that's what I'm after.
Using the MRL doesn't allow it to connect.

@KansaiGaijin
Copy link
Author

Also interestingly, I can't get ffplay to work via ssh.
i965: Failed to submit batchbuffer: Too many open files 0B f=0/0

@QuantumEntangledAndy
Copy link
Collaborator

ffplay over ssh probably won't work without x11 forwarding to send the window it makes back to the client.

@QuantumEntangledAndy
Copy link
Collaborator

Over ssh just make sure ffprobe works

@KansaiGaijin
Copy link
Author

Okay that makes sense.
Yeah ssh and host both have same results for ffprobe as posted above.

@QuantumEntangledAndy
Copy link
Collaborator

Can you try this build docker pull quantumentangledandy/neolink:latest

@QuantumEntangledAndy
Copy link
Collaborator

It allows for all lower case path connections

@KansaiGaijin
Copy link
Author

[2023-01-19T09:00:07Z INFO  neolink] Neolink ec88f5c3123b5a56df3cb128e717dc1e78296a44 release
[2023-01-19T09:00:14Z WARN  neolink::rtsp::gst] Missing the gstreamer plugin `x264 (gst-plugins-ugly)` for `x264enc` element. Required to paused certain cameras
[2023-01-19T09:00:14Z WARN  neolink::rtsp::gst] Missing the gstreamer plugin `libav (gst-libav)` for `avdec_h264` element. Required to paused certain cameras
[2023-01-19T09:00:14Z WARN  neolink::rtsp::gst] Missing the gstreamer plugin `libav (gst-libav)` for `avdec_h265` element. Required to paused certain cameras
[2023-01-19T09:00:14Z INFO  neolink::rtsp] Starting RTSP Server at 0.0.0.0:8554
[2023-01-19T09:00:14Z INFO  neolink::rtsp::states] kitchen: Connecting to camera at Address: 192.168.0.173:9000
[2023-01-19T09:00:14Z INFO  neolink::rtsp::states] kitchen: Logging in
[2023-01-19T09:00:14Z ERROR neolink_core::bc_protocol::connection::bcconn] Deserialization error: Deserialization error
[2023-01-19T09:00:14Z ERROR neolink_core::bc_protocol::connection::bcconn] caused by: Parsing error
[2023-01-19T09:00:14Z ERROR neolink::rtsp] kitchen: Fatal error: kitchen: Could not login to camera
    
    Caused by:
        Dropped connection

@marcosandremartins
Copy link

marcosandremartins commented Jan 19, 2023

I'm having the same issue with an Argus 2E
I'm thinking reolink might have updated the firmware and changed something, I had my camera on autoupdate (such a newbie move 👶) so I am not sure

@QuantumEntangledAndy
Copy link
Collaborator

I'm trying to get an Argus2E at the moment to test this actually. Just having trouble finding it in my country. Might have to shop from abroad

@KansaiGaijin
Copy link
Author

Can I downgrade the firmware on my E1 to a version that has been tested?

@QuantumEntangledAndy
Copy link
Collaborator

I think you can actually, I don't believe they have any checks on versions or anything for the firmware what is uploaded. What is your current E1 firmware? I've got an E1 camera so I could update mine to match and test it

@KansaiGaijin
Copy link
Author

Reolink camera model and firmware: Reolink E1 - firmware version v3.0.0.400_21062500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants