ONVIF and RTSP
Aperture uses ONVIF in two directions and offers a plain RTSP restream of every camera. This page covers all three: changing a camera’s own picture settings from Aperture, letting other recorders such as Frigate, Blue Iris, Synology Surveillance Station or Milestone find and use your cameras through Aperture, and pulling a camera’s stream into any player.
ONVIF in brief
Section titled “ONVIF in brief”ONVIF is an industry standard that lets cameras and recorders discover and control each other: stream profiles, picture settings, pan/tilt and events. It is separate from RTSP, which carries the video itself. A camera can have RTSP without ONVIF, and Aperture records fine either way.
| Direction | What happens | Turned on by |
|---|---|---|
| Aperture → your camera | Aperture reads and changes the camera’s picture settings. | Camera picture settings, per camera. Off by default. |
| Your camera → Aperture | Not used. Video arrives over RTSP, and Aperture runs its own motion detection on the picture, so it does not depend on the camera’s ONVIF events. | Nothing to turn on. |
| Aperture → other recorders | Aperture presents itself as an ONVIF device with a stream and a snapshot per camera. | Integrations › ONVIF & HomeKit › ONVIF. Off by default. |
Picture settings on your cameras
Section titled “Picture settings on your cameras”Aperture can adjust a camera’s own image settings (brightness, contrast, saturation, sharpness and day/night) while you watch the picture, instead of in the vendor’s web page.
Turn it on
Section titled “Turn it on”- Open Devices, click the camera, and open its Settings tab.
- Expand Picture & controls and switch on Camera picture settings.
- Under Camera account, leave Username and Password empty to sign in with the login from the stream link, or enter an account the camera accepts for ONVIF. Some cameras (Hikvision, for example) use a separate ONVIF user.
- Leave ONVIF port empty to let Aperture find it, or enter the camera’s ONVIF port.
Nothing contacts the camera over ONVIF until you switch it on. The setting is saved as you change it; there is no separate save step for this block.
When Aperture reaches the camera, the camera’s model appears next to the switch and the controls the camera reports appear below it:
- Brightness, Contrast, Saturation and Sharpness sliders, each in the range the camera reports. A change is sent when you let go of the slider.
- Day / night (IR cut filter): Day, Night or Auto, if the camera offers it.
“Applied to the camera.” confirms a change. Revert unsaved puts the sliders back to what the camera last reported.
Once it works, a Picture settings button also appears over the camera’s live picture with the same controls, so you can adjust the image while you look at it. It is shown only on the live picture, not while you review footage.
How Aperture finds the camera
Section titled “How Aperture finds the camera”- The camera’s address comes from its main stream link.
- Without an ONVIF port, Aperture tries ports 8000, 2020, 80, 8899, 8080 and 5000 in turn. Reolink commonly uses 8000 and Tapo 2020.
- Each call to the camera times out after 5 seconds. What Aperture learns about the camera is kept for 2 minutes, and changing the account or port clears it.
The camera account is write-only
Section titled “The camera account is write-only”The saved account never reaches the browser. The fields show “••••• (saved)” and start empty; anything you type replaces the saved value when you leave the field. Use the stream link’s login instead clears a saved account. The password is stored encrypted.
The same Camera account is used by the Reolink spotlight and night-vision controls.
When it does not work
Section titled “When it does not work”| Message | Meaning |
|---|---|
| The camera did not answer on any ONVIF port. | ONVIF is off on the camera, or it uses a port Aperture does not try. Switch ONVIF on in the camera’s web interface, or enter its ONVIF port. |
| This camera answers ONVIF but exposes no picture settings. | The camera speaks ONVIF but has no imaging service. Nothing to adjust here. |
| this camera account may view settings but not change them — use an admin account on the camera | The login can read the settings but the camera refuses changes from it. Enter an administrator account under Camera account. |
| Another error from the camera | The camera rejected the value or the request. The camera’s own wording is shown. |
Picture settings are never used by the recorder. A camera that stops answering only affects this panel.
Aperture as an ONVIF device
Section titled “Aperture as an ONVIF device”Aperture can present itself as an ONVIF device (Profile S, the streaming profile) with one channel per camera, so another recorder or video management system can discover your cameras and pull them through Aperture. The cameras then see one client, Aperture, whatever else is watching.
Turn it on
Section titled “Turn it on”- Open Integrations and select ONVIF & HomeKit.
- Switch on ONVIF.
It starts at once, without a restart, and the row shows Running and “Listening on :10101 — other systems discover it automatically on the LAN.” Switching it off stops it at once.
Running means the provider is listening on its port. If the port is already taken by another program, the switch stays off and the page shows the error under the list, for example “could not start ONVIF: listen tcp :10101: bind: address already in use”. If the switch was already on when Aperture started, or the provider stops later on its own, the row shows Failed to start with the reason in red. The server log (journalctl -u aperture) has the details.
The environment variable APERTURE_ONVIF_ENABLED="true" in /etc/aperture/aperture.env only sets the starting value of this switch the first time Aperture starts. After that, the switch in the app is what counts. See Configuration.
What other systems get
Section titled “What other systems get”| Item | Value |
|---|---|
| Device service | http://192.168.1.10:10101/onvif/device_service |
| Media service | http://192.168.1.10:10101/onvif/media_service |
| Manufacturer and model | Aperture, Aperture NVR |
| Profiles | One per enabled camera, named after the camera |
| Stream address | The camera’s RTSP restream: rtsp://192.168.1.10:8554/cam_<id> |
| Snapshot address | http://192.168.1.10:10101/onvif/snapshot/<id>.jpg, served by the ONVIF provider itself |
The supported operations are GetDeviceInformation, GetCapabilities, GetServices, GetSystemDateAndTime, GetScopes, GetServiceCapabilities, GetProfiles, GetProfile, GetVideoSources, GetVideoSourceConfigurations, GetStreamUri and GetSnapshotUri. Anything else is answered with a SOAP fault. There is no pan/tilt, no event service and no recording search.
Things to know:
- Only the main stream is offered, one profile per camera. Sub streams are not.
- The advertised video settings are placeholders: 1920×1080 H.264, at the camera’s configured frame rate or 15 fps. Clients read the real resolution and codec from the stream when they connect, but some show the placeholder in their device list.
- Every enabled camera is included. The Show in Home Assistant & HomeKit switch does not apply here, and neither do user permissions.
- Any username and password are accepted. If the other system insists on credentials, type anything.
- The port is 10101. Set
APERTURE_ONVIF_ADDR=":10101"in/etc/aperture/aperture.envto change it, then restart Aperture.
Discovery
Section titled “Discovery”While the provider runs, Aperture also answers WS-Discovery probes, the multicast search ONVIF clients use to find devices (UDP port 3702, group 239.255.255.250). If the multicast socket cannot be opened, discovery is skipped and the provider keeps serving; add the device by address instead.
Aperture advertises the address of the network interface on its default route. On a server with several network interfaces this can be the wrong one; add the device by address in that case.
Connect another recorder
Section titled “Connect another recorder”In the other system, add an ONVIF device, either from its discovery list or by address: 192.168.1.10, port 10101. Pick the cameras (profiles) you want. If it asks for a login, any value works.
If the other system can take a plain RTSP address instead, that is often simpler: give it the camera’s restream address directly. ONVIF adds only discovery and snapshots on top.
The RTSP restream
Section titled “The RTSP restream”go2rtc, the stream broker beside Aperture, holds the only connection to each camera and re-serves it over RTSP on port 8554. Anything on your network that can play RTSP (VLC, ffmpeg, Home Assistant, another recorder) can pull a camera from it without opening a second connection to the camera.
| Stream | Address |
|---|---|
| Main stream | rtsp://192.168.1.10:8554/cam_<id> |
| Sub stream | rtsp://192.168.1.10:8554/cam_<id>_sub (only when the camera has a sub stream) |
<id> is the camera’s ID, 32 hexadecimal characters. Only enabled cameras are served. The stream is exactly what the camera sends; nothing is re-encoded.
To find the address of each camera, open Integrations › Home Assistant and look at Live video URLs. Each row has a copy button. To check one from another computer:
ffplay rtsp://192.168.1.10:8554/cam_<id>The address other devices should use
Section titled “The address other devices should use”Aperture builds these addresses from APERTURE_STREAM_HOST in /etc/aperture/aperture.env:
APERTURE_STREAM_HOST="192.168.1.10"Set it to the server’s address on your network. If you leave it empty, the Live video URLs table uses the address you opened the web app on, and the ONVIF provider uses the address of the server’s default-route interface. That is wrong as soon as you open Aperture through a reverse proxy: the proxy forwards the web app, not port 8554, so a link like rtsp://nvr.example.com:8554/... leads nowhere. A value without a port gets go2rtc’s RTSP port (8554) added. Restart Aperture after changing it:
sudo systemctl restart apertureNo login on the restream
Section titled “No login on the restream”Related: Add cameras · Home Assistant · Live streaming · Security