← All How-To Guides
Camera setup

How to Connect a Thingino Camera to LightNVR

Turn a Thingino camera's local, open RTSP feeds into a dependable LightNVR source: lock down access, prove ch0 and ch1 on the LAN, then route only what the recorder needs.

10 min read Difficulty: Beginner

1. Confirm the camera and firmware

This guide starts with a camera that is already running Thingino. Thingino images are hardware-specific, and two cameras sold under the same product name can contain different chips or flash layouts. Confirm the exact model and hardware revision in the Thingino supported-hardware list before installing or upgrading firmware.

Do not flash an image merely because the enclosure looks identical. Back up the original firmware and use the Thingino image for the exact board, sensor, Wi-Fi radio, and flash size. Use the stable Thingino branch unless you are deliberately testing development firmware and have a recovery path.

Before continuing, collect:

  • The camera’s current LAN IP address
  • The Thingino Web UI login
  • The RTSP/ONVIF password you intend to use
  • A laptop on the same local network for the first stream test

2. Secure the camera and reserve its IP

  1. Open the camera’s IP address in a browser and sign in to the Thingino Web UI.
  2. Change the Web UI administrator password if it is still a known or reused value.
  3. Open Configuration → RTSP/ONVIF Access. Current firmware uses the username thingino; set a unique RTSP/ONVIF password and save it.
  4. In your router, create a DHCP reservation for the camera’s MAC address. Give it a descriptive hostname such as cam-front-door.
  5. Reconnect to the reserved address and confirm the Web UI still opens before moving on.
A DHCP reservation is usually easier to recover and audit than a static address entered on every camera. LightNVR needs the address to remain stable either way.

3. Copy the main and sub-stream URLs

Open Thingino’s Preview or RTSP/ONVIF Access page and copy the displayed URLs. On a standard configuration, RTSP listens on port 554 and exposes these paths:

PurposePathExample
Main stream /ch0 rtsp://thingino:password@192.168.30.21:554/ch0
Sub-stream /ch1 rtsp://thingino:password@192.168.30.21:554/ch1

Use the URLs displayed by your camera if they differ. Thingino lets a firmware build or administrator change the RTSP port and endpoint names, and a disabled sub-stream will not produce /ch1 even when that is its configured name.

An RTSP URL contains a reusable secret. Do not paste a real camera URL into tickets, screenshots, shell history shared with others, or public configuration. If a password contains URL-reserved characters, copy Thingino’s ready-to-use URL or percent-encode the password.

4. Test both streams locally

Prove the camera works on the same LAN before adding a VLAN, VPN, or cloud recorder to the path.

Quick visual test

In VLC, choose Media → Open Network Stream, paste the /ch0 URL, and repeat with /ch1.

Repeatable command-line test

ffprobe -hide_banner -v error -analyzeduration 5M -probesize 5M \
  -i 'rtsp://thingino:password@192.168.30.21:554/ch0'

ffprobe -hide_banner -v error -analyzeduration 5M -probesize 5M \
  -i 'rtsp://thingino:password@192.168.30.21:554/ch1'

A successful probe should identify a video stream and return without authentication, path, or codec errors. Then run a longer copy test to expose timestamp or packet problems:

ffmpeg -rtsp_transport tcp \
  -i 'rtsp://thingino:password@192.168.30.21:554/ch0' \
  -t 60 -map 0 -c copy -f null -

TCP transport is a useful baseline because it removes UDP packet loss from the first diagnosis. If this local test fails, fix the camera or URL before changing LightNVR.

5. Tune the streams for an NVR

In Thingino’s main-stream and sub-stream settings, start with conservative values and change one variable at a time:

SettingMain stream / ch0Sub-stream / ch1
UseRecording and evidenceLive view and low-bandwidth access
CodecH.264 for widest compatibilityH.264
Frame rate15 fps is a practical starting point8–15 fps
Bitrate2–4 Mbps at 1080p256–768 Kbps
GOP / keyframe intervalAbout 1–2 secondsAbout 1–2 seconds

Available formats, resolutions, and rate-control modes depend on the camera’s SoC and image sensor. Save the settings, restart the streamer when the UI indicates it is required, and repeat the 60-second test for both endpoints.

6. Give LightNVR a private route

Never forward TCP 554 from the public internet to the camera. Put the camera on a dedicated camera network and connect that network to LightNVR through WireGuard.

  • For several cameras at one site, run WireGuard on the router or a small gateway and route the camera subnet through it.
  • Thingino can also run a WireGuard client on supported builds, but one site gateway is usually simpler to audit and maintain.
  • Allow the LightNVR tunnel peer to reach the camera’s RTSP port; block the camera VLAN from initiating connections to the trusted LAN.

Follow the camera VLAN isolation guide for the firewall policy, then the WireGuard router guide for the private path to LightNVR.

7. Add the camera to LightNVR

  1. Open your LightNVR instance and select Streams.
  2. Choose Add Stream and give the camera a location-based name.
  3. Paste the Thingino /ch0 URL into Stream URL.
  4. Paste the /ch1 URL into Sub Stream URL.
  5. Choose Test Connection. If it fails, save the exact returned message.
  6. Add the stream, confirm live view uses the sub-stream, and verify that a completed recording plays from the main stream.
The job is not finished at the first live image. Verify a recording after its segment closes, then repeat the check after restarting the camera and the WireGuard gateway.

8. Thingino troubleshooting

401 Unauthorized

Re-copy the URL from Thingino after changing the RTSP/ONVIF password. Confirm the username shown by the camera, and percent-encode reserved characters if you assembled the URL manually.

404 Not Found or DESCRIBE fails

Check the configured endpoint names. The normal paths are /ch0 and /ch1, with no quotes around the path, but the camera UI is authoritative.

ch0 works but ch1 does not

Confirm stream 1 is enabled and has a supported format, resolution, frame rate, and bitrate. Save, restart the streamer, and test /ch1 locally again.

It works on the camera LAN but not from LightNVR

The camera is healthy; inspect the route. Verify a recent WireGuard handshake, the camera subnet in the route, and a stateful firewall allowance from the LightNVR tunnel peer to the camera’s RTSP port.

Video freezes or reports bad timestamps

Run the 60-second FFmpeg copy test against each stream, lower the rate or bitrate, and update to an appropriate stable Thingino image for the exact camera. Preserve FFmpeg output and Thingino streamer logs before asking for help.

For a broader layer-by-layer flow, see Troubleshoot an RTSP Camera Stream. Endpoint defaults in this guide are grounded in the Thingino streamer configuration.