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

Can't see the RTSP stream. (Swann DVR8-5000) #349

Open
LoneWalkerWolf opened this issue Apr 2, 2023 · 10 comments
Open

Can't see the RTSP stream. (Swann DVR8-5000) #349

LoneWalkerWolf opened this issue Apr 2, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@LoneWalkerWolf
Copy link

Describe the bug
Can't seem to view the RTSP stream from any device.
I have a Swann DVR8-5000 which seems to connect fine with Neolink, shows driveway: Starting video stream Main Stream (Clear) in the log.

To Reproduce
Steps to reproduce the behavior. Example:

  1. Create this configuration file:
bind = "192.168.1.XX"

[[cameras]]
name = "driveway"
username = "admin"
password = "XXXX"
address = "192.168.1.XX:9000"
channel_id = 0

[[cameras]]
name = "frontporch"
username = "admin"
password = "XXXX"
address = "192.168.1.XX:9000"
channel_id = 1
  1. Launch Neolink
  2. Open VLC or FFMPEG and play: rtsp://192.168.1.25:8554/frontporch
    (tried rtsp://192.168.1.25:8554/frontporch/mainStream too)

Expected behavior
Neolink works, and I can see my stream in FFMPEG or VLC.

Versions
NVR software: blank
Neolink software: latest
Reolink camera model and firmware: H2MB14 config version v2.0.0.0

@LoneWalkerWolf LoneWalkerWolf added the bug Something isn't working label Apr 2, 2023
@LoneWalkerWolf
Copy link
Author

To add information. FFMPEG shows the following output:

[rtsp @ 00000264cd28f4c0] method DESCRIBE failed: 404 Not Found/0
rtsp://192.168.1.XX:8554/frontporch: Server returned 404 Not Found

@QuantumEntangledAndy
Copy link
Collaborator

404 not found usually means that the path you are try to access /frontporch does not exist.

Could you please set the environmental variable GST_DEBUG=3 and try again we should get more information about gstreamer.

@LoneWalkerWolf
Copy link
Author

LoneWalkerWolf commented Apr 3, 2023

I left it running overnight, and it started working. Once I added another camera in MotionEye (the monitoring software I use), it stopped working again.

I'm actually using your fork @QuantumEntangledAndy, as it seems to be more stable.

I tried again with FFMPEG in the morning, and I got a new error. rtsp://192.168.1.XX:554/driveway: Invalid data found when processing input

[2023-04-03T18:58:06Z INFO  neolink] Neolink 4fcaf4d538dc6e05434690bdf7f3a3bc22b077e3 release
[2023-04-03T18:58:06Z INFO  neolink::rtsp] Starting RTSP Server at 192.168.1.XX:554
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Connecting to camera at Address: 192.168.1.XX:9000
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Connecting to camera at Address: 192.168.1.XX:9000
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Logging in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Logging in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Successfully logged in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Successfully logged in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Camera time is already set: 2023-04-03 18:59:46 +0
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Camera time is already set: 2023-04-03 18:59:46 +0
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Camera reports firmware version
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Starting stream
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] driveway: Starting video stream Main Stream (Clear)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] driveway: Starting video stream Sub Stream (Fluent)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Successfully started streaming
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Camera reports firmware version
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Starting stream
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] porch: Starting video stream Sub Stream (Fluent)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] porch: Starting video stream Main Stream (Clear)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] porch: Successfully started streaming
[2023-04-03T18:58:06Z WARN  neolink::rtsp] driveway: Retryable error: Camera has unexpectanely stopped the streaming state: On stream: Main

    Caused by:
        Dropped connection
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Connecting to camera at Address: 192.168.1.XX:9000
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Logging in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Successfully logged in
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Camera time is already set: 2023-04-03 18:59:46 +0
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Camera reports firmware version
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Starting stream
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] driveway: Starting video stream Main Stream (Clear)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states::streaming] driveway: Starting video stream Sub Stream (Fluent)
[2023-04-03T18:58:06Z INFO  neolink::rtsp::states] driveway: Successfully started streaming

^ That is the output of Neolink this evening.

I can get it to work every now and again simply by spamming the command again and again.

This is the view in MotionEye, the red square means there are changes in the RTSP stream, but those grey boxes mean that the RTSP data is invalid.

image

In Home Assistant, the MotionEye integration shows that one of the cameras is working. But the other stays invalid.

image

After a little while, the MotionEye interface correctly shows the second camera. (the one showing in HA).

image

Again, the first one stays blank.

@LoneWalkerWolf
Copy link
Author

I should add that both of them are configured the same in MotionEye, with FPS set at 10, and resolution at 1080P and the URLs are the same with only the name being different.

Both are also configured as a GstreamerTCP stream. (that is autoconfigured by MotionEye)

@LoneWalkerWolf
Copy link
Author

LoneWalkerWolf commented Apr 3, 2023

I've just Ctrl-C'd and restarted Neolink, and now the other camera is working, but not the one that was working before.

image

Log output of Neolink remains the same as before, including the driveway error message.

@LoneWalkerWolf
Copy link
Author

Another thing I should mention, I can successfully take an image using ./neolink image porch --file-path porch.jpg --config=config.toml for both cameras. Just seems like RTSP isn't working.

@LoneWalkerWolf
Copy link
Author

LoneWalkerWolf commented Apr 3, 2023

Okay, finally, I think it's working. I rebooted the entire system, including DVR, and both cameras showed up. I did have to reboot Neolink a bunch of times until the error below disappeared.

[2023-04-03T18:58:06Z WARN  neolink::rtsp] driveway: Retryable error: Camera has unexpectanely stopped the streaming state: On stream: Main

    Caused by:
        Dropped connection

image

It didn't last long; only 2 minutes later, and the second stream disappeared again.

@LoneWalkerWolf
Copy link
Author

@QuantumEntangledAndy Any update on this?

@QuantumEntangledAndy
Copy link
Collaborator

Since it seems to work but intermittently this is hard to diagnose.

It may be the network for example. Particularly since you seem to be getting the dropped connection error. I see that you are streaming both clear and fluent? Have you tried just fluent? Does that help? You do that with the stream = "subStream" keyword in the [[camera]] section.

I'm currently working on a rework of the rtsp part of the code. Maybe it will help or at least provide a more useful error message. But it will take a little while for me to find the time to finish this.

@LoneWalkerWolf
Copy link
Author

I just implemented the stream = "subStream" keyword. It got rid of the disconnect error, but still no video.

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

2 participants