Recording modes and schedules
Each camera has its own recording mode, retention and recording quality. This page explains every option, what “Recording”, “Idle” and “Not recording” mean, and what Aperture does on its own to keep footage coming. Where the footage goes and when it is deleted for space is on Storage, destinations and retention.
Where the settings are
Section titled “Where the settings are”Recording is set per camera in the camera editor. Open Devices, select the camera and choose the Settings tab in its side panel (or use Add camera for a new one). The Recording group holds:
- Recording mode
- Retention (days)
- Edit recording schedule (only for the Scheduled mode)
- Recording quality: Resolution, Framerate and Bitrate
- Storage and Also record to, covered on Storage
Only administrators see the Settings tab. Changes apply when you choose Save changes.
Recording modes
Section titled “Recording modes”| Mode in the editor | What happens | Good for |
|---|---|---|
| 24/7 continuous | Records all the time. The default for a new camera. | Entrances, driveways, anything you may need to look back at without a trigger. |
| Motion only | Records all the time, then deletes the parts that contain no event a few minutes later. | Saving space on quiet cameras. |
| Scheduled | Records continuously inside the hours you paint on a weekly grid, and nothing outside them. | “Only at night”, “only on weekdays while the house is empty”. |
| Off | Live view only. Nothing is written to disk. | Cameras you only watch, such as a baby monitor or a UniFi Protect camera that Protect already records. |
A camera that is switched off entirely (Enabled off in the General group) neither streams nor records, whatever its mode.
The mode can also be changed from outside the editor: an automation can switch a camera’s mode when an event happens, and Home Assistant can set it through the camera’s recording-mode control. Neither can switch a camera to Scheduled while it has no recording hours, since that would stop it recording without anyone noticing.
Motion only
Section titled “Motion only”In Motion only mode the recorder still writes every second of video. The motion detector marks events, and the retention janitor, which runs every 5 minutes, deletes each 10-second segment that does not overlap an event on that camera once the segment is at least 2 minutes old. The grace period lets an event that is still open finish first. Footage overlapping any event is kept, including audio events.
Because the recorder is already running when motion starts, an event can include the seconds before it. Two settings in the Detection group of the same camera pad each event:
- Pre-roll (s): how much video before the first motion belongs to the event. Default 5 seconds.
- Post-roll (s): how much video after the last motion belongs to the event. Default 5 seconds.
The other two motion settings change what counts as an event: Cooldown (s) merges a flurry of motion into one event (default 5 seconds), and Ignore blips under (s) discards events whose motion lasted less than that, together with their footage (0 turns it off; pre-roll and post-roll do not count). Sensitivity and zones are on Motion detection.
Things to know:
- Motion detection is always on for a camera in this mode; the editor locks the switch.
- Footage is kept in whole 10-second segments, so a kept clip can start and end up to 10 seconds beyond the pre- and post-roll.
- The disk, and for a network destination the network, still carry every segment before the unneeded ones are deleted. Motion only saves space, not write load.
- If an event is missed (motion too small, or outside a zone), the footage is gone a few minutes later. Use 24/7 continuous where that would matter.
Scheduled
Section titled “Scheduled”Choose Scheduled, save the camera, open it again and choose Edit recording schedule. A new camera has to be saved once before the schedule can be edited.
- In Recording schedule, click or drag across the grid to paint hours on or off. Rows are Monday to Sunday, columns are the 24 hours of the day.
- Click a day’s name to toggle the whole day. Select all and Clear set the whole week.
- The blue hours are the hours the camera records. Choose Save schedule.
Inside a window the camera records continuously, the same as 24/7 continuous. There is no “motion only during these hours” mode.
The windows follow the site’s time zone, set in Settings › Environment (see Site and weather), not the server’s clock. A server set to UTC still records 22:00 to 06:00 in your local time, and the windows stay put across daylight saving changes. Aperture checks the schedule once a minute, so recording starts and stops within about a minute of a window’s edge.
A camera in Scheduled mode with no painted hours never records.
Retention
Section titled “Retention”Retention (days) is how long a camera’s footage is kept. The default is 7 days and the editor accepts 1 or more. The janitor deletes older footage on its next pass, every 5 minutes.
Retention is an upper limit. When a destination reaches its space allocation, or a disk runs low, the oldest footage goes first, even if it is younger than the retention. A camera that records to several destinations can keep a different number of days on each, for example 1 day on the local disk and 30 on a NAS. Both are explained on Storage.
Recording quality
Section titled “Recording quality”There are two separate controls: a global choice of which camera stream is recorded, and an optional per-camera re-encode.
Main or sub stream (all cameras)
Section titled “Main or sub stream (all cameras)”Settings › General › Recording quality decides which stream every camera records:
- Prefer high quality — main stream (default): each camera’s full-quality main stream.
- Prefer low quality — sub stream (saves space): each camera’s sub stream, for cameras that have one. Cameras without a sub stream keep recording their main stream.
This is stream copy either way, so it costs no extra CPU. Live view is not affected. Changing it restarts every recorder; recording resumes within seconds.
Re-encoding one camera
Section titled “Re-encoding one camera”By default a camera records exactly what it sends, with no re-encoding and almost no CPU. The three Recording quality fields in the camera editor let one camera record a smaller copy instead:
| Field | Choices | Meaning |
|---|---|---|
| Resolution | Original, 2160p (4K), 1440p, 1080p, 720p, 480p | Maximum picture height. A smaller camera keeps its size; nothing is scaled up. |
| Framerate | Original, 30, 25, 20, 15, 10, 5 fps | Maximum frame rate. Frames are only dropped, never duplicated. |
| Bitrate | Automatic, 8 Mbps, 4 Mbps, 2 Mbps, 1 Mbps, 500 kbps | Automatic uses a constant-quality setting. A fixed value is used as both the target and the ceiling. |
As soon as any field is not Original or Automatic, the recording is re-encoded to H.264, 8-bit, with a keyframe every 2 seconds so it stays seekable. Live view still shows the camera’s own stream at full quality. The re-encode starts from whichever stream the global Recording quality picks.
Re-encoding is also a way to make a camera’s recordings play in every browser: a camera that sends 10-bit H.265 is recorded as 8-bit H.264.
If the re-encoder keeps failing (three exits in a row, each within 30 seconds of starting), Aperture stops trying and records the camera’s original stream instead, and logs recorder: re-encoding keeps failing, recording the original stream instead. A quality preference never costs the footage itself. It tries re-encoding again the next time that camera’s recorder starts: when you change its recording quality or storage, or when Aperture restarts.
The Devices list shows a re-encoded camera’s settings next to its mode, for example “Continuous 1080p · 10 fps”.
If the camera’s stream carries audio, it is recorded with the video. Aperture re-encodes the audio track to AAC at 32 kbit/s instead of copying it, because copied AAC audio came out silent with some ffmpeg versions. The CPU cost is negligible. There is no setting to leave audio out; turn the microphone off in the camera if you do not want it recorded.
Raising events when a camera gets loud is a separate setting, Audio detection, described on Motion detection.
Segments
Section titled “Segments”Aperture records each camera as a sequence of 10-second MPEG-TS files named after their start time, one folder per camera. A segment is added to the footage index once it is complete, so recorded footage trails real time by roughly 10 to 20 seconds.
- Only the first video track of a stream is recorded. Some dual-lens cameras send two video tracks in one stream; give each lens its own camera in Aperture if the camera offers separate streams.
- A segment that grows past 256 MiB without being closed means the stream has no usable cut points. Aperture restarts that camera’s recorder to close the file, so it cannot grow without limit and escape retention.
- When Aperture stops, each recorder is asked to finish the segment it is writing and gets up to 10 seconds to do so, so a restart does not cut off the last seconds.
How the recorder, indexer and uploader work in detail is on The recording pipeline.
Recording, idle and not recording
Section titled “Recording, idle and not recording”Aperture separates a camera that is idle on purpose from one that is broken. Only “Not recording” is a problem.
| State | Devices list | Live tile | Settings › System | Meaning |
|---|---|---|---|---|
| Recording | Recording | a pulsing red dot | rec (green) | Footage is arriving: the newest segment is less than 90 seconds old. |
| Idle | Idle (outside schedule) | nothing | idle | A Scheduled camera outside its windows, or in the first 3 minutes of a window while the first footage arrives. |
| Live only | Live view only | nothing | off | The camera is set to Off. |
| Not recording | Not recording | a red Not recording badge | rec (red) | The camera should be recording, but no footage has arrived for 90 seconds. |
A Motion only camera shows Recording all the time, because its recorder writes continuously.
A camera that records to a network share shows Not recording while the share is unreachable, even though its footage is being kept in the local spool and will be uploaded later. Footage counts only once it has reached its destination. See Storage.
Settings › System lists every camera under Cameras with two more columns:
- Coverage today: for 24/7 continuous cameras, the share of today (since midnight in the site’s time zone) that has footage. Below 95% it is highlighted.
- Last segment: how long ago the newest footage arrived.
A small ↻ badge with a number next to a camera’s name counts the watchdog restarts today.
The Recording filter on the Devices page selects cameras by the same states (Recording, Idle, Live only, Not recording).
The watchdog
Section titled “The watchdog”Two mechanisms keep recordings coming without anyone watching.
- The recorder restarts itself. When a camera’s ffmpeg exits, it is started again after a short pause: 1 second after a long run, doubling up to 30 seconds while it keeps failing within half a minute.
- The watchdog catches a recorder that hangs without exiting. Every 15 seconds it checks each camera that should be recording. If the newest footage is more than 90 seconds old and the recorder has not written anything for 30 seconds, it restarts the camera’s stream in go2rtc and the recorder. It does this at most once a minute per camera and logs
watchdog: recording stale, restarting stream.
The watchdog leaves a camera alone when its recorder is still writing and only the upload to a network destination is behind; restarting the stream would not help there. It also does not restart a camera that has never produced any footage: check that camera’s stream address first (see Cameras).
Troubleshooting
Section titled “Troubleshooting”- A camera shows Not recording. Open it in live view. If live view is black too, the camera or its address is the problem. If live view works, look at the log:
journalctl -u aperture -f. Repeatedrecorder ffmpeg exited; restartinglines name the error ffmpeg reported. - A Scheduled camera records at the wrong hours. Check the time zone under Settings › Environment. Schedules follow it, not the server’s clock.
- A Motion only camera has no footage for an event. Footage is kept only where an event overlaps it. Check that the event appears under Alarms and that the motion was inside the camera’s zones.
- Footage is gone sooner than the retention. A space allocation or the free-space safety net removed it. See Storage.
- The log keeps showing
recorder: active segment not rotating; restarting camera to cap file growth. The stream gives the recorder no point to cut a segment, usually because it carries too few keyframes. Set the keyframe interval (often called “I-frame interval” or “GOP”) to a few seconds in the camera’s own settings.
Related: Storage, destinations and retention · Motion detection · Playback · The recording pipeline