← All How-To Guides
Camera setup

How to Connect Axis Cameras to LightNVR

Use Axis's standard media endpoint—or a saved stream profile—to record the camera in LightNVR while keeping a lighter feed available for live view.

9 min read Difficulty: Beginner

1. Before you start

This guide assumes the camera is already powered, activated, and visible on your local network. Complete the RTSP test from a computer on that same network before involving a VPN or cloud recorder. That separates a camera configuration problem from a routing problem.

You will need:

  • The camera’s local IP address
  • A camera-local username and password with live-view permission
  • A computer with VLC or ffprobe for the local test
  • Network access from LightNVR to the camera, directly or through a private tunnel
Check the model first. Axis uses a stable RTSP endpoint across its product line, but multi-sensor and multidirectional models expose more than one camera channel. Add the camera query parameter for the physical view you want.

2. Prepare the Axis camera

  1. Find and reserve the device IP: Use AXIS IP Utility, AXIS Device Manager, or your DHCP server, then reserve the address so the recorder URL remains stable.
  2. Create a video user: In the Axis device interface, create a dedicated user permitted to view video. Avoid using the owner/root account in a recorder URL.
  3. Choose a channel or stream profile: Single-sensor cameras normally use camera=1. For repeatable resolution, codec, frame-rate, and compression settings, create a named stream profile in the Axis interface.
A DHCP reservation is enough; the camera does not need a manually configured static IP. The goal is simply to keep its address from changing underneath the recorder.

3. Build the main and sub-stream URLs

Replace the placeholders with the camera account and reserved local IP address.

UseRTSP URL
Main recording streamrtsp://username:password@CAMERA_IP:554/axis-media/media.amp?camera=1
Lower-bandwidth live streamrtsp://username:password@CAMERA_IP:554/axis-media/media.amp?camera=1&resolution=640x360&fps=10

/axis-media/media.amp is the default Axis RTSP endpoint. camera=1 selects the first video channel. A saved profile can be requested with ?streamprofile=ProfileName; per-request parameters such as resolution and fps can also create a lighter view.

If a username or password contains reserved URL characters such as @, :, /, ?, or #, percent-encode that value before embedding it in the URL. Do not weaken the camera password just to make the URL easier to type.

4. Test the feed locally

Quick visual test with VLC

  1. Connect the test computer to the same network as the camera.
  2. In VLC, choose Media → Open Network Stream.
  3. Paste the main-stream URL and select Play.
  4. Repeat with the sub-stream URL and confirm it is the lower-resolution feed.

Inspect the stream with ffprobe

This reports the codec, dimensions, and frame rate without creating a recording:

ffprobe -v error -rtsp_transport tcp \
  -show_entries stream=codec_name,width,height,r_frame_rate \
  -of default=noprint_wrappers=1 \
  "rtsp://username:password@CAMERA_IP:554/axis-media/media.amp?camera=1"

Do not move on until at least the main URL works locally. If it fails, use the RTSP troubleshooting checklist to identify authentication, path, port, and codec failures in that order.

5. Add the camera to LightNVR

  1. Confirm the LightNVR host can route to the camera IP. A cloud instance should use a WireGuard tunnel; do not forward RTSP port 554 from the public internet.
  2. Open the LightNVR interface and select Streams in the main navigation.
  3. Select Add Stream.
  4. Under Basic Settings, enter a short name such as front_door.
  5. Paste the main URL into Stream URL.
  6. Paste the lower-bandwidth URL into Sub Stream URL.
  7. Optionally enter the camera’s web address in Camera Admin URL.
  8. Select Test Connection. Save with Add Stream only after the test succeeds.
Verify both outcomes: open Live to see the camera now, then open Recordings after a recording segment closes to confirm footage is being retained.

6. Tune recording and live view

Once the basic connection is stable, tune one setting at a time:

  • Prefer a named Axis stream profile for the recording feed so later camera-default changes do not silently alter NVR bandwidth.
  • Set audio=0 in the URL if audio is unnecessary or causing client compatibility issues.
  • Use a second URL with a smaller resolution and frame rate as LightNVR's sub stream.
  • Budget using the camera’s configured bitrate, not resolution alone. A 4 Mbps stream transfers about 43 GB per day before retention overhead.
  • After every codec or profile change, rerun Test Connection and check a newly created recording.

7. Troubleshooting

A multi-sensor camera shows the wrong view

  • Change camera=1 to camera=2, camera=3, and so on, testing each URL locally.
  • Check the device's available video channels before assuming the sensor number.
  • Use a named stream profile once the correct channel is identified.

The URL works without parameters but fails with a profile

  • Confirm the stream profile name exactly, including capitalization.
  • Test camera=1 without streamprofile first to isolate authentication and network access.
  • Remove audio with audio=0 if the selected profile includes an unsupported audio codec.

It works in VLC locally but not from LightNVR Cloud

  • Confirm the WireGuard tunnel shows a recent handshake.
  • Confirm the routed camera subnet contains the camera IP.
  • Test TCP port 554 from the LightNVR side; a successful ping does not prove RTSP is reachable.
  • Open System → System Logs, reproduce the failed connection, and inspect the newest warning or error.

8. Keep the connection secure

  • Use a dedicated camera user with live-view permission instead of the administrator account.
  • Keep the camera on an isolated camera or IoT VLAN when practical.
  • Route RTSP through the LAN or WireGuard; never expose port 554 directly to the public internet.
  • Keep camera firmware current and remove unused accounts and services.
  • Remember that credentials embedded in an RTSP URL are sensitive. Do not paste a real URL into public issues or screenshots.

Vendor reference: Axis developer documentation: RTSP endpoints. Menu names can move between firmware versions, but the linked vendor documentation is the source of truth for the stream path.