QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
297 stars 44 forks source link

Waiting for Buffers #89

Closed LoneWalkerWolf closed 1 year ago

LoneWalkerWolf commented 1 year ago

Describe the bug Just updated to latest version (0.5.12). Log is now getting flooded with errors. neolink::rtsp] passageway: Retryable error: passageway: Error while waiting for buffers Caused by: Dropped connection

This is the same across all 5 cameras I have.

To Reproduce Steps to reproduce the behaviour. Example:

  1. Create this configuration file:
bind = "IP_ADDRESS"
bind_port = 554

[[cameras]]
name = "driveway"
username = "admin"
password = "SECURE_PASSWORD_HERE"
address = "IP_ADDRESS:9000"
channel_id = 0
stream = "mainStream"

[[cameras]]
name = "porch"
username = "admin"
password = "SECURE_PASSWORD_HERE"
address = "IP_ADDRESS:9000"
channel_id = 1
stream = "mainStream"

[[cameras]]
name = "side"
username = "admin"
password = "SECURE_PASSWORD_HERE"
address = "IP_ADDRESS:9000"
channel_id = 2
stream = "mainStream"

[[cameras]]
name = "passageway"
username = "admin"
password = "SECURE_PASSWORD_HERE"
address = "IP_ADDRESS:9000"
channel_id = 4
stream = "mainStream"

[[cameras]]
name = "backgarden"
username = "admin"
password = "SECURE_PASSWORD_HERE"
address = "IP_ADDRESS:9000"
channel_id = 6
stream = "mainStream"
  1. Launch Neolink:

Expected behavior Cameras work as before, with no issues.

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

LoneWalkerWolf commented 1 year ago

I changed mainStream to subStream and now between 2/4 camera work. It's very 50/50 wether they work or not and some will timeout after a while. The rest stay on the Stream not ready output.

Log Output

[2023-05-21T14:54:01Z INFO  neolink] Neolink 384a0271bdbcf3227d4160859c052e8c1cb9d1f8 release
[2023-05-21T14:54:01Z INFO  neolink::rtsp] Starting RTSP Server at IP_ADDRESS:554
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] backgarden: Trying TCP discovery
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] porch: Trying TCP discovery
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] side: Trying TCP discovery
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] passageway: Trying TCP discovery
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] driveway: Trying TCP discovery
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] driveway: TCP Discovery success at IP_ADDRESS:9000
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] passageway: TCP Discovery success at IP_ADDRESS:9000
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] porch: TCP Discovery success at IP_ADDRESS:9000
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] side: TCP Discovery success at IP_ADDRESS:9000
[2023-05-21T14:54:01Z INFO  neolink_core::bc_protocol] backgarden: TCP Discovery success at IP_ADDRESS:9000
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] driveway: Camera time is already set: 2023-05-21 15:54:54.0 +00:00:00
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] porch: Camera time is already set: 2023-05-21 15:54:54.0 +00:00:00
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] passageway: Camera time is already set: 2023-05-21 15:54:54.0 +00:00:00
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] driveway: Camera reports firmware version
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::streaming] driveway: Starting video stream Sub Stream (Fluent)
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] porch: Camera reports firmware version
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::streaming] porch: Starting video stream Sub Stream (Fluent)
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] passageway: Camera reports firmware version
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::streaming] passageway: Starting video stream Main Stream (Clear)
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] side: Camera time is already set: 2023-05-21 15:54:54.0 +00:00:00
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] backgarden: Camera time is already set: 2023-05-21 15:54:54.0 +00:00:00
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] backgarden: Camera reports firmware version
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::streaming] backgarden: Starting video stream Main Stream (Clear)
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::loggedin] side: Camera reports firmware version
[2023-05-21T14:54:01Z INFO  neolink::rtsp::states::streaming] side: Starting video stream Sub Stream (Fluent)
[2023-05-21T14:54:07Z INFO  neolink::rtsp] passageway: Buffers prepared
[2023-05-21T14:54:08Z INFO  neolink::rtsp] backgarden: Buffers prepared
[2023-05-21T14:54:24Z INFO  neolink::rtsp::gst::server] Removing Session Media
[2023-05-21T14:54:24Z INFO  neolink::rtsp] side: Buffers prepared
[2023-05-21T14:54:26Z INFO  neolink::rtsp::gst::server] Removing Session Media
[2023-05-21T14:54:26Z INFO  neolink::rtsp] porch: Buffers prepared
[2023-05-21T14:54:26Z INFO  neolink::rtsp::gst::server] Removing Session Media
[2023-05-21T14:54:26Z INFO  neolink::rtsp] driveway: Buffers prepared

View in MotionEye image

QuantumEntangledAndy commented 1 year ago

Interesting. What was the last one working for you properly. It will help me isolate the change that might have introduced it.

When I get the time I'm going to see if I can make a no buffer option too that will work a bit more like it did before. But will have to give up on accurate time delivery of the frames and just push them through as they arrive

LoneWalkerWolf commented 1 year ago

I believe it was 0.5.8. However, I only had four cameras then. Added one more today and decided to update at the same time.

LoneWalkerWolf commented 1 year ago

Was reading your comment on issue #88. Reduced all stream bitrates to 2048kbps. Everything seems to be working now.

QuantumEntangledAndy commented 1 year ago

Ok then closing then. Let me know if there is anything else