Finding RTSP URL for firstrend cameras

MrRedPants

n3wb
Mar 8, 2021
2
0
Tampa, FL
I have (had) two firstrend NVRs - I've dumped them for BlueIris - I am having a heck of a time figuring out these cameras RTSP video feed URLs - they don't seem to have ONVIF. I think is Anyka (?) - when I telnet I get a prompt for that user. The web interface uses flash. I tried using Fiddler but between the java and the flash based firmware, I'm not getting anywhere. The NVR uses EseeCloud. I tried wireshark as well and there aren't any RTSP packets. Only thing I see are ports port 52428 and 52429 from camera sending information to port 80 on my laptop.

This is the device info for these cameras:
Device Model
IPC
Software Version
2.4.1(2.6.10_391806)
SDK
2.4.1.0
Release Time
2017/10/14 20:28:23
 
Last edited:
Hi everyone,

I wanted to share a working solution for a common issue with generic Anyka / HiSilicon IP cameras (lightbulb cameras, XM modules, and "N1 protocol" firmware devices).

The Problem:
After a firmware update, ONVIF and standard RTSP ports (554/8899) disappear completely. The camera only serves a proprietary RTSP-over-HTTP stream at:
http://<CAMERA_IP>/livestream/11?action=play&media=video_audio_data

When trying to connect using NVRs (Hikvision, Dahua, Shinobi, Frigate, Blue Iris, VLC, curl), it fails immediately with 401 Unauthorized.

Root Cause: The camera's embedded Nginx server responds with 401 Unauthorized without sending a WWW-Authenticate challenge header. Standard HTTP clients/NVRs wait for this header to negotiate auth (Basic/Digest) and fail instantly when it's missing.

The Fix:
We need to force a pre-emptive Authorization: Basic header on the initial request. We use go2rtc + a small FFmpeg wrapper script on Linux (Debian LXC, Proxmox, Raspberry Pi, Docker) to convert this HTTP stream into a standard, 24/7 RTSP feed (rtsp:/<SERVER_IP>:8554/garden_camera) with 0% CPU transcoding overhead.

--------------------------------------------------
Step-by-Step Setup Guide (Debian / Linux LXC)
--------------------------------------------------

Step 1: Install Dependencies & go2rtc
Run in your Linux terminal:

apt update && apt install -y ffmpeg curl wget ca-certificates

wget -O /usr/local/bin/go2rtc
chmod +x /usr/local/bin/go2rtc


Step 2: Create the FFmpeg Wrapper Script
Create /usr/local/bin/stream_camera.sh:

cat << 'EOF' > /usr/local/bin/stream_camera.sh
#!/bin/bash
exec ffmpeg -headers $'Authorization: Basic YWRtaW46\r\n' -i "" -c:v copy -an -f rtsp "$@"
EOF

chmod +x /usr/local/bin/stream_camera.sh

(Note: Replace 192.168.1.136 with your camera's IP address. YWRtaW46 is Base64 for admin: with no password. If you have a password, convert username:password to Base64).


Step 3: Configure go2rtc
Create /etc/go2rtc.yaml:

cat << 'EOF' > /etc/go2rtc.yaml
streams:
garden_camera:
- exec:/usr/local/bin/stream_camera.sh {output}
EOF


Step 4: Create Systemd Service (Autostart 24/7)
Create /etc/systemd/system/go2rtc.service:

cat << 'EOF' > /etc/systemd/system/go2rtc.service
[Unit]
Description=go2rtc RTSP Gateway Proxy
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/go2rtc -config /etc/go2rtc.yaml
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable --now go2rtc

Check status:
systemctl status go2rtc


Step 5: Connect your NVR / Shinobi / Blue Iris / Frigate
1. Web Preview: Open http://<SERVER_IP>:1984 in your browser to view the WebRTC stream live.
2. NVR Stream URL: Add as a standard RTSP camera:
rtsp:/<SERVER_IP>:8554/garden_camera

Hope this helps anyone dealing with these Anyka N1 cameras!
 
Last edited: