1 line
28 KiB
JSON
Executable File
1 line
28 KiB
JSON
Executable File
{"title":"","byline":"thirtythreeforty","dir":null,"lang":null,"content":"<div id=\"readability-page-1\" class=\"page\"><div data-hpc=\"true\"><article><p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Development has moved</h2><a href=\"#development-has-moved\" aria-label=\"Permalink: Development has moved\" id=\"user-content-development-has-moved\"></a></p>\n<p dir=\"auto\">Neolink is now maintained at <a href=\"https://github.com/QuantumEntangledAndy/neolink\">https://github.com/QuantumEntangledAndy/neolink</a> as I no longer have time to dedicate to development.\nPlease direct your thanks and bug reports over there!</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Neolink</h2><a href=\"#neolink\" aria-label=\"Permalink: Neolink\" id=\"user-content-neolink\"></a></p>\n<p dir=\"auto\"><a href=\"https://github.com/thirtythreeforty/neolink/workflows/CI/badge.svg\" rel=\"noopener noreferrer\"><img alt=\"CI\" src=\"https://github.com/thirtythreeforty/neolink/workflows/CI/badge.svg\"></a></p>\n<p dir=\"auto\">Neolink is a small program that acts as a proxy between Reolink IP cameras and\nnormal RTSP clients.\nCertain cameras, such as the Reolink B800, do not implement ONVIF or RTSP, but\ninstead use a proprietary \"Baichuan\" protocol only compatible with their apps\nand NVRs (any camera that uses \"port 9000\" will likely be using this protocol).\nNeolink allows you to use NVR software such as Shinobi or Blue Iris to receive\nvideo from these cameras instead.\nThe Reolink NVR is not required, and the cameras are unmodified.\nYour NVR software connects to Neolink, which forwards the video stream from the\ncamera.</p>\n<p dir=\"auto\">The Neolink project is not affiliated with Reolink in any way; everything it\ndoes has been reverse engineered.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Supported cameras</h2><a href=\"#supported-cameras\" aria-label=\"Permalink: Supported cameras\" id=\"user-content-supported-cameras\"></a></p>\n<p dir=\"auto\">Neolink intends to support all Reolink cameras that do not provide native RTSP.\nCurrently it has been tested on the following cameras:</p>\n<ul dir=\"auto\">\n<li>B800/D800</li>\n<li>B400/D400</li>\n<li>E1</li>\n<li>Lumus</li>\n<li>510A</li>\n</ul>\n<p dir=\"auto\">Neolink does not support other cameras such as the RLC-420, since they already\n<a rel=\"nofollow\" href=\"https://support.reolink.com/hc/en-us/articles/360007010473-How-to-Live-View-Reolink-Cameras-via-VLC-Media-Player\">provide native RTSP</a>.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Usage</h2><a href=\"#usage\" aria-label=\"Permalink: Usage\" id=\"user-content-usage\"></a></p>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\">First, write a configuration yaml file describing your cameras. See the\nConfiguration section below or the provided sample config.</p>\n</li>\n<li>\n<p dir=\"auto\">Launch Neolink:</p>\n</li>\n</ol>\n<div dir=\"auto\"><pre>neolink rtsp --config=your_config.yaml</pre></div>\n<ol dir=\"auto\" start=\"3\">\n<li>Then, connect your RTSP viewer to <code>rtsp://127.0.0.1:8554/your_camera_name</code>!</li>\n</ol>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Additional commands</h3><a href=\"#additional-commands\" aria-label=\"Permalink: Additional commands\" id=\"user-content-additional-commands\"></a></p>\n<p dir=\"auto\">Neolink also has some additional command line tools\nfor controlling the camera. They are all used through neolink subcommands like this:</p>\n<div dir=\"auto\"><pre>neolink subcommand --config=...</pre></div>\n<p dir=\"auto\">The currently supported subcommands are</p>\n<ul dir=\"auto\">\n<li><strong>rtsp</strong>: The standard neolink rtsp bridge</li>\n<li><strong>status-light</strong>: Control the LED status light</li>\n<li><strong>reboot</strong>: Reboot a camera</li>\n<li><strong>talk</strong>: Enable talk back through either the microphone or by\nreading a sound file.</li>\n</ul>\n<p dir=\"auto\">For a full list of commands use <code>neolink help</code>, or use\n<code>neolink help <subcommand></code> for details on a subcommand of interest.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Download & Installation</h2><a href=\"#download--installation\" aria-label=\"Permalink: Download & Installation\" id=\"user-content-download--installation\"></a></p>\n<p dir=\"auto\">Builds are provided for the following platforms:</p>\n<ul dir=\"auto\">\n<li>Windows x86_64 (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-windows-2022.zip\">download</a>)</li>\n<li>macOS x86_64 (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-macos-12.zip\">download</a>)</li>\n<li>Ubuntu/Debian x86_64 (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-ubuntu-20.04.zip\">download</a>)</li>\n<li>Ubuntu/Debian x86 (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-i386-buster.zip\">download</a>)</li>\n<li>Debian aarch64 (Raspberry Pi 64-bit) (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-arm64-buster.zip\">download</a>)</li>\n<li>Debian armhf (Raspberry Pi 32-bit) (<a rel=\"nofollow\" href=\"https://nightly.link/thirtythreeforty/neolink/workflows/build/master/release-armhf-buster.zip\">download</a>)</li>\n<li>Arch Linux (<a rel=\"nofollow\" href=\"https://aur.archlinux.org/packages/neolink-git/\">AUR</a>)</li>\n<li>Docker x86 (see below)</li>\n</ul>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Windows/Linux</h3><a href=\"#windowslinux\" aria-label=\"Permalink: Windows/Linux\" id=\"user-content-windowslinux\"></a></p>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\"><a rel=\"nofollow\" href=\"https://gstreamer.freedesktop.org/documentation/installing/index.html\">Install Gstreamer</a> from the most recent MSI installer on Windows,\nor your package manager on Linux.</p>\n<p dir=\"auto\">On Ubuntu/Debian machines gstreamer can be installed with:</p>\n<div dir=\"auto\"><pre>sudo apt install \\\n libgstrtspserver-1.0-0 \\\n libgstreamer1.0-0 \\\n libgstreamer-plugins-bad1.0-0 \\\n gstreamer1.0-plugins-good \\\n gstreamer1.0-plugins-bad</pre></div>\n</li>\n<li>\n<p dir=\"auto\">If you are using Windows, add the following to your <code>PATH</code> environment variable:</p>\n<div><pre><code>%GSTREAMER_1_0_ROOT_X86_64%\\bin\n</code></pre></div>\n<p dir=\"auto\"><strong>Note:</strong> If you use Chocolatey to install Gstreamer, it does this\nautomatically.</p>\n</li>\n<li>\n<p dir=\"auto\">Download and unpack Neolink from the links above.</p>\n<ol dir=\"auto\">\n<li>Note: you can also click on <a href=\"https://github.com/thirtythreeforty/neolink/actions?query=workflow%3ACI+branch%3Amaster+\">this link</a> to see all historical builds.\nYou will need to be logged in to GitHub to download directly from the builds page (wget doesn't work)</li>\n</ol>\n<p dir=\"auto\">Ubuntu/Debian/Raspberry Pi OS example:</p>\n<div dir=\"auto\"><pre>unzip release-arm64-buster.zip\nsudo cp neolink /usr/local/bin/\nsudo chmod +x /usr/local/bin/neolink</pre></div>\n</li>\n<li>\n<p dir=\"auto\">Write a configuration file for your cameras. See the section below.</p>\n</li>\n<li>\n<p dir=\"auto\">Launch Neolink from a shell, passing your configuration file:</p>\n<div dir=\"auto\"><pre>neolink rtsp --config my_config.toml</pre></div>\n</li>\n<li>\n<p dir=\"auto\">Connect your NVR software to Neolink's RTSP server.</p>\n<p dir=\"auto\">The default URL is <code>rtsp://127.0.0.1:8554/your_camera_name</code> if you're running\nit on the same computer.\nIf you run it on a different server, you may need to open firewall ports.\nSee the \"Viewing\" section below for more troubleshooting.</p>\n</li>\n</ol>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Docker</h3><a href=\"#docker\" aria-label=\"Permalink: Docker\" id=\"user-content-docker\"></a></p>\n<p dir=\"auto\">A Docker image is also available containing Neolink and all its dependencies.\nThe image is <code>thirtythreeforty/neolink</code>.\nPort 8554 is exposed, which is the default listen port.\nYou must mount a configuration file (see below) into the container at\n<code>/etc/neolink.toml</code>.</p>\n<p dir=\"auto\">Here is a sample launch commmand:</p>\n<div dir=\"auto\"><pre>docker run \\\n -p 8554:8554 \\\n --restart=on-failure \\\n --volume=<span>$PWD</span>/config.toml:/etc/neolink.toml \\\n thirtythreeforty/neolink</pre></div>\n<p dir=\"auto\">Here is an example docker-compose:</p>\n<div dir=\"auto\"><pre>---\n<span>version</span>: <span><span>\"</span>2<span>\"</span></span>\n<span>services</span>:\n <span>neolink</span>:\n <span>image</span>: <span>thirtythreeforty/neolink</span>\n <span>container_name</span>: <span>neolink</span>\n <span>ports</span>:\n - <span>8554:8554</span>\n <span>volumes</span>:\n - <span>$PWD/neolink.toml:/etc/neolink.toml</span>\n <span>restart</span>: <span>unless-stopped</span></pre></div>\n<p dir=\"auto\">The Docker image is \"best effort\" and intended for advanced users; questions\nabout running Docker are outside the scope of Neolink.</p>\n<p dir=\"auto\">If you use a battery-powered camera (or other UDP-only camera) you will need to either\nuse <code>--net=host</code> or setup a <a rel=\"nofollow\" href=\"https://docs.docker.com/network/macvlan/\">macvlan</a>\nfor the docker image that supports UDP broadcast.\nThis is because UDP requires that udp broadcast messages are transmitted across\nthe docker network interface, however this is <a data-hovercard-url=\"/docker/for-linux/issues/637/hovercard\" data-hovercard-type=\"issue\" href=\"https://github.com/docker/for-linux/issues/637\">not possible in the default\nbridging mode</a></p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Configuration</h2><a href=\"#configuration\" aria-label=\"Permalink: Configuration\" id=\"user-content-configuration\"></a></p>\n<p dir=\"auto\"><strong>Note</strong>: for a more comprehensive setup tutorial, refer to the\n<a href=\"https://github.com/thirtythreeforty/neolink/blob/master/docs/Setting%20Up%20Neolink%20For%20Use%20With%20Blue%20Iris.md\">Blue Iris setup walkthrough in <code>docs/</code></a> (which is probably\nalso helpful even with other NVR software).</p>\n<p dir=\"auto\"><strong>Note</strong>: more comprehensive setup details for linux based devices is provided in\n<a href=\"https://github.com/thirtythreeforty/neolink/blob/master/docs/unix_setup.md\">docs/unix_setup.md</a></p>\n<p dir=\"auto\"><strong>Note</strong>: instructions for also setting up a (systemd based) service for linux\nbased devices is provided in <a href=\"https://github.com/thirtythreeforty/neolink/blob/master/docs/unix_service.md\">docs/unix_service.md</a></p>\n<p dir=\"auto\">Copy and modify the <code>sample_config.toml</code> to specify the address, username, and\npassword for each camera (if there is no password, you can omit that line).\nThe default credentials for some cameras is username <code>admin</code> password <code>123456</code>.</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\">For a non battery powered camera you need to provide the address field with the\nip and port (default 9000).</p>\n</li>\n<li>\n<p dir=\"auto\">For a battery powered camera you need to provide the uid field with the\ncamera's UID. In this case your network must support UDP.\nBattery cameras exclusively use this UDP mode so you must always use a UID.</p>\n</li>\n</ul>\n<p dir=\"auto\">Each <code>[[cameras]]</code> block creates a new camera; the <code>name</code> determines the RTSP\npath you should connect your client to.</p>\n<p dir=\"auto\">By default, the HD stream is available at the RTSP path <code>/name</code> or\n<code>/name/mainStream</code>, and the SD stream is available at <code>/name/subStream</code>.\nYou can use only the HD stream by adding <code>stream = \"mainStream\"</code> to the\n<code>[[cameras]]</code> config, or only the SD stream with <code>stream = \"subStream\"</code>.</p>\n<p dir=\"auto\"><strong>Note</strong>: The B400/D400 models only support a single stream at a time, so you\nmust add this line to sections for those cameras.</p>\n<p dir=\"auto\">By default Neolink serves on all IP addresses on port 8554.\nYou can modify this by changing the <code>bind</code> and the <code>bind_port</code> parameter.\nYou only need one <code>bind</code>/<code>bind_port</code> setting at the top of the config file.</p>\n<p dir=\"auto\">You can enable <code>rtsps</code> (TLS) by adding a <code>certificate = \"/path/to/pem\"</code> to the\ntop section of the config file. This PEM should contain the certificate\nand the key used for the server. If TLS is enabled all connections must use\n<code>rtsps</code>. You can also use client side TLS with the config option\n<code>tls_client_auth = \"none|request|require\"</code>; in this case the client should\npresent a certificate signed by the server's CA.</p>\n<p dir=\"auto\">TLS is disabled by default.</p>\n<p dir=\"auto\">You can password-protect the Neolink server by adding <code>[[users]]</code> sections to\nthe configuration file, but this is not secure without also using TLS:</p>\n<div><pre><code>[[users]]\nname: someone\npass: somepass\n</code></pre></div>\n<p dir=\"auto\">you also need to add the allowed users into each camera by adding the following\nto <code>[[cameras]]</code>.</p>\n<div><pre><code>permitted_users = [\"someone\", \"someoneelse\"]\n</code></pre></div>\n<p dir=\"auto\">Anywhere a username is accepted it can take any username or one of the\nfollowing special values.</p>\n<ul dir=\"auto\">\n<li><code>anyone</code> means any user with a valid user/pass</li>\n<li><code>anonymous</code> means no user/pass required</li>\n</ul>\n<p dir=\"auto\">The default <code>permitted_users</code> list is:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\"><code>[ \"anonymous\"]</code> if no <code>[[users]]</code> were given in the config meaning no\nauthentication required to connect.</p>\n</li>\n<li>\n<p dir=\"auto\"><code>[ \"anyone\" ]</code> if <code>[[users]]</code> were provided meaning any authourised users can\nconnect.</p>\n</li>\n</ul>\n<p dir=\"auto\">You can change the Neolink log level by setting the <code>RUST_LOG</code> environment\nvariable (not in the configuration file) to one of <code>error</code>, <code>warn</code>, <code>info</code>,\n<code>debug</code>, or <code>trace</code>:</p>\n<ul dir=\"auto\">\n<li>On sh:</li>\n</ul>\n\n<ul dir=\"auto\">\n<li>On Bash:</li>\n</ul>\n\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Viewing</h2><a href=\"#viewing\" aria-label=\"Permalink: Viewing\" id=\"user-content-viewing\"></a></p>\n<p dir=\"auto\">Connect your RTSP client to the stream with the name you provided in the\nconfiguration file.</p>\n<p dir=\"auto\">Again, the default URL is <code>rtsp://127.0.0.1:8554/your_camera_name</code> if you're\nrunning it on the same computer as the client.\nThe smaller SD video is <code>rtsp://127.0.0.1:8554/your_camera_name/subStream</code>.</p>\n<p dir=\"auto\">4K cameras send large video \"key frames\" once every few seconds and the client\nmust have a receive buffer large enough to store the entire frame.\nIf your client's buffer size is configurable (like Blue Iris), ensure it's set\nto 20MB, which should ensure plenty of headroom.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Stability</h2><a href=\"#stability\" aria-label=\"Permalink: Stability\" id=\"user-content-stability\"></a></p>\n<p dir=\"auto\">Neolink has had minimal testing, but it seems to be very reliable in multiple\nusers' testing.</p>\n<p dir=\"auto\">The formats of all configuration files and APIs is subject to change as required\nwhile it is pre-1.0.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Development</h2><a href=\"#development\" aria-label=\"Permalink: Development\" id=\"user-content-development\"></a></p>\n<p dir=\"auto\">Neolink is written in Rust, and binds to Gstreamer to provide RTSP server\nfunctionality.</p>\n<p dir=\"auto\">To compile, ensure you have the Rust compiler, Gstreamer, and gst-rtsp-server\ninstalled.</p>\n<p dir=\"auto\">Then simply run:</p>\n\n<p dir=\"auto\">from this top directory.</p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Baichuan Protocol</h3><a href=\"#baichuan-protocol\" aria-label=\"Permalink: Baichuan Protocol\" id=\"user-content-baichuan-protocol\"></a></p>\n<p dir=\"auto\">The \"port 9000\" protocol used by Reolink and some Swann cameras is internally\nreferred to as the Baichuan protocol; this is the company based in China that\nis known internationally as Reolink.</p>\n<p dir=\"auto\">This protocol is a slightly convoluted header-data format, and appears to have\nbeen upgraded several times.</p>\n<p dir=\"auto\">The modern variant uses obfuscated XML commands and sends ordinary H.265 or\nH.264 video streams encapsulated in a custom header.</p>\n<p dir=\"auto\">More details of the on-the-wire protocol are provided in <a href=\"https://github.com/thirtythreeforty/neolink/blob/master/dissector\"><code>dissector/</code></a>.</p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Baichuan dissector</h3><a href=\"#baichuan-dissector\" aria-label=\"Permalink: Baichuan dissector\" id=\"user-content-baichuan-dissector\"></a></p>\n<p dir=\"auto\">A Wireshark dissector is available for the BC wire protocol in the <code>dissector</code>\ndirectory.</p>\n<p dir=\"auto\">It dissects the BC header and also allows viewing the deobfuscated XML in\ncommand messages.\n(It cannot deobfuscate newer messages that use AES encryption.)\nTo use it, copy or symlink it into your Wireshark plugin directory; typically\nthis is <code>~/.local/lib/wireshark/plugins/</code> under Linux.</p>\n<p dir=\"auto\">Currently the dissector does not attempt to decode the Baichuan \"extension\"\nmessages except <code>binaryData</code>.\nThis will change in the future as reverse engineering needs require.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">License</h2><a href=\"#license\" aria-label=\"Permalink: License\" id=\"user-content-license\"></a></p>\n<p dir=\"auto\">Neolink is free software, released under the GNU Affero General Public License\nv3.</p>\n<p dir=\"auto\">This means that if you incorporate it into a piece of software available over\nthe network, you must offer that software's source code to your users.</p>\n</article></div></div>","textContent":"Development has moved\nNeolink is now maintained at https://github.com/QuantumEntangledAndy/neolink as I no longer have time to dedicate to development.\nPlease direct your thanks and bug reports over there!\nNeolink\n\nNeolink is a small program that acts as a proxy between Reolink IP cameras and\nnormal RTSP clients.\nCertain cameras, such as the Reolink B800, do not implement ONVIF or RTSP, but\ninstead use a proprietary \"Baichuan\" protocol only compatible with their apps\nand NVRs (any camera that uses \"port 9000\" will likely be using this protocol).\nNeolink allows you to use NVR software such as Shinobi or Blue Iris to receive\nvideo from these cameras instead.\nThe Reolink NVR is not required, and the cameras are unmodified.\nYour NVR software connects to Neolink, which forwards the video stream from the\ncamera.\nThe Neolink project is not affiliated with Reolink in any way; everything it\ndoes has been reverse engineered.\nSupported cameras\nNeolink intends to support all Reolink cameras that do not provide native RTSP.\nCurrently it has been tested on the following cameras:\n\nB800/D800\nB400/D400\nE1\nLumus\n510A\n\nNeolink does not support other cameras such as the RLC-420, since they already\nprovide native RTSP.\nUsage\n\n\nFirst, write a configuration yaml file describing your cameras. See the\nConfiguration section below or the provided sample config.\n\n\nLaunch Neolink:\n\n\nneolink rtsp --config=your_config.yaml\n\nThen, connect your RTSP viewer to rtsp://127.0.0.1:8554/your_camera_name!\n\nAdditional commands\nNeolink also has some additional command line tools\nfor controlling the camera. They are all used through neolink subcommands like this:\nneolink subcommand --config=...\nThe currently supported subcommands are\n\nrtsp: The standard neolink rtsp bridge\nstatus-light: Control the LED status light\nreboot: Reboot a camera\ntalk: Enable talk back through either the microphone or by\nreading a sound file.\n\nFor a full list of commands use neolink help, or use\nneolink help <subcommand> for details on a subcommand of interest.\nDownload & Installation\nBuilds are provided for the following platforms:\n\nWindows x86_64 (download)\nmacOS x86_64 (download)\nUbuntu/Debian x86_64 (download)\nUbuntu/Debian x86 (download)\nDebian aarch64 (Raspberry Pi 64-bit) (download)\nDebian armhf (Raspberry Pi 32-bit) (download)\nArch Linux (AUR)\nDocker x86 (see below)\n\nWindows/Linux\n\n\nInstall Gstreamer from the most recent MSI installer on Windows,\nor your package manager on Linux.\nOn Ubuntu/Debian machines gstreamer can be installed with:\nsudo apt install \\\n libgstrtspserver-1.0-0 \\\n libgstreamer1.0-0 \\\n libgstreamer-plugins-bad1.0-0 \\\n gstreamer1.0-plugins-good \\\n gstreamer1.0-plugins-bad\n\n\nIf you are using Windows, add the following to your PATH environment variable:\n%GSTREAMER_1_0_ROOT_X86_64%\\bin\n\nNote: If you use Chocolatey to install Gstreamer, it does this\nautomatically.\n\n\nDownload and unpack Neolink from the links above.\n\nNote: you can also click on this link to see all historical builds.\nYou will need to be logged in to GitHub to download directly from the builds page (wget doesn't work)\n\nUbuntu/Debian/Raspberry Pi OS example:\nunzip release-arm64-buster.zip\nsudo cp neolink /usr/local/bin/\nsudo chmod +x /usr/local/bin/neolink\n\n\nWrite a configuration file for your cameras. See the section below.\n\n\nLaunch Neolink from a shell, passing your configuration file:\nneolink rtsp --config my_config.toml\n\n\nConnect your NVR software to Neolink's RTSP server.\nThe default URL is rtsp://127.0.0.1:8554/your_camera_name if you're running\nit on the same computer.\nIf you run it on a different server, you may need to open firewall ports.\nSee the \"Viewing\" section below for more troubleshooting.\n\n\nDocker\nA Docker image is also available containing Neolink and all its dependencies.\nThe image is thirtythreeforty/neolink.\nPort 8554 is exposed, which is the default listen port.\nYou must mount a configuration file (see below) into the container at\n/etc/neolink.toml.\nHere is a sample launch commmand:\ndocker run \\\n -p 8554:8554 \\\n --restart=on-failure \\\n --volume=$PWD/config.toml:/etc/neolink.toml \\\n thirtythreeforty/neolink\nHere is an example docker-compose:\n---\nversion: \"2\"\nservices:\n neolink:\n image: thirtythreeforty/neolink\n container_name: neolink\n ports:\n - 8554:8554\n volumes:\n - $PWD/neolink.toml:/etc/neolink.toml\n restart: unless-stopped\nThe Docker image is \"best effort\" and intended for advanced users; questions\nabout running Docker are outside the scope of Neolink.\nIf you use a battery-powered camera (or other UDP-only camera) you will need to either\nuse --net=host or setup a macvlan\nfor the docker image that supports UDP broadcast.\nThis is because UDP requires that udp broadcast messages are transmitted across\nthe docker network interface, however this is not possible in the default\nbridging mode\nConfiguration\nNote: for a more comprehensive setup tutorial, refer to the\nBlue Iris setup walkthrough in docs/ (which is probably\nalso helpful even with other NVR software).\nNote: more comprehensive setup details for linux based devices is provided in\ndocs/unix_setup.md\nNote: instructions for also setting up a (systemd based) service for linux\nbased devices is provided in docs/unix_service.md\nCopy and modify the sample_config.toml to specify the address, username, and\npassword for each camera (if there is no password, you can omit that line).\nThe default credentials for some cameras is username admin password 123456.\n\n\nFor a non battery powered camera you need to provide the address field with the\nip and port (default 9000).\n\n\nFor a battery powered camera you need to provide the uid field with the\ncamera's UID. In this case your network must support UDP.\nBattery cameras exclusively use this UDP mode so you must always use a UID.\n\n\nEach [[cameras]] block creates a new camera; the name determines the RTSP\npath you should connect your client to.\nBy default, the HD stream is available at the RTSP path /name or\n/name/mainStream, and the SD stream is available at /name/subStream.\nYou can use only the HD stream by adding stream = \"mainStream\" to the\n[[cameras]] config, or only the SD stream with stream = \"subStream\".\nNote: The B400/D400 models only support a single stream at a time, so you\nmust add this line to sections for those cameras.\nBy default Neolink serves on all IP addresses on port 8554.\nYou can modify this by changing the bind and the bind_port parameter.\nYou only need one bind/bind_port setting at the top of the config file.\nYou can enable rtsps (TLS) by adding a certificate = \"/path/to/pem\" to the\ntop section of the config file. This PEM should contain the certificate\nand the key used for the server. If TLS is enabled all connections must use\nrtsps. You can also use client side TLS with the config option\ntls_client_auth = \"none|request|require\"; in this case the client should\npresent a certificate signed by the server's CA.\nTLS is disabled by default.\nYou can password-protect the Neolink server by adding [[users]] sections to\nthe configuration file, but this is not secure without also using TLS:\n[[users]]\nname: someone\npass: somepass\n\nyou also need to add the allowed users into each camera by adding the following\nto [[cameras]].\npermitted_users = [\"someone\", \"someoneelse\"]\n\nAnywhere a username is accepted it can take any username or one of the\nfollowing special values.\n\nanyone means any user with a valid user/pass\nanonymous means no user/pass required\n\nThe default permitted_users list is:\n\n\n[ \"anonymous\"] if no [[users]] were given in the config meaning no\nauthentication required to connect.\n\n\n[ \"anyone\" ] if [[users]] were provided meaning any authourised users can\nconnect.\n\n\nYou can change the Neolink log level by setting the RUST_LOG environment\nvariable (not in the configuration file) to one of error, warn, info,\ndebug, or trace:\n\nOn sh:\n\n\n\nOn Bash:\n\n\nViewing\nConnect your RTSP client to the stream with the name you provided in the\nconfiguration file.\nAgain, the default URL is rtsp://127.0.0.1:8554/your_camera_name if you're\nrunning it on the same computer as the client.\nThe smaller SD video is rtsp://127.0.0.1:8554/your_camera_name/subStream.\n4K cameras send large video \"key frames\" once every few seconds and the client\nmust have a receive buffer large enough to store the entire frame.\nIf your client's buffer size is configurable (like Blue Iris), ensure it's set\nto 20MB, which should ensure plenty of headroom.\nStability\nNeolink has had minimal testing, but it seems to be very reliable in multiple\nusers' testing.\nThe formats of all configuration files and APIs is subject to change as required\nwhile it is pre-1.0.\nDevelopment\nNeolink is written in Rust, and binds to Gstreamer to provide RTSP server\nfunctionality.\nTo compile, ensure you have the Rust compiler, Gstreamer, and gst-rtsp-server\ninstalled.\nThen simply run:\n\nfrom this top directory.\nBaichuan Protocol\nThe \"port 9000\" protocol used by Reolink and some Swann cameras is internally\nreferred to as the Baichuan protocol; this is the company based in China that\nis known internationally as Reolink.\nThis protocol is a slightly convoluted header-data format, and appears to have\nbeen upgraded several times.\nThe modern variant uses obfuscated XML commands and sends ordinary H.265 or\nH.264 video streams encapsulated in a custom header.\nMore details of the on-the-wire protocol are provided in dissector/.\nBaichuan dissector\nA Wireshark dissector is available for the BC wire protocol in the dissector\ndirectory.\nIt dissects the BC header and also allows viewing the deobfuscated XML in\ncommand messages.\n(It cannot deobfuscate newer messages that use AES encryption.)\nTo use it, copy or symlink it into your Wireshark plugin directory; typically\nthis is ~/.local/lib/wireshark/plugins/ under Linux.\nCurrently the dissector does not attempt to decode the Baichuan \"extension\"\nmessages except binaryData.\nThis will change in the future as reverse engineering needs require.\nLicense\nNeolink is free software, released under the GNU Affero General Public License\nv3.\nThis means that if you incorporate it into a piece of software available over\nthe network, you must offer that software's source code to your users.\n","length":10205,"excerpt":"Development has moved","siteName":null} |