2023-01-19 15:01:22 +07:00
2023-02-22 09:55:28 +07:00
2022-12-22 09:16:15 +07:00
2022-12-28 14:13:33 +07:00
2023-01-19 14:35:31 +07:00
2020-04-29 09:29:28 -05:00
2023-01-09 15:02:57 +07:00
2023-02-22 09:55:28 +07:00
2023-01-19 15:34:06 +07:00
2023-01-09 15:02:57 +07:00
2020-04-28 16:17:18 -05:00
2023-01-09 15:55:26 +07:00
2023-02-22 09:55:28 +07:00

Neolink

CI

Neolink is a small program that acts as a proxy between Reolink IP cameras and normal RTSP clients. Certain cameras, such as the Reolink B800, do not implement ONVIF or RTSP, but instead use a proprietary "Baichuan" protocol only compatible with their apps and NVRs (any camera that uses "port 9000" will likely be using this protocol). Neolink allows you to use NVR software such as Shinobi or Blue Iris to receive video from these cameras instead. The Reolink NVR is not required, and the cameras are unmodified. Your NVR software connects to Neolink, which forwards the video stream from the camera.

The Neolink project is not affiliated with Reolink in any way; everything it does has been reverse engineered.

This Fork

This fork is an extension of thirtythreeforty's with additional features not yet in upstream master.

Major Features:

  • MQTT
  • Motion Detection
  • Paused Streams (when no rtsp client or no motion detected)

Minor Features:

  • Improved error messages when your missing gstreamer plugins
  • Protocol more closely follows offical reolink format
    • Possibly can handle more simulatenous connections

Installation

Download from the release page

Extract the zip

Install the latest gstreamer (1.20.5 as of writing this).

  • Windows: ensure you install full when prompted in the MSI options.
  • Mac: Install the dpkg version on the offical gstreamer website over the brew version
  • Ubuntu/Debian: These packages should work
sudo apt install \
  libgstrtspserver-1.0-0 \
  libgstreamer1.0-0 \
  libgstreamer-plugins-bad1.0-0 \
  gstreamer1.0-plugins-good \
  gstreamer1.0-plugins-bad

Make a config file see below.

Config/Usage

RTSP

To use neolink you need a config file.

There's a more complete example here, but the following should work as a minimal example.

bind = "0.0.0.0"

[[cameras]]
name = "Camera01"
username = "admin"
password = "password"
uid = "ABCDEF0123456789"

[[cameras]]
name = "Camera02"
username = "admin"
password = "password"
uid = "BCDEF0123456789A"

Create a text file with called neolink.toml in the same folder as the neolink binary. With your config options.

When ready start neolink with the following command using the terminal in the same folder the neolink binary is in.

./neolink rtsp --config=neolink.toml

MQTT

To use mqtt you will to adjust your config file as such:

bind = "0.0.0.0"

[[cameras]]
name = "Camera01"
username = "admin"
password = "password"
uid = "ABCDEF0123456789"
  [cameras.mqtt]
  server = "127.0.0.1" # Address of the mqtt server
  port = 1883 # mqtt servers port
  credentials = ["username", "password"] # mqtt server login details

Then to start the mqtt connection run the following:

./neolink mqtt --config=neolink.toml

Neolink will publish these messages:

Messages are prefixed with neolink/{CAMERANAME}

Control messages:

  • /control/led [on|off] Turns status LED on/off
  • /control/ir [on|off|auto] Turn IR lights on/off or automatically via light detection
  • /control/reboot Reboot the camera
  • /control/ptz [up|down|left|right|in|out] (amount) Control the PTZ movements, amount defaults to 32.0

Status Messages: /status offline Sent when the neolink goes offline this is a LastWill message /status disconnected Sent when the camera goes offline /status/battery Sent in reply to a /query/battery

Query Messages: /query/battery Request that the camera reports its battery level (Not Yet Implemented)

Pause

To use the pause feature you will need to adjust your config file as such:

bind = "0.0.0.0"

[[cameras]]
name = "Camera01"
username = "admin"
password = "password"
uid = "ABCDEF0123456789"
  [cameras.pause]
  on_motion = true # Should pause when no motion
  on_client = true # Should pause when no rtsp client
  mode = "none"  # What to do when paused values are: none, black, still, test
  timeout = 2.1 # How long to wait after motion stops before pausing

Then start the rtsp server as usual:

./neolink rtsp --config=neolink.toml

Docker

Docker builds are also provided in multiple architectures. The latest tag tracks master while each branch gets it's own tag.

docker pull quantumentangledandy/neolink

License

Neolink is free software, released under the GNU Affero General Public License v3.

This means that if you incorporate it into a piece of software available over the network, you must offer that software's source code to your users.

S
Description
An RTSP bridge to Reolink IP cameras
Readme AGPL-3.0
4.8 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 96.3%
Lua 3.4%
Dockerfile 0.3%