Skip to content

Latest commit

 

History

History
471 lines (297 loc) · 58.4 KB

USER-GUIDE.md

File metadata and controls

471 lines (297 loc) · 58.4 KB

Camera Bridge OS: user guide

Camera Bridge OS turns a small PC into a recorder for your IP cameras (ONVIF / RTSP). You plug in the box, open a web page, add your cameras, and the box shows them live, records them and lets you scrub back through the recordings (section 11). No Mac and no separate NVR are needed. Apple Home is optional: if you want it, the box also shows your cameras there, and Apple Home can record clips with HomeKit Secure Video (section 6). That is separate from the box's own recordings.

You need: a mini PC (see HARDWARE.md), a USB stick or SSD (16 GB or more), and an Ethernet cable to your router (or Wi-Fi, see the Wi-Fi section). Only if you want your cameras in Apple Home: an Apple Home hub (Apple TV or HomePod) and, for HomeKit Secure Video, an iCloud+ plan.

Menu names in this guide ("System" and so on) follow the web UI design and may differ slightly in the build you have.

Status: this is a beta. The system runs on a real mini PC every day and every release is tested in virtual machines, but few models of mini PC have been tried so far. Photos of what you see and hardware reports are welcome.

1. Download

Open the project's Releases page on GitHub and pick the newest release whose tag starts with os-v (for example os-v0.1). Releases tagged v1.0, v1.1 ... are the earlier Mac app (archived), not this.

Download camera-bridge-os-<version>-amd64.img.xz. Optionally also download the .sha256 file and check it:

  • macOS / Linux: shasum -a 256 camera-bridge-os-0.1-amd64.img.xz (Linux: sha256sum) and compare with the number in the .sha256 file.
  • Windows (PowerShell): Get-FileHash .\camera-bridge-os-0.1-amd64.img.xz -Algorithm SHA256

Do not unpack the .xz file; the tools below read it directly.

2. Write it to a USB stick or SSD

Everything on the stick or SSD is erased. Check twice that you picked the right device.

balenaEtcher (macOS, Windows, Linux; easiest)

  1. Install balenaEtcher.
  2. "Flash from file": choose the .img.xz.
  3. "Select target": choose your USB stick / SSD. Etcher hides your system disk by default.
  4. Flash. When it finishes, eject the stick.

The command line (macOS / Linux)

On a Mac:

diskutil list                      # find the stick, e.g. /dev/disk4 (check the size!)
diskutil unmountDisk /dev/disk4
xz -dc camera-bridge-os-0.1-amd64.img.xz | sudo dd of=/dev/rdisk4 bs=4m
diskutil eject /dev/disk4

On Linux (use lsblk to find the stick, for example /dev/sdX; a wrong device name destroys data):

xz -dc camera-bridge-os-0.1-amd64.img.xz | sudo dd of=/dev/sdX bs=4M conv=fsync status=progress

On Windows without Etcher: Rufus (DD image mode) also works.

The first start grows the data partition to fill the whole stick, so the size of the stick does not matter beyond the 16 GB minimum.

3. Start the mini PC from the stick

  1. Connect the Ethernet cable and the power; insert the stick (a blue USB 3 port is best).
  2. Power on and press the boot-menu key repeatedly. Common keys: F7 (Beelink, GMKtec, Minisforum also Del), F12 (Dell, Lenovo, Acer), F9 or Esc (HP), F10 (Intel NUC), F2 / Esc (ASUS). If the boot menu does not show, press Del or F2 to enter the firmware setup and change the boot order there.
  3. Choose the entry for your USB stick; if you see two entries for it, take the one that says UEFI.
  4. If nothing boots: in the firmware setup, turn Secure Boot off and make sure the boot mode is UEFI (not Legacy/CSM). Camera Bridge OS is not signed for Secure Boot.

If a monitor is attached you will see the system start (a few seconds) and then a text screen with the line Web UI: http://camera-bridge.local and the box's network address. There is no login on this screen; everything is set up in the browser.

4. Open the web page

On any computer or phone on the same network open http://camera-bridge.local. (Windows 10/11, macOS, iPhone/iPad and most Linux systems resolve .local names. If yours does not, use the address shown on the box's screen or in your router's list of connected devices, for example http://192.0.2.10.)

The first time, the page asks you to choose an administrator password. Until you do, it shows nothing else. Choose a long password: it protects your camera passwords.

Do this right away, on a network you trust. A new box has no password yet, so whoever opens its page first can set one. On a home network that means only people already on it, and only until you finish this step. Don't plug a new box into a shared or public network. (A one-time setup code that must be typed before the first password can be set is supported by the program but not switched on in this version.)

5. Add your cameras

  1. Add camera (or Discover): the box looks for ONVIF cameras on the network, and for Hikvision cameras (and the ones it makes for others, such as ANNKE) with Hikvision's own search, SADP. You can also enter a camera by hand: type, address, port, user name and password.
    • Found a camera on another network (192.168.1.64). A Hikvision-family camera whose address is on none of the box's networks (often 192.168.1.64, Hikvision's factory address, after its DHCP was turned off) can't be added until it is back on your home network. Open its page with Hikvision's SADP tool, or from a computer on that network, turn on DHCP, then press Check again.
    • A camera that hasn't been set up yet (no admin password) shows Open the camera's web page and Check again: choose its password there first.
  2. Use Test before saving. It checks the credentials and shows what the camera sends (video codec, audio).
  3. Give each camera a name. Save.

Tips: give the cameras fixed addresses (a DHCP reservation in your router), and use a separate camera user with a strong password. Cameras on a different VLAN need your router to allow the box to reach them.

Set up for Camera Bridge (offered right after you add a Hikvision, Reolink, Amcrest or ONVIF camera, and in its page's Camera setup section) makes the camera right for the box in one step: its streams for recording, Apple Home and live view, its own on-screen labels off, the box's time zone, its clock set from the box, and on Hikvision cameras Hik-Connect (the maker's cloud) and UPnP off. It reads the camera first and shows every change (now → after) before anything happens; it saves the camera's settings first, and Restore original settings puts them all back. It never changes the camera's address, ports, users or passwords (the choice Fix its address so the DNS stays, below, keeps the address exactly as it is), and it restarts the camera only when you press Restart the camera now. The box answers time requests from your local network only (the firewall allows nothing else).

When a step can't be done. A step the camera refuses or doesn't support says why, and Change it by hand under it says where to change it yourself (the camera's app or web page) and what to enter, with the box's own address on your network filled in for the camera's DNS and time server (for example "Preferred DNS server" and "Alternate DNS server" both the box's address). Menu names Camera Bridge has not confirmed for your camera come with "Menu names differ between models": look for the closest match. If the camera says the account Camera Bridge signs in with may not change a setting, change it by hand or give Camera Bridge an administrator account on the camera; the setup still does every other step. For Watch its internet, your router can do it instead if it can hand one device its own DNS server (OpenWrt, pfSense, OPNsense, MikroTik, ASUS, Pi-hole; eero, Google/Nest Wifi, Deco and Orbi can't): reserve the camera's address and have the router hand that camera the box as its DNS server. This works only while the camera takes its DNS automatically (DHCP), and only from its next DHCP renewal or restart; it counts too, but can change when the router renews the address. Or block the camera's internet. After changing a camera's DNS yourself, press Check again on the camera's Security card: once its DNS asks only the box, the Internet guard watches it, whoever changed it. The Security card shows the same help under anything the setup can't change, and under Not watched when the camera's DNS is why. Restoring original settings shows no such help: it only says what could not be put back.

Watch its internet (the Internet guard). This step points the camera's DNS (the server it asks to look up names) at the box. The box answers every name with "does not exist", so the camera can't find its maker's cloud, and the camera's Security card shows what it tried. Camera Bridge puts the box in both of the camera's DNS slots and gives a slow camera up to 30 seconds to take the change. Dahua, Amcrest and Lorex cameras are changed through their own settings first. A DNS change never costs a camera its address: a Hikvision-family camera (ANNKE included) that takes its address from DHCP is never changed through ONVIF, as some of them turn DHCP off when their DNS changes that way and come back at 192.168.1.64 (the step says so, with Change it by hand); and if any camera turns its DHCP off when its DNS changes, Camera Bridge turns DHCP back on at once and the step says so.

  • Fix its address so the DNS stays. Some cameras keep a DNS server set by hand only while their address is fixed (a Hikvision on DHCP, a Jennov, an ONVIF camera that dropped the change). For those, the preview offers this choice, off unless you tick it. It keeps the camera's address, mask and gateway exactly as they are, turns DHCP off on the camera and points its DNS at the box. Then reserve that address for the camera in your router (the result shows the camera's hardware address), so nothing else takes it. Restore original settings puts DHCP back.
  • Restart the camera now. A camera that needs a restart to use its new settings (a Hikvision's "Reboot Required") shows this button in the setup's result and on its Security card. Camera Bridge restarts a camera only when you press it; the camera is then off the network for about a minute.
  • Setting the DNS by hand. Where Camera Bridge can't, Change it by hand under the step (and on the Security card under Not watched) has a button Open the camera's web page, says what the camera asks now and what to change ("Right now it asks 192.168.77.1 and 192.0.2.53. Change both to 192.168.77.28."), has a Copy button for each address, and shows the menus of the camera's maker. For a camera that needs a fixed address first, it says which address, mask and gateway to keep and to reserve in your router. It also warns of what lets a camera go around the box: a public or empty second DNS server, IPv6 left on (when Camera Bridge read it on: turn IPv6 off on the camera), a restart the camera asks for, and a camera plugged into a recorder's own ports (set its DNS on the recorder).
  • Local only. The Security card's top level needs a full day of watching without an internet lookup, and at least one lookup seen from the camera (any name, its home network's own names too). A camera that never asks the box may have a DNS server of its own built in, so until the box sees it ask, the card stays at Good and says "No lookups seen yet; Camera Bridge can’t rule out a built-in DNS server."

Straighten the picture

A camera that joins two lenses into one wide picture (a panorama camera) can show the horizon as a curve, most when it points at the sky. On the camera's page, the Straighten the picture card (below Labels on video) flattens it again, with two sliders:

  • Straighten (−60 to 60) takes the curve out of the horizon. Level (−40 to 40) tips the picture, for a horizon that leans. Reset puts both back to 0, which is off.
  • The camera's preview on the page bends as you drag, and a guide line on it shows the height the horizon lands on. Move the sliders until the horizon sits on the guide. A slider saves when you let go of it (with the arrow keys, when you pause). Nothing restarts, and no recording is cut.
  • The picture keeps its shape: nothing is cropped and no black bars appear. A strong setting stretches parts of the picture, and the card says by how much once it is 2× or more ("At this setting parts of the picture are stretched up to 2.7×."). Gentle settings look best.

The correction shows everywhere that camera is seen: its page, live view, the Monitor, recordings as you play them, the Watch screen, zoom, snapshots, Apple Home's live view and tile pictures, and HomeKit Secure Video.

  • Recordings on the box keep the camera's original picture. Only what is shown is straightened, so you can change the setting later, or turn it off, and every recording follows.
  • Apple Home: while a camera is straightened, the box converts its video for Apple Home instead of passing the camera's own stream through. That uses more of the box's processor for that camera, so on a busy box straighten only the cameras that need it. A live view already open straightens at once; a HomeKit Secure Video recording keeps the way it started until the next one.
  • Saved clips (Save clip, then Export clip, on the Monitor and the Watch screen) are straightened by default. For a camera whose correction is on, the clip bar has a Straightened checkbox: unticked, the clip is saved as recorded, which is quicker. Your browser remembers the choice.
  • This is in Camera Bridge OS only, not in the Mac app.

6. Add them to Apple Home

Every camera appears in Home as its own accessory.

  1. In the camera's page in the web UI, show the pairing code (QR code and 8-digit code).
  2. On your iPhone: Home app > + > Add Accessory > scan the QR code (or enter the code manually).
  3. Home asks you to name the camera and choose a room, and whether to enable recording (HomeKit Secure Video: needs an iCloud+ plan and a home hub).

If Home says "Accessory not found", check that the phone is on the same network, wait a minute for the box to finish starting, and see Troubleshooting.

Removing a camera from Camera Bridge keeps its Apple Home pairing for 30 days: add the same camera again within that time (Camera Bridge knows it by its serial number) and Home keeps it as the accessory it was, with its room, name and recordings settings; no new pairing is needed. After 30 days the pairing is deleted, and the camera added again pairs as a new accessory. If you won't add it again, remove it from the Home app as well.

7. Install to the internal SSD (recommended)

Running from a USB stick works, but an SSD is faster and lasts longer. You can copy the system to the machine's internal disk.

This erases the whole internal disk. The installer refuses the disk it is running from and any disk that is in use, shows what is on the disk, and asks you to type a confirmation sentence.

In the web UI: System > Install to a disk in this machine. Choose the disk from the list (disks that can’t be used are listed with the reason and have no button), choose whether to copy my settings and pairings (otherwise the new system starts empty; the copy also includes the recordings folder, which can be hundreds of GB and may not fit, so install first and switch Record on afterwards), type the sentence shown (ERASE ALL DATA ON <disk name>) and confirm. It takes a few minutes. When it says it is done, the box powers off: remove the USB stick, then switch it on again. If you copied your settings, do not run the USB stick again afterwards (two boxes with the same pairings would confuse Home).

From a terminal (SSH, see "Advanced"):

cb-install-to-disk --list                                 # which disks can be used
cb-install-to-disk --device /dev/nvme0n1 --dry-run        # shows exactly what would happen, changes nothing
cb-install-to-disk --device /dev/nvme0n1 --copy-data      # asks you to type: ERASE ALL DATA ON nvme0n1 (copies recordings too)

8. Updates

The box checks GitHub for a newer os-v... release every day. In System you can switch on automatic updates (the box then installs and restarts at 3 AM in the bridge's time zone, set in Settings; UTC until one is set) or press Install update. A new version is checked (signature and SHA-256), written next to the current one, and the current one stays as a fallback: if the new version does not start properly three times, the box returns to the old one by itself. Details: UPDATES.md.

9. Factory reset

This erases your cameras, passwords, HomeKit pairings and all recordings made with Record (the cameras then have to be removed from Home by hand and added again). The confirmation in the web UI says so. It also forgets the saved Wi-Fi networks and their passwords, SSH and its keys, and the log of earlier starts, so a box you give away tells nothing about your home: a box on Wi-Fi opens its setup hotspot again after the reset (section on Wi-Fi). A recording drive or an archive drive is left as it is.

  • In the web UI: System > Factory reset (type RESET to confirm).
  • From a terminal: cb-system factory-reset --yes.
  • If the web UI cannot be reached: write the image to the stick again (this also resets everything on that stick).
  • Advanced: create an empty file named camera-bridge-factory-reset in the top folder of the stick's small boot partition (label CB-ESP) and start the box; it erases the settings and the recordings during start-up and removes the file. On Linux that partition mounts like any FAT disk. macOS and Windows hide this kind of partition: on macOS use diskutil list and sudo diskutil mount /dev/diskNs1, on Windows use diskpart and assign a letter. (These two have not been tested.)

10. Advanced: SSH

SSH is off by default. To use it, enable it in System > SSH and paste your public key; only key login for the user root is possible, no passwords. From a terminal on the box you can then use cb-update, cb-system, cb-install-to-disk, journalctl -u camerabridged, vainfo. Turn it off again when you are done.

11. Record, watch and scrub (the NVR)

Two different things are called recording, and neither needs the other:

  • HomeKit Secure Video (section 6): Apple Home records clips of events to iCloud. The box only streams to your Home hub and stores nothing.
  • Record (this section): the box keeps the camera's own full-quality video on its own storage, around the clock, and you can watch it in this web page. It is optional, it stays off until you switch it on for a camera, and it works without Apple Home or iCloud.

What gets recorded

With Record on, the box writes the camera's main stream exactly as the camera sends it. Nothing is converted, so the picture keeps the camera's full quality and recording needs no video encoding. It uses the stream the box already receives for Apple Home, so it puts no extra load on the camera.

The files are ordinary fragmented MP4 files with a small index file beside each, in /var/lib/camera-bridge/recordings/<camera id>/<date>/<time>.mp4, named with the box's own clock, which is set to UTC. A new file starts about every 15 minutes, and also when the camera reconnects or changes its picture settings. If the power is cut, the last half minute or so may be missing, and the box repairs the file it was writing when it starts again.

Turn Record on

Record has a switch on the Record card of each camera's page and in the corner of each camera on the Cameras page. Nothing is recorded until you switch it on for a camera.

The first time, the page asks Where should recordings be stored? and lists the places the box offers. On a box that is one place, This box’s storage, with its free and total space. Choose it and Record turns on. Cancel changes nothing and leaves Record off.

Turning Record on or off does not restart the camera, so Apple Home live view and HomeKit Secure Video carry on undisturbed.

Record sound is a second switch under Record. It is off by default, and it records sound only while Camera audio (the Audio card on the camera's page) is on. The page plays the sound at normal speed (1×): press the speaker on a camera to hear it. It is silent while you drag the timeline, while paused and at other speeds.

A camera that is recording shows REC. If Record is on but the camera is not sending video, the page shows it as waiting, and recording carries on by itself when video returns. When recording has to stop, a banner says why and what to do (see Troubleshooting).

Where recordings go, and how much fits

Settings > Recording shows where recordings are stored, how much space they use, how much is free, and the oldest and newest recording. Two limits decide how long recordings are kept, and both apply, oldest first, across all cameras:

  • Keep for: 1, 3, 7 (the default), 14, 30 or 90 days.
  • Maximum size: 100, 250, 500 (the default), 1000, 2000, 4000 or 8000 GB. Gigabytes here are decimal: 1 GB is 1,000,000,000 bytes.

Recordings older than Keep for are deleted, and then the oldest recordings go until the total is under Maximum size. The box does this about once a minute, only ever deletes its own recording files, and never deletes anything just because the disk is getting full. Nothing is deleted for its age until the box knows its clock is right (it has set the clock from the internet, or it has been running for a day), nor for a day after its clock jumps forward; Maximum size still applies all the time. So a box without the internet keeps recordings up to a day longer than Keep for each time it starts. If you lower a limit so that recordings would be deleted, the page tells you roughly how many gigabytes and asks first. On a small disk the box may keep less than you chose; Settings shows the real limit.

The size limit usually decides first. Video costs about 10.8 GB a day for each megabit per second of the camera's bit rate:

Camera bit rate One camera, a day Seven days of it Days that 500 GB holds, one camera Days that 500 GB holds, four cameras
2 Mbps 21.6 GB 151 GB 23.1 5.8
4 Mbps 43.2 GB 302 GB 11.6 2.9
6 Mbps 64.8 GB 454 GB 7.7 1.9
8 Mbps 86.4 GB 605 GB 5.8 1.4

Settings shows the same sum for your cameras, for example "About 43 GB a day. This storage holds about 2.3 days, fewer than the 7 days you chose, so older recordings are deleted sooner." When the storage holds fewer days than Keep for, that smaller number is what you will really have.

The same partition holds the box's settings, HomeKit keys and update downloads, so recording keeps a reserve free: it pauses when free space falls below 8 GiB or 5% of the partition, whichever is more, and starts again when there is 1 GiB more than that. (A GiB is 1.07 GB.) The reserve is more than the 4 GB an update needs, so recording leaves room for updates. A banner warns when less than 5 GiB remains above the reserve. A 16 GB stick has at most about 1.4 GiB above the reserve before the file system takes its part, and one that holds less than about 14.5 GB has no room above the reserve at all, so recording would pause soon, or even at once: install to an SSD of 64 GB or more (section 7) and switch Record on afterwards.

A factory reset erases the recordings (section 9).

Watch and scrub

Open a camera's page and press Watch recordings. The Watch screen shows the picture on top, a row of controls under it and the timeline below.

  • Play or Pause, the time of the picture (in your browser's time zone), Go live and the Record switch are in the row above the timeline.
  • The buttons 10 min, 1 h, 6 h, 24 h and All choose how much time the timeline shows, and − and + zoom out and in. All is everything that is recorded.
  • The wave in the timeline shows how much was going on: the amount of picture change the camera had to send. A quiet night is low, a person walking past is high. A dashed line marks what is normal for that camera (the middle value of the last 24 hours); bars more than one and a half times above it are amber. Hatched stretches have no recording.
  • Click or drag the timeline to look at any moment. In Chrome the picture follows you one key picture at a time while you drag; in other browsers it catches up when you pause. When you stop, the exact picture arrives a fraction of a second later. When you let go, the video plays from there. Let go within a few seconds of now, or later, and it goes live.
  • If nothing was recorded at the moment you chose, the page keeps the last picture, says there is no recording at that time and offers to jump to the next recording.
  • Hold Ctrl or Cmd and turn the mouse wheel to zoom around the pointer; Shift with the wheel, or a sideways swipe, moves along the timeline. The shortest view is one minute.
  • Keys, when the focus is not in a text box: Space plays or pauses; Left and Right move 1 second (with Shift 10 seconds, with Alt 1 minute); L goes live; + and - zoom the timeline; Home goes to the oldest recording; Esc goes back to the camera’s page.
  • When the camera's key pictures are more than 4 seconds apart, a note under the timeline says scrubbing will be coarse and shows how to fix it on the camera (see "Cameras that jump while you scrub").

What "live" means here

On the Watch screen and the NVR page, Live shows the newest part of the recording: the real picture a few seconds late, about 6 seconds, because the page stays a little behind the newest piece so that playback never has to wait. The page shows the real delay.

Live needs Record. With Record off, or while recording is paused or waiting, the page shows what the camera page has always shown: a slideshow of snapshots with a new picture every few seconds, labelled "Picture changes every few seconds". The box does not make a low-delay live video for browsers yet. Turn Record on for smooth video. Apple Home's live view is separate and unchanged.

All cameras at once: the NVR page

The Monitor (the first page) is a wall of your cameras (9 on a page by default, with arrows to move between pages) playing live, with Live shown under it. The recordings share one playhead and one timeline: drag or click the timeline and every camera shows that moment, Play and Pause play them together, and Live (at the right end of the row, where the timeline's live edge is) returns to the live picture. Click a camera to open its Watch screen at the same moment, and use your browser's Back button to return. The wave in the timeline combines the cameras: at each moment it shows whichever camera is busiest compared with its own normal.

Speed. The speed menu beside Play has four groups: Slow (¼× and ½×, slow motion), Normal (1×, the only speed with sound), Fast (2×, 4× and 8×) and Time-lapse (30×, 60×, 120× and 300×: at 30× a minute passes in 2 seconds, at 300× five minutes pass in a second). A time-lapse shows one picture of each camera every half second, so it moves in steps; it skips the times nothing was recorded and goes live at the end.

Pause means paused. After you press Pause, nothing plays until you press Play: dragging or clicking the timeline, choosing an event, jumping, stepping and changing the speed all leave the recordings paused and show the picture at the new time (a new speed applies when you press Play). Going live always plays live. While paused, the time shows tenths of a second.

Picture by picture. While paused, the buttons on either side of Play (or ← and →) step one picture back or forward. A step never plays.

Keys (the keyboard button beside Live lists them): Space play or pause; ← → one picture while paused, a second while playing; Shift + ← → a minute; Alt + ← → ten seconds (on a focused camera, Alt + arrow moves the camera instead); , and . slower and faster; L live; C save a clip.

Saving a clip. Save clip shows a red band on the timeline: by default the 30 seconds before the playhead (or after it, when there is less recorded before). Drag either red edge to change it (or focus an edge and use the arrow keys), or choose 10 s, 30 s, 1 min, 5 min or 15 min in the clip bar. A clip can be up to 2 hours for each camera. Time-lapse in the clip bar saves the range sped up (30× to 300×; an hour at 60× is a minute of video), made on the box from the key pictures, without sound. Export clip saves it; Esc or Cancel removes the band.

A browser can only decode so many pictures at once, so it may play fewer cameras than the page shows. A note then says, for example, "This browser plays recordings for one camera at a time on this page. The other cameras stay on snapshots; open one to watch it." At present Chrome on a Mac plays one camera at a time here.

Four to a page is the default because a modest computer, a phone or Wi-Fi may not keep up with more. To show more cameras on a page, add ?tiles=6 (up to 9) to the address before the #.

Cameras that jump while you scrub

A video is a full picture (a key picture) every so often and small changes in between. Scrubbing jumps from key picture to key picture, so it is only as fine as the camera's key picture interval. A camera with a "smart codec" mode (names like H.264+, H.265+ or Smart Coding) can stretch that interval to 10 or 30 seconds to save space, and its recordings then scrub in jumps that long. When the box measures more than 10 seconds, the camera's page shows a note, "keyframe every N s: scrubbing is slow".

To fix it, switch the smart codec off in the camera's own settings and set its key picture interval (often called the I-frame interval) to about twice its frame rate, which is one every 2 seconds. The change applies to what is recorded from then on; older recordings stay coarse.

The note under the timeline on the Watch screen also has a button, Make scrubbing smoother…, that changes the camera's encoder settings for you. It asks first and lists what it can change, because it is the same optimizer that prepares a camera for HomeKit: it can lower a bit rate above 6 Mbps to 6 Mbps, change H.265 to H.264, keep the frame rate between 15 and 25 frames a second and change the video profile. It restarts the camera's stream, which leaves a short gap in the recording, and Undo changes, right after it has run, puts the settings back.

Browsers

Recordings are played by your browser's own video player, so what plays depends on the browser:

  • Safari and Chrome on a Mac are the supported browsers. In Chrome the picture follows you while you drag the timeline; in Safari it catches up when you pause.
  • Safari on an iPad should work too. An iPhone cannot play recordings yet: the page says "Recordings can’t be played on an iPhone yet. Open this page on a Mac or an iPad." and keeps showing snapshots.
  • Firefox should play H.264 recordings. Cameras that send H.265 (HEVC) should play in Safari; Chrome plays them only if your computer can decode H.265 in hardware.
  • If your browser cannot play a recording, the page says so and keeps showing snapshots. The switches, the settings and the storage numbers still work.

This is the same at the plain address (http://camera-bridge.local) and at the secure address (see "The secure address"). The plain address sends browsers on to the secure one while the secure address works, so you may find yourself on https:// without asking for it. Both play the same.

12. AI descriptions of events

Optional, and off until you turn it on. When something happens at a camera (motion, a person, a vehicle, an animal, a package, a face or a doorbell ring), the box can ask an AI service to write one short sentence about it, such as "A delivery driver leaves a package at the front door". Tamper, sound and alarm-input events are not described. Nothing else depends on it: viewing, recording, Apple Home and the Internet guard work the same with it off, or when the service is down.

The sentence is kept with the event and shown in two places:

  • The Monitor's events list: on its own line under the kind of event. A red dot marks an event the service rates an alarm (a likely break-in, someone at a door handle, a covered face at a door or window), an amber dot an unusual one. "Nothing notable", dimmed, means it saw nothing worth saying (shadows, trees, rain). The sentence arrives a few seconds after the event, and the row fills in by itself.
  • The camera's page, on the AI descriptions card: the camera's last description with its time.

It needs your own account with the AI service and your own key. Camera Bridge does not supply one, and the service charges you whatever it charges for each description.

Set it up

  1. Get an API key from the service: Claude (Anthropic), or any OpenAI-compatible service (OpenAI, OpenRouter, or a model on your own network such as Ollama or LM Studio).
  2. Open Settings > AI descriptions and choose the Service. For Claude the Model is filled in with the least expensive one that reads pictures (claude-haiku-5-5 at the time of writing); leave it on the default unless you know another model works with Camera Bridge. For an OpenAI-compatible service type its Address, like https://api.openai.com/v1, or http://192.168.77.10:11434/v1 for a model at home (which may need no key), and the name of a Model that can see pictures.
  3. Paste your key into API key and press Save. The key stays on the box and is never shown again; the card shows only its last four characters.
  4. Choose a camera and press Try it. The box sends that camera's pictures from this moment to the service, then shows the sentence and how long it took, or says in plain words what is wrong ("The key was refused", "The service needs a key", "The service refused the request; check the model name", "The service could not be reached"). Try it sends the pictures even when the camera's AI switch is off, because you pressed it. It counts toward the day's limit and stores nothing.
  5. Open the page of each camera you want described and switch Describe events with AI on. Every camera starts with it off.

AI descriptions also need a place for recordings (Settings > Recording), because the events are kept beside the recordings. Record itself does not have to be on. With no place chosen the card says so, and no event is kept or described.

What leaves the box

For each event on a camera whose switch is on, the box sends the service up to five still pictures from around the event: up to two from just before it, one at the moment it started and up to two from just after, each a small JPEG at most 768 pixels wide. With them go the camera's name, the kind of event and the local time. No video, no sound, nothing else, and nothing at all from a camera whose switch is off (the one exception is what you send yourself with Try it). The pictures are not kept on the box; only the sentence is. What the service does with them is up to that service's own terms, so read them, or use a model on your own network.

With a model at home (an http:// address on your own network) the pictures stay on your network. An http:// address is not encrypted, so use one only for a model on your own network. Anything on the internet should be an https:// address.

The box never follows a redirect from the service: the key and the pictures go only to the address you saved. If that address answers with a redirect (a typo, a gateway, a captive portal) the card says "The service tried to send the request elsewhere; check the address." and nothing is sent on.

While a camera's switch is on and the service is not on your home network (Claude, or an address that is not a private one such as 192.168.x.x or 10.x.x.x, nor a .local or .lan name), that camera's Security card adds one line: "Its event pictures go to Claude for AI descriptions." (or the service's address). The camera's badge, such as Local only, is about the camera's own internet traffic and does not change.

Limits

  • Events are described one at a time, and at most one per camera a minute: an event within a minute of the last event picked on that camera gets no sentence.
  • A set of pictures that waits more than a minute for its turn is dropped.
  • At most 200 descriptions a day for all cameras together. You can change the Daily limit (1 to 5000). When it is reached, events are kept without a description until midnight, and the card says so. The card shows today's count and the last seven days; the count is kept on the box, so a restart does not reset it.
  • If the network fails or the service has trouble, the box tries once more, unless you have turned the camera's switch off, chosen Off or changed the service meanwhile: then nothing more is sent for that event. The same goes for the pictures being made. If the service refuses the key, it stops describing and the card says so; save a new key, choose another service, or press Try it and see it work, to start again.

Turn it off, and delete the key

  • One camera: switch Describe events with AI off on its page. Nothing more is sent for that camera.
  • All cameras: in Settings > AI descriptions choose Off as the service and press Save. This also removes the saved key.
  • Just the key: press Remove beside the saved key and confirm. The box forgets it. A service that needs a key then describes nothing until you save one again.
  • Changing the service (or, for an OpenAI-compatible one, the server in its address) also removes the saved key, so a key is never sent to a service it was not made for. Type the key of the new one.
  • A factory reset (section 9) erases the key along with everything else.

Sentences already written stay with their events and go when the recordings' rules delete those days (Keep for and Maximum size, section 11).

13. iPhone, iPad and CarPlay

The Camera Bridge app for iPhone and iPad is coming and is not available yet, so nothing here can be tried on a phone today. When it is, it will watch the same cameras as the Apple TV app, live and recorded, and pair the same way: open the app on the phone, and it shows an 8-letter code (and a button that opens this page on the phone). In the web page, go to Settings › Security › Apple TV and iPhone, type the code into Add a device, and press Add. The phone never needs your password. Remove on the same card stops a device at once. Up to 20 devices can be added in all, Apple TVs and phones together.

  • At home, and away from home with Away from home. The phone finds the box and plays video on your home network by itself. To watch from anywhere else, turn on Away from home (section 14), which needs IPv6 at home and, once the app's update is out, a switch in the app.
  • AirPlay and CarPlay play a little behind. The phone's own screen shows live video under a second behind. Sending it to a TV by AirPlay, or to a car screen, goes through a different kind of stream (called HLS) that runs about 7 to 17 seconds behind and takes about 7 seconds to start when the camera sends a key frame every 2 seconds. A camera with longer key frame intervals is slower: about 14 to 16 seconds to start at 4 seconds, and about 32 seconds at 10 seconds, with the delay growing the same way.
  • CarPlay needs Apple's approval and a car that supports CarPlay video. Apple has to approve the app for CarPlay, and few cars show video from a phone at all. No car is known to work yet, so treat CarPlay as something that may come, not something to count on.

14. Away from home

Away from home lets your iPhone, or any device with the WireGuard app, watch your cameras from anywhere, straight from your home, with nothing of ours in between: the device makes a private connection (a VPN) to your box over the internet. It is off until you turn it on, and the box opens its one port for it only while it is on.

What it needs

  • IPv6 at home. Phones reach the box over IPv6, so your internet connection must have it (Starlink and many cable and fibre providers do). Without it the card says so, and you can ask your provider whether they offer it. Homes that have only IPv4 can't use Away from home yet.
  • IPv6 where the phone is. Cellular works. A Wi-Fi network without IPv6 (common in hotels) can't reach your home: turn Wi-Fi off and use cellular there.
  • The secure address (see "The secure address"). Turning Away from home on turns it on too, and says so. While Away from home is on, the box refuses to turn the secure address off.

Turn it on

  1. Open Settings › Away from home and turn on Use Away from home. The card first says it is looking at how your home reaches the internet, then shows what is left to do.
  2. Do the router step, if the card shows one (below).
  3. Turn on Away from home in the Camera Bridge app on your iPhone, or add a device for the WireGuard app (the phone step, below). The card shows this step until a device has Away from home.

The router step

Most routers do not let anything in from the internet, even over IPv6, so most need one rule: let UDP port 51820 through to the box. The card shows the box's address on the internet and says which rule to add for your router.

eero. The card gives these steps for an eero:

  1. In the eero app: Settings › Network settings › Reservations & port forwarding › IPv6 firewall rules › Add.
  2. Choose the device that is the box. The eero app lists devices by name and may show it under a name you gave it; the address in the next step tells you which one it is.
  3. Choose the address ending in the last groups of the address the card shows (exactly that one). The eero app offers each of the box's addresses, temporary ones too, and only the one the card names keeps working.
  4. Enter port 51820, UDP.

Any other router. Allow incoming IPv6 traffic to the address the card shows, UDP port 51820. Routers usually keep that setting with their firewall or port forwarding settings, often under IPv6. Steps for other brands are added when someone has tried them.

The rule names an address, not "the box", so give the box a fixed address in your router if it can (see "When your home's address changes").

The phone step

  • The Camera Bridge iPhone app has its own switch: in the app, at home, with the phone paired, open Settings › Away from home and turn it on (iOS asks once to allow a VPN). That switch comes with an update that is not out yet.
  • Meanwhile, or for any other device, use the free WireGuard app. On the card press Add a device with the WireGuard app, give the device a name, and scan the QR code the card shows with the WireGuard app (on a computer, copy the text under it instead). The code is shown once: the box keeps only the device's public key, so it can't show it again. If you lose it, remove the device and add it again.
  • A device added with the WireGuard app also opens the box's secure address, so a laptop can use the web page from away. AirPlay and CarPlay are for the iPhone app only.

Check that it works

Under Check, the card says how: on your iPhone, turn off Wi-Fi and open the Camera Bridge app; on a device with the WireGuard app, turn the tunnel on while the device is off your home network (on a phone, turn off Wi-Fi). When the box is reached from away, the card shows "Reached from away:" with the device's name and when it last reached the box. The card's states mean:

The card says What it means
Off Away from home is off. Nothing is open.
Looking at how your home reaches the internet The box is checking. Wait a moment.
Phones can't reach this home from outside yet The internet connection has no IPv6. Ask your provider.
On your router Away from home is on, but no device has reached the box from away yet. Do the router step and the phone step.
Reached from away: name, time It works. One line for each device; a device that hasn't been heard from away yet says so.
Your home's address changed See the next part.
A problem, with Try again The card says in a sentence what failed. Try again repeats the last choice, and while Away from home is on it also asks the website again at once. When the website itself has a passing fault, the card shows no problem: the box tries again by itself.

A removed device is cut off at once. If the box's system could not take a removal yet, the card says "A removed device can still connect until the box's retry goes through." and the box keeps trying.

When your home's address changes

Some providers change your home's IPv6 address now and then. The box notices and tells the website within a minute or two, and phones with the Camera Bridge app follow by themselves. But:

  • The router rule names the old address, so it probably stops working. The card then says Your home's address changed and shows the new address and the router step again: change the rule to the new address. Give the box a fixed address in your router (a reservation, if it has one) so the rule keeps pointing at the box, and so the address that devices added with the WireGuard app were given stays the box's.
  • Devices added with the WireGuard app keep the home's old address in their configuration. After a change, remove each one and add it again to get a new code (the card says so while there is such a device).

Turn it off

Turn the switch off. The box closes the port, takes the VPN down, deletes its key and every device's key, and asks the website to delete the record, so every device has to be set up again to use it. If the website can't be reached then, the box keeps trying until the record is gone. A device you remove on the card loses its way in from away at once (a phone stays paired and keeps working at home). A phone you remove in Settings › Security › Apple TV and iPhone loses its VPN key together with its pairing. A factory reset removes it all.

What leaves the box

The website, camera-bridge.app, learns one thing: the box's IPv6 address, which it publishes as a DNS record under a random name (the away name; it never gets a certificate). Nothing of ours carries video, keys or requests: your phone connects to your box, nothing in between. The website is an outside dependency: if it is down, phones use the address they last knew. Through the VPN, a device reaches only the box's own web page; it can't reach your cameras or anything else in your home, and the box forwards nothing.

What it can't do

  • AirPlay to a TV works at home only. The TV fetches the video itself and isn't in your phone's VPN. CarPlay should work away from home when the phone sends the video to the car; that is expected, and still to be confirmed in a car.
  • One VPN at a time on iOS. A phone that is using another VPN can't also use this one while that one is on.
  • Networks that refuse a public name pointing at a private address ("DNS rebind protection", on by default in some routers) can't reach home, even through the VPN. Cellular is not affected.
  • IPv6 only, for now. Homes that have only IPv4 (with a shared address from the provider) can't use it yet.

Troubleshooting

Problem What to try
The PC does not boot from the stick Boot menu key (section 3); Secure Boot off; UEFI mode; try another USB port (USB 2 ports are fine for booting but slow); write the image again.
camera-bridge.local does not open Wait two minutes after power-on (the first start sets up the disk). Use the address shown on the box's screen or find it in your router. Make sure your computer is on the same network (not a guest network). Type http://camera-bridge.local with http://: https://camera-bridge.local has no certificate. The secure address is a different name, shown on the System page.
The box has no address Check the Ethernet cable and the router's DHCP. If you connected it straight to a Mac, wait up to a minute for the 169.254.x.x link-local address and open http://camera-bridge.local.
The page loads but cameras are not found The box and the cameras must be on the same network segment (or the router must allow traffic between them). Add the camera by hand with its address. Use the Test button to see the error.
Home says "No Response" The box must be on and reachable; the iPhone must be on the same network for the first pairing; a home hub (Apple TV / HomePod) is needed for remote access and recording. If you reinstalled the box without copying the settings, remove the old accessory from Home and pair again.
The picture is jerky or the box is hot Too many cameras for the CPU (see HARDWARE.md), or the cameras send H.265. Lower the camera's bit rate; use H.264.
The clock is wrong The box sets its clock from the internet (NTP). It needs internet access for that; wait a few minutes after a power cut. System > Box health says whether the clock is in sync. Without the internet the box keeps its own time, and it never goes back before the last time it knew (a computer with a flat clock battery). Until the box knows its clock is right, or has run for a day, it deletes no recording for its age (section 11).
It runs, but slowly, from a USB stick Use a USB 3 port and a better stick, or install to the internal SSD (section 7).
After an update the old version came back That is the safety net working: the new version did not start properly. See UPDATES.md; the web UI (or cb-update status) says why. Try again later or report it with the diagnostics export.
Logs Web UI > Logs, or the diagnostics export. Over SSH: journalctl -u camerabridged -b, journalctl -b -p warning.
Power cut The data lives in a journaled file system and recovers by itself. Do not pull the power during an update more often than you must; the old version is kept anyway.
A notification says "Recording Can’t Continue" (it slides in at the top right for a few seconds; the Notifications page keeps it) Read the sentence under the title. "Choose where to store recordings." means Record is on but no place was chosen: press the notification's button. "There isn’t enough free space on the recordings drive." means the reserve described in section 11 was reached; nothing is deleted to make room, so lower Maximum size (or Keep for) in Settings > Recording, or use a bigger disk. "The recordings folder isn’t available." or "The drive isn’t answering." should not happen on the box's own storage: restart the box, and if it comes back, export the diagnostics and report it. Recording carries on by itself when the problem is gone.
A notification says "Recording Storage Almost Full" Less than 5 GiB is left above the reserve. Recording goes on until the reserve is reached. Lower the limits or use a bigger disk (section 11).
Record is on but nothing is recorded The camera is not sending video (look at its page), or the box is still loading its list of recordings after a start; wait a minute.
The video does not play, and the page says the browser cannot play recordings Use Safari or Chrome on a Mac. A camera that sends H.265 should play in Safari, or in a Chrome that can decode H.265. Snapshots, switches and settings still work.
Live looks like a slideshow Record is off or paused. Live video is the newest part of the recording: switch Record on (section 11).
The picture jumps by many seconds when I drag the timeline The camera sends a key picture only every N seconds (a "smart codec"). See "Cameras that jump while you scrub" in section 11.
The times are wrong The box takes its time from the internet. If a camera's clock is more than a minute away from the box's, the box stamps the recordings with its own clock. The page shows times in your browser's time zone.
Events have no AI description Look at the AI descriptions card in Settings: it says if the key was refused, a key is missing, the day's limit is reached, or no place for recordings is chosen. Then check that Describe events with AI is on for that camera, that the event is a motion, person, vehicle, animal, package, face or doorbell event, and that the camera had no other described event in the last minute. Try it says in plain words what is wrong.

What this version does not do

  • No Secure Boot, no disk encryption (the secrets file on the data partition is protected by file permissions, not by a TPM yet).
  • Only amd64 mini PCs; Raspberry Pi 5 is planned.
  • The box is for your local network. Do not forward ports to it from the internet; the one exception is the IPv6 rule that Away from home asks for on some routers (section 14), which lets in a single port for a single address. The iPhone app and its HLS streams work away from home through Away from home, once it is on (section 14); CarPlay is expected to once the phone sends the video to the car (not yet confirmed in a car); AirPlay to a TV works at home only. Apple Home reaches it through your home hub.
  • The page plays recorded sound at normal speed only, not while you drag the timeline or at other speeds.
  • No motion or person markers on the timeline: the wave shows how much was going on, not what.
  • The plain address http://camera-bridge.local is not encrypted. The secure address (see "The secure address") is, and needs the internet and a router that lets the name through.
  • AI descriptions are a sentence on the web page only: Apple Home's notifications do not show them, they cannot be searched, older events are not described afterwards, and the box does not tell who a person is.

Recording to an attached drive

By default the box records to its own disk. To record to a bigger drive instead (a USB or SATA hard disk or SSD), plug it in, open System, and under Recording drive choose Find drives. Pick the drive and Erase and record here…; type the sentence shown to confirm. The drive is erased and made into a recording drive (it is then readable on Linux, not on a Mac or Windows PC without extra software). The bridge restarts for a moment. If the drive is unplugged the bridge says so and records nothing until it is back; it never fills its own disk by mistake. A drive that was made this way earlier (for example before you installed a new version) can be chosen again with Record to this drive, which keeps what is on it. Use the box's own disk again puts recording back on the box's disk and leaves the drive alone. A factory reset does not touch the drive.

Wi-Fi

With a network cable the box needs nothing else. For Wi-Fi there are three ways:

  1. Before the first start: after writing the image to the USB stick, open the stick on your computer (it shows up as a small drive) and add a text file named camera-bridge-wifi.txt with two lines:

    network=Your network name
    password=Your Wi-Fi password
    

    At its start the box saves the network and deletes the file. It keeps the network when you install it on the computer's own disk.

  2. The setup hotspot: with no cable and no network it knows, the box opens its own Wi-Fi, CameraBridge-XXXX, about 30 seconds after it starts. Join it with a phone: a page opens by itself (as hotel Wi-Fi does). Choose your network, type its password and press Join. The box restarts and joins it; your phone goes back to your own Wi-Fi, and the box is at http://camera-bridge.local. If it can't join, its own network comes back and the page says why. Once the box is set up, the page also asks for its administrator password.

  3. System > Wi-Fi in the web page: find networks, join one (the box restarts), forget one.

A box that knows a network does not open its hotspot when that network goes away for a while (a router restarting): it waits for it, and opens the hotspot only after 10 minutes without a network. While the hotspot is open, the box looks for its saved networks again every minute when nobody is using the hotspot, so it comes back by itself after a Wi-Fi outage. A box on a network cable never opens it, even on a camera network without a router.

The secure address

The box has two addresses. The plain one, http://camera-bridge.local, is not encrypted. The secure one is a name like https://<random letters>.box.camera-bridge.app with a real certificate, so every browser at home trusts it and nothing needs installing. It is on by default and shown on the System page, under Secure address.

How it works. The first time the box has internet, it registers with www.camera-bridge.app, the project's website, and gets its random name. It then asks Let's Encrypt for a certificate for that name and renews it by itself. The name points to the box's address on your home network, so it only works for devices at home, or for a phone or laptop that Away from home (section 14) has connected to the box. Video and the web page never go through the website: they travel from the box to your browser inside your home. Getting the certificate takes a few minutes. Until it is ready, and whenever the box has no internet, the plain address keeps working.

What this publishes:

  • The website learns the box's public key, and sees your home's public internet address when the box calls it.
  • The box tells the website its home-network address whenever that changes. The website publishes it as the public DNS record of the box's name, so anyone can look up that address. It is a private address that does not work from outside your home.
  • Let's Encrypt lists certificates in public Certificate Transparency logs, so the box's random name can be found there.

No camera name, picture or password is sent.

Some routers refuse to resolve a name that points to a home address ("DNS rebind protection"). The Test this address button tells you if yours does, and the page lists where to allow box.camera-bridge.app in common routers.

By default http://camera-bridge.local sends browsers on to the secure address once it works. To keep using the plain address, turn off Send camera-bridge.local to the secure address. To stop the secure address altogether, turn off Use the secure address. The box then calls neither camera-bridge.app nor Let's Encrypt, and the plain address works as before.

Moving from Camera Bridge for Mac

If you used the earlier Camera Bridge for Mac app, its cameras can come over to the box:

  1. On the Mac: Camera Bridge › Settings › Backup › Export…. Save the file.
  2. On the box: Settings › Move from Camera Bridge for Mac › Choose the backup file…, and pick that file. The cameras in it are listed with their addresses and user names.
  3. Type the cameras' passwords (one for all of them, or each its own) and press Import. Cameras keep their settings, and Record stays on for the ones that recorded on the Mac (to the box's own storage until you choose a recording drive under System).
  4. When the cameras run on the box: turn off recording in the Mac app (or quit it), add the box in the Home app, and remove the Mac's bridge from Home.

Importing the same file again adds nothing twice. A camera without a password is added turned off; type its password on its page.