QuantumEntangledAndy / neolink

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

Error in stream attempting to restore #107

Closed Veuchez closed 9 months ago

Veuchez commented 1 year ago

My Log is full of these errors, what does it mean?

[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 32200
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 6846
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 39850
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T06:30:27Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 32040
[2023-06-19T06:30:33Z INFO  neolink::rtsp::states::loggedin] c5: Camera reports firmware version v3.0.0.1462_22102900
[2023-06-19T06:30:33Z INFO  neolink::rtsp::states::streaming] c5: Starting video stream Main Stream (Clear)
[2023-06-19T06:30:33Z DEBUG neolink::rtsp] Clearing not ready clients
[2023-06-19T06:30:33Z INFO  neolink::rtsp] c5: Buffers prepared
[2023-06-19T06:30:37Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 33 (number: 0)
[2023-06-19T06:30:42Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 33 (number: 0)
[2023-06-19T06:30:58Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 33 (number: 0)
[2023-06-19T06:31:11Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 33 (number: 0)
[2023-06-19T06:31:22Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 33 (number: 0)
[2023-06-19T06:31:26Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T06:31:26Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 6902
[2023-06-19T06:31:26Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T13:01:47Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T13:01:47Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 39850
[2023-06-19T13:01:47Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T13:01:47Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 39850
[2023-06-19T13:02:06Z INFO  neolink::rtsp] ingresso: Join Pause
[2023-06-19T13:02:06Z WARN  neolink::rtsp] ingresso: Retryable error: Camera join error: Io(Custom { kind: Other, error: CameraTerminate })
[2023-06-19T13:02:15Z INFO  neolink_core::bc_protocol] ingresso: Trying TCP discovery
[2023-06-19T13:02:15Z INFO  neolink_core::bc_protocol] ingresso: Trying local discovery
[2023-06-19T13:02:15Z DEBUG neolink_core::bc_protocol::connection::discovery] Broadcasting to: [(255.255.255.255, 2015), (255.255.255.255, 2018), (192.168.0.255, 2015), (192.168.0.255, 2018)]
[2023-06-19T13:02:15Z INFO  neolink_core::bc_protocol] ingresso: Local discovery success 95270002NFXXXXX4 at 192.168.2.101:34559
[2023-06-19T13:02:15Z DEBUG neolink_core::bc_protocol::login] Populating abilities
[2023-06-19T13:02:16Z DEBUG neolink_core::bc_protocol::abilityinfo] Abilities: <?xml version="1.0" encoding="utf-8"?><AbilityInfo><userName>admin</userName><system><subModule><abilityValue>general_rw, norm_rw, version_ro, uid_ro, autoReboot_rw, restore_rw, reboot_rw, shutdown_rw, dst_rw, log_ro, performance_ro, upgrade_rw, export_rw, import_rw, bootPwd_rw</abilityValue></subModule></system><network><subModule><abilityValue>port_rw, dns_rw, email_rw, ipFilter_rw, localLink_rw, pppoe_rw, upnp_rw, wifi_rw, ntp_rw, netStatus_rw, ptop_rw, autontp_rw</abilityValue></subModule></network><alarm><subModule><abilityValue>rfAlarm_rw</abilityValue></subModule><subModule><channelId>0</channelId><abilityValue>motion_rw</abilityValue></subModule></alarm><image><subModule><channelId>0</channelId><abilityValue>ispBasic_rw, ispAdvance_rw, ledState_rw</abilityValue></subModule></image><video><subModule><channelId>0</channelId><abilityValue>osdName_rw, osdTime_rw, shelter_rw</abilityValue></subModule></video><security><subModule><abilityValue>user_rw, userOnline_rw, bootPwd_rw</abilityValue></subModule></security><replay><subModule><channelId>0</channelId><abilityValue>replay_rw, seek_rw</abilityValue></subModule></replay><PTZ><subModule><abilityValue>control_rw, preset_rw, cruise_rw, track_rw, decoder_rw, ptzInfo_ro</abilityValue></subModule></PTZ><streaming><subModule><channelId>0</channelId><abilityValue>preview_rw, compress_rw, snap_rw, rtsp_rw, streamTable_ro</abilityValue></subModule></streaming></AbilityInfo>
[2023-06-19T13:02:16Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 78 (number: 0)
[2023-06-19T13:02:16Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 79 (number: 0)
[2023-06-19T13:02:16Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 291 (number: 0)
[2023-06-19T13:02:16Z INFO  neolink::rtsp::states::loggedin] ingresso: Camera time is already set: 2023-06-19 15:02:13.0 -01:00:00
[2023-06-19T13:02:17Z INFO  neolink::rtsp::states::loggedin] ingresso: Camera reports firmware version v3.0.0.1462_22102900
[2023-06-19T13:02:17Z INFO  neolink::rtsp::states::streaming] ingresso: Starting video stream Main Stream (Clear)
[2023-06-19T13:02:17Z DEBUG neolink::rtsp] Clearing not ready clients
[2023-06-19T13:02:17Z INFO  neolink::rtsp] ingresso: Buffers prepared
[2023-06-19T13:02:47Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T13:02:47Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 34568
[2023-06-19T13:02:47Z DEBUG neolink_core::bcmedia::codex] Error in stream attempting to restore
[2023-06-19T13:02:47Z DEBUG neolink_core::bcmedia::codex] Amount skipped to restore stream: 24504

Every now and then the flow stops completely.
This is my Neolink configuration.

bind = "0.0.0.0"

[[cameras]]
name = "c5"
username = "admin"
password = "****"
uid = "95270002TXXXXXO"
address = "192.168.2.105"
discovery = "local"
stream = "mainStream"

[[cameras]]
name = "ingresso"
username = "admin"
password = "****"
uid = "95270002XXXXX4"
address = "192.168.2.101"
discovery = "local"
stream = "mainStream"

Did I configure something wrong?
I don't want any sensor, no mqtt, I don't want it to pause, I just want the smooth video and audio stream without complications. Here is the complete LOG. log.txt

Versions NVR software: Frigate Neolink software: 0.5.13 Reolink camera model and firmware: Argus 3 PRO firmware version v3.0.0.1462_22102900

QuantumEntangledAndy commented 1 year ago

Argus3 again. Might I ask what your bitrate is set to for this camera

Veuchez commented 1 year ago

1536, if I set it to 1024 the result doesn't change...

QuantumEntangledAndy commented 1 year ago

I see. Well we discussed this error in detail in #68. It happens when the camera sends data late and it's buffer fills. (Not the neolink buffer). I believe the official client dynamically reduces the quality to maintain the stream (it also only does one camera at a time) whereas neolink dosent do that.

I notice you have two cameras in the config. Please try just one with the lowest bitrate.

But until I can work out how the official client does it. There is not much else to do.

Veuchez commented 1 year ago

Sorry for the delay. Here is the log of 1 camera at 1536kbps. log 1 telecamera 1536.txt There are also some GStreamer-CRITICAL error

QuantumEntangledAndy commented 10 months ago

Can you replicate with latest? I've had a lot of work go into improving the UDP streams