thirtythreeforty / neolink

An RTSP bridge to Reolink IP cameras
https://www.thirtythreeforty.net/posts/2020/05/hacking-reolink-cameras-for-fun-and-profit/
GNU Affero General Public License v3.0
901 stars 152 forks source link

Reolink Argus Pro 3 stream parsing error #218

Open sanglt opened 3 years ago

sanglt commented 3 years ago

Describe the bug I tried the latest version with Battery support on both Docker and Ubuntu server. Both return error for Argus Pro 3 camera.

To Reproduce

  1. Create this configuration file:
bind = "0.0.0.0"

[[cameras]]
name = "outdoor"
username = "admin"
password = "XXXXX"
uid = "9527XXXXXS74A"
stream = "mainStream"
  1. Launch Neolink with RUST_LOG=debug
  2. Check the log from Neolink processs

Expected behavior A stream should working and can be view from VLC...

Versions Neolink software: Neolink 0.4.0 f10f9f9706a7e9db7503f6a0fe7ff24ce493162a release Reolink camera model and firmware: Argus Pro 3 - Firmware v3.0.0.307_21051100

Logs:

[2021-11-01T01:13:34Z INFO  neolink::rtsp] outdoor: Camera reports firmware version v3.0.0.307_21051100
[2021-11-01T01:13:34Z INFO  neolink::rtsp] outdoor: Starting video stream Main Stream (Clear)
[2021-11-01T01:13:34Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEventList, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEvent, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(channelId, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(channelId)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(status, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(status)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AItype, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AItype)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(recording, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(recording)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(timeStamp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(timeStamp)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEvent)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEventList)
[2021-11-01T01:13:34Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message ID 33
[2021-11-01T01:13:34Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEventList, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEvent, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(channelId, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(channelId)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(status, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(status)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AItype, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AItype)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(recording, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(recording)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(timeStamp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(timeStamp)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEvent)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEventList)
[2021-11-01T01:13:34Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message ID 33
[2021-11-01T01:13:34Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEventList, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEvent, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(channelId, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(channelId)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(status, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(status)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AItype, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AItype)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(recording, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(recording)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(timeStamp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(timeStamp)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEvent)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEventList)
[2021-11-01T01:13:34Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message ID 33
[2021-11-01T01:13:34Z DEBUG neolink_core::bc::xml] Struct: start to parse "body"
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(body, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEventList, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AlarmEvent, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(channelId, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(channelId)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(status, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(status)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(AItype, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(none)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AItype)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(recording, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(recording)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched StartElement(timeStamp, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched Characters(0)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(timeStamp)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEvent)
[2021-11-01T01:13:34Z DEBUG yaserde::de] Fetched EndElement(AlarmEventList)
[2021-11-01T01:13:34Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message ID 33
[2021-11-01T01:13:35Z DEBUG neolink_core::bc::xml] Struct: start to parse "Extension"
[2021-11-01T01:13:35Z DEBUG yaserde::de] Fetched StartElement(Extension, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}, [version -> 1.1])
[2021-11-01T01:13:35Z DEBUG yaserde::de] Fetched StartElement(binaryData, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2021-11-01T01:13:35Z DEBUG yaserde::de] Fetched Characters(1)
[2021-11-01T01:13:35Z DEBUG yaserde::de] Fetched EndElement(binaryData)
[2021-11-01T01:13:37Z DEBUG neolink_core::bc_protocol] Dropping camera
[2021-11-01T01:13:37Z DEBUG neolink_core::bc_protocol::connection::bcconn] Shutting down BcConnection...
[2021-11-01T01:13:37Z DEBUG neolink_core::bc_protocol::connection::bcconn] Shutdown finished OK
[2021-11-01T01:13:37Z ERROR neolink::rtsp] Error streaming from camera outdoor, will retry in 1s: Error while streaming outdoor

    Caused by:
        0: Media Deserialization error
        1: Parsing error
[2021-11-01T01:13:37Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted
[2021-11-01T01:13:37Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted
[2021-11-01T01:13:38Z DEBUG neolink_core::bc_protocol] Trying uid 9527xxxxxxxxBS74A
[2021-11-01T01:13:38Z DEBUG neolink_core::bc_protocol::connection::udpconn::discover] Broadcasting to: [(255.255.255.255, 2015), (255.255.255.255, 2018), (192.168.10.255, 2015), (192.168.10.255, 2018)]
stiggz83 commented 2 years ago

I'm seeing the same issue with Argus 3. Wireshark dump attached, i may not have done it right, appreciate any time given to take look neolink.pcapng.gz

Hi all, I'm also having trouble with the Argus 3 Pro. I am getting the following in the command prompt window. [2021-12-14T01:25:36Z ERROR neolink::rtsp] Error streaming from camera ChickenCam4, will retry in 1s: Error while streaming ChickenCam4

Caused by:
    0: Media Deserialization error
    1: Parsing error

[2021-12-14T01:25:36Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted [2021-12-14T01:25:36Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted I have tried the different builds listed above (running windows), and the same issue appears to occur. If I wait long enough the camera seems to connect but seems to take a long time and then randomly disconnects. Any help would be greatly appreciated.

I have same as you with one cam of two, same with official client, because the wifi signal is poor and internet connection too. Try to select substream in your config file should help an little.

I don't have any issues with the official client (except their configuration that drops the stream after 10 minutes or whatever it is), full bars on the wifi and a solid clear stream. I tried substream in the config and couldn't get it to pass the validation for some reason

QuantumEntangledAndy commented 2 years ago

@stiggz83 can you confirm you are using a build from here https://github.com/QuantumEntangledAndy/neolink/actions/runs/1534694282

The current master branch does not support some of the newer media formats

stiggz83 commented 2 years ago

@stiggz83 can you confirm you are using a build from here https://github.com/QuantumEntangledAndy/neolink/actions/runs/1534694282

The current master branch does not support some of the newer media formats

Yeh i've triple checked this. not sure if this confirms it? [2022-01-12T05:57:03Z INFO neolink] Neolink ff76e4d2d737034319ea452fd532eba13d9edbec release

I tested another camera (a POE 820A) and i have the same course of events

surfzoid commented 2 years ago

@stiggz83 can you confirm you are using a build from here https://github.com/QuantumEntangledAndy/neolink/actions/runs/1534694282

The current master branch does not support some of the newer media formats

Hi, I'm loose, is @QuantumEntangledAndy git url give the last and good neolink app or it is @thirtythreeforty git URL we need to prefer?

Also, I don't understand how to download binary from yours repo

twistedddx commented 2 years ago

Regarding @stiggz83 packet capture.

Client logs in Camera gives DeviceInfo Client asks for video Camera gives new nonce? Client logs in Camera gives some unknown binary + 1002

Then there is a bunch of logins, logouts and random data back and fourth from camera.

My guess is there is numerous instances of Neolink or official client running? Or high latency and/or packet loss?

Filter used: baichuan.msg_class == 26132 || baichuan.msg_class == 25876 || baichuan.msg_class == 25620 || baichuan.msg_class == 0 neolink

QuantumEntangledAndy commented 2 years ago

@stiggz83 thanks for checking the last commit is indeed ff76e4d. I will have a look at your dump when I can.

@surfzoid I run a few branches for things like bug fixes and new features. If everything works I'd prefer you use thirtythreeforty. But if you need a bugged fixed I will write the fix on my branch and direct you to one of my builds.

On the link I provided if you scroll to the bottom there is a section called artifacts with the build

Screenshot 2022-01-12 at 13 56 26

The artifact section only appears if logged in to github and scrolling can be picky as the black graph at the top of that page tends to eat mouse scrolls.

stiggz83 commented 2 years ago

Regarding @stiggz83 packet capture.

Client logs in Camera gives DeviceInfo Client asks for video Camera gives new nonce? Client logs in Camera gives some unknown binary + 1002

Then there is a bunch of logins, logouts and random data back and fourth from camera.

My guess is there is numerous instances of Neolink or official client running? Or high latency and/or packet loss?

Filter used: baichuan.msg_class == 26132 || baichuan.msg_class == 25876 || baichuan.msg_class == 25620 || baichuan.msg_class == 0 neolink

Thanks for taking a look @twistedddx - definitely not running multiple instances to any degree of purpose. I have had the official client running on another PC but that doesn't make any difference to this error

stiggz83 commented 2 years ago

Doing some further testing, i set this up on a virtual ubuntu environment on my PC. Broadly it is doing the same thing but i noticed there is at times a 30s gap between starting the stream and the error and I briefly managed to see the stream on localhost within VLC before it cut. Haven't been able to get it again mind you

QuantumEntangledAndy commented 2 years ago

I've gone and feed your wireshark bytes through the deser program and it dosen't fail to deserialize. This suggests that it is not a media parsing error.

The error message you gave above is also not the execpted format of an error message for the ff76e4d build as that build should be more verbose.

I am wondering if the testing of various builds is getting logs and messages all tangled up.

Could you post a full log (including the bit with the commit id) from start until error, just to ensure that everything is as expected

stiggz83 commented 2 years ago

This is running on the fresh virtualised setup I just set up today using only ff76e4d

root@DESKTOP-S4AR21L:/usr/local/bin# neolink rtsp --config my_config.toml [2022-01-12T10:14:58Z INFO neolink] Neolink ff76e4d2d737034319ea452fd532eba13d9edbec release [2022-01-12T10:14:58Z INFO neolink::rtsp] backyard: Connecting to camera at UID: 95270002RKRE7W73 [2022-01-12T10:14:58Z INFO neolink::rtsp] backyard: Logging in [2022-01-12T10:14:59Z INFO neolink::rtsp] backyard: Connected and logged in [2022-01-12T10:14:59Z INFO neolink::rtsp] backyard: Camera time is already set: 2022-01-12 18:15:01 +8 [2022-01-12T10:15:00Z INFO neolink::rtsp] backyard: Camera reports firmware version v3.0.0.388_21062101 [2022-01-12T10:15:00Z INFO neolink::rtsp] backyard: Starting video stream Main Stream (Clear) [2022-01-12T10:15:34Z ERROR neolink::rtsp] Error streaming from camera backyard, will retry in 1s: Error while streaming backyard

Caused by:
    0: Media Deserialization error
    1: Parsing error

[2022-01-12T10:15:34Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted [2022-01-12T10:15:34Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted

surfzoid commented 2 years ago

This is running on the fresh virtualised setup I just set up today using only ff76e4d

root@DESKTOP-S4AR21L:/usr/local/bin# neolink rtsp --config my_config.toml [2022-01-12T10:14:58Z INFO neolink] Neolink ff76e4d release [2022-01-12T10:14:58Z INFO neolink::rtsp] backyard: Connecting to camera at UID: 95270002RKRE7W73 [2022-01-12T10:14:58Z INFO neolink::rtsp] backyard: Logging in [2022-01-12T10:14:59Z INFO neolink::rtsp] backyard: Connected and logged in [2022-01-12T10:14:59Z INFO neolink::rtsp] backyard: Camera time is already set: 2022-01-12 18:15:01 +8 [2022-01-12T10:15:00Z INFO neolink::rtsp] backyard: Camera reports firmware version v3.0.0.388_21062101 [2022-01-12T10:15:00Z INFO neolink::rtsp] backyard: Starting video stream Main Stream (Clear) [2022-01-12T10:15:34Z ERROR neolink::rtsp] Error streaming from camera backyard, will retry in 1s: Error while streaming backyard

Caused by:
    0: Media Deserialization error
    1: Parsing error

[2022-01-12T10:15:34Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted [2022-01-12T10:15:34Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted

I don't understand "rtsp" option .

swanitzek commented 2 years ago

Hello,

I just received my Argus Pro 3 and was a bit enthusiastic about using neolink. First I need to say it's awesome what you done so far.

However, I got the same error as above saying that there was a Media Deserialization error.

Is there any progress with this? Can I help you with something to get this problem sorted out?

--stefan

geekskunk commented 2 years ago

Wanted to share that via build suggested by @surfzoid (...runs/1534694282) above was able to get error free stream with the Argus 3 Pro on the subStream (only). If set to default (both) or mainStream were errors encounter where stream was unavailable. Was pretty awesome to see even the subStream I must say.

Cloverdex commented 2 years ago

Wanted to share that via build suggested by @surfzoid (...runs/1534694282) above was able to get error free stream with the Argus 3 Pro on the subStream (only). If set to default (both) or mainStream were errors encounter where stream was unavailable. Was pretty awesome to see even the subStream I must say.

Thanks for this! I now have substreams loading/freezing with a still image (whereas before I was getting nothing). Both/main do not work at all. I have a combination of Argus 2's and Argus 3 Pros. A still image is an improvement! I'm still getting Media Deserialization errors, but this is a step forward!

stiggz83 commented 2 years ago

Wanted to share that via build suggested by @surfzoid (...runs/1534694282) above was able to get error free stream with the Argus 3 Pro on the subStream (only). If set to default (both) or mainStream were errors encounter where stream was unavailable. Was pretty awesome to see even the subStream I must say.

Are you doing anything different with loading the stream? I can get the main stream to connect in VLC but it wigs out and errors per the above after 15 or so seconds. With the substream, i don't get errors in terminal, but i get instant "Your input can't be opened:" in VLC using rtsp://192.168.1.170:8554/backyard

stiggz83 commented 2 years ago

Are you doing anything different with loading the stream? I can get the main stream to connect in VLC but it wigs out and errors per the above after 15 or so seconds. With the substream, i don't get errors in terminal, but i get instant "Your input can't be opened:" in VLC using rtsp://192.168.1.170:8554/backyard

Got it, added /substream to the URL and we're up and running on the substream

swanitzek commented 2 years ago

Nice. I also got it running by checking out the specified commit via

git checkout ff76e4d2d737034319ea452fd532eba13d9edbec

and build neolink from source by

cargo build

Are there any plan to merge this commit into the master-branch?

Veuchez commented 2 years ago

Hi everyone! I have the same problem with my Argus 3 Pro, have you found a solution? I also tried with subStream but I always get the same error ...

` [2022-02-09T21:17:30Z ERROR neolink::rtsp] Error streaming from camera ingresso, will retry in 1s: Error while streaming ingresso

Caused by:
    0: Media Deserialization error
    1: Parsing error

[2022-02-09T21:17:30Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted [2022-02-09T21:17:30Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted

`

` neolink --version [2022-02-09T21:19:26Z INFO neolink] Neolink 57c55e4121c0fe7abf9916f00df8d4bb9dd468c8 release neolink 0.4.0

`

swanitzek commented 2 years ago

Your log states that you are using version 57c55e4. The fix which enables the substream for the Argus 3 Pro is only included in version ff76e4. I had to build it from source code by myself to get it running.

The problem is that the pull requests are not getting merged into the main repository currently.

Veuchez commented 2 years ago

Your log states that you are using version 57c55e4. The fix which enables the substream for the Argus 3 Pro is only included in version ff76e4. I had to build it from source code by myself to get it running.

The problem is that the pull requests are not getting merged into the main repository currently.

Would you be kind enough to tell me how to do it? Thank you!

swanitzek commented 2 years ago

Your log states that you are using version 57c55e4. The fix which enables the substream for the Argus 3 Pro is only included in version ff76e4. I had to build it from source code by myself to get it running. The problem is that the pull requests are not getting merged into the main repository currently.

Would you be kind enough to tell me how to do it? Thank you!

I already posted the information a few days ago in this post: https://github.com/thirtythreeforty/neolink/issues/218#issuecomment-1027020440

You need to be aware that you have a rust compiler / toolchain available. I don't remember the steps anymore how to get that running. It involved installing multiple packages via apt-get on my Raspberry Pi.

I attached my debug build for the Raspberry Pi (ARMv7) here. neolink_debug_ARM.zip

If you need a executable for another platform you have to build it by yourself.

In the config file you make sure to only activate the substream and disable the currently broken mainstream:

[[cameras]]
name = "driveway"
username = "admin"
password = "secret"

uid="ID of your cam"

stream = "subStream"

Then open the URL rtsp://x.x.x.x:8554/driveway/subStream in an application that can handle RTSP-stream, for example VLC Player. .

twistedddx commented 2 years ago

You can use the artifacts download at the bottom of this previously given link to get the ff76e4d builds. https://github.com/QuantumEntangledAndy/neolink/actions/runs/1534694282

Veuchez commented 2 years ago

Ok thanks I managed! The video stream is very slow, I see maybe a frame every two seconds, why? What is the difference between manistream and substream? Thank you!

twistedddx commented 2 years ago

For poor stream quality perhaps your connection is poor or there is still problems with neolink streaming from your camera.

What app are you using to open the stream with?

Mainstream is the full HD stream. Reolink normally calls this "clear" or "5MP" etc. Substream is a low SD stream. Reolink normally calls this "fluent". You can configure the quality of both streams from the Reolink app.

Veuchez commented 2 years ago

A ok, that's why I see in low quality! Actually the wifi coverage is excellent, with the Reolink app I can see very well, both in high and low quality .. I have to wait for the fix for the mainstream then! Thank you!

mplogas commented 2 years ago

Is there an update to this issue? I'm experiencing the same issue randomly on one of my cameras (Argus 2 & Argus PT) - most of the time neolink seems to be able to recover and still serve the other cameras but every now and then it dies and requires a restart.

The build mentioned by @QuantumEntangledAndy is not available anymore to test.

twistedddx commented 2 years ago

I think this build is a slightly newer version which should include the same fix:

https://github.com/QuantumEntangledAndy/neolink/actions/runs/1902542702

programmdesign commented 2 years ago

Hi. I got an Reolink August PT and get the same errors as described above. I'm running neolink on Raspberry Pi 4, 64bit.

Neolink cab43d0b0946e3669a49146ee2db96076099e15f release
[2022-09-04T11:57:36Z INFO  neolink::rtsp] terasse: Connecting to camera at UID: 952700043UCRZV6Q
[2022-09-04T11:57:36Z INFO  neolink::rtsp] terasse: Logging in
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Connected and logged in
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Camera time is already set: 2022-09-04 13:57:36 +1
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Camera reports firmware version v3.0.0.1045_22061301
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Starting video stream Main Stream (Clear)
[2022-09-04T11:58:16Z ERROR neolink::rtsp] Error streaming from camera terasse, will retry in 1s: Error while streaming terasse

    Caused by:
        0: Media Deserialization error
        1: Parsing error
[2022-09-04T11:58:16Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted
[2022-09-04T11:58:16Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted

I'd tried to get the build from the links above, but they are expired. Should these fixed already be included in the build I'm running or can can please re-post an link with a build that contains this fix?

My configuration is as follows:

bind = "0.0.0.0" bind_port = 8554 [[cameras]] name = "terasse" username = "admin" password = "xxxxxxxx" uid = "952700043UCRZV6Q" stream = "mainStream"

FYI - I've tried all possible options for the "stream" setting, but without success.

gunnm80 commented 1 year ago

Hi. I got an Reolink August PT and get the same errors as described above. I'm running neolink on Raspberry Pi 4, 64bit.

Neolink cab43d0b0946e3669a49146ee2db96076099e15f release
[2022-09-04T11:57:36Z INFO  neolink::rtsp] terasse: Connecting to camera at UID: 952700043UCRZV6Q
[2022-09-04T11:57:36Z INFO  neolink::rtsp] terasse: Logging in
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Connected and logged in
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Camera time is already set: 2022-09-04 13:57:36 +1
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Camera reports firmware version v3.0.0.1045_22061301
[2022-09-04T11:57:37Z INFO  neolink::rtsp] terasse: Starting video stream Main Stream (Clear)
[2022-09-04T11:58:16Z ERROR neolink::rtsp] Error streaming from camera terasse, will retry in 1s: Error while streaming terasse

    Caused by:
        0: Media Deserialization error
        1: Parsing error
[2022-09-04T11:58:16Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp write poll aborted
[2022-09-04T11:58:16Z ERROR neolink_core::bc_protocol::connection::udpconn] Udp read poll aborted

I'd tried to get the build from the links above, but they are expired. Should these fixed already be included in the build I'm running or can can please re-post an link with a build that contains this fix?

My configuration is as follows:

bind = "0.0.0.0" bind_port = 8554 [[cameras]] name = "terasse" username = "admin" password = "xxxxxxxx" uid = "952700043UCRZV6Q" stream = "mainStream"

FYI - I've tried all possible options for the "stream" setting, but without success.

Hello Were you able to solve the problem with the Argus 2 PT? Have the same problem. Thank you.

chebizarro commented 1 year ago

Hello Were you able to solve the problem with the Argus 2 PT? Have the same problem. Thank you.

I followed the instructions from @swanitzek in this comment https://github.com/thirtythreeforty/neolink/issues/218#issuecomment-1034227437 and it is working for my Argus PT using the substream on Ubuntu 22.10.

rockas69 commented 1 year ago

https://github.com/thirtythreeforty/neolink/issues/218#issuecomment-1034227437

Thanks, this resolved my issue with Reolink E1 Pro. Yet, when shall be expected having mainStream bug corrected? Would be nice stream in higher quality.

Great job!