Skip to content
tiperPublic

About

Open-source IP camera viewer for phones, tablets, TVs, desktop and the browser, built with Kotlin Multiplatform and Compose Multiplatform.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Vigil

CI License: GPL-3.0

An open-source IP camera viewer, built with Kotlin Multiplatform and Compose Multiplatform: one codebase for phones, tablets, Android TV, desktop and the browser, and a native app for LG webOS TVs that syncs with them.

Early days. Vigil shows MJPEG, JPEG-snapshot and RTSP (H.264, H.265) cameras live on every platform.

Platforms

Platform Target MJPEG / snapshot RTSP
Android phones and tablets androidApp ✅ ✅ MediaCodec
Android TV androidApp (same APK, leanback launcher) ✅ ✅ MediaCodec
iOS / iPadOS iosApp (Xcode) + shared framework ✅ ✅ VideoToolbox
Desktop (macOS, Windows, Linux) desktopApp ✅ ✅
Web webApp, Wasm ✅ cameras that send CORS headers ⚠️ through a relay you run (see below)
LG webOS 4+ tvApp, native (C), early: see tvApp ✅ ✅ TV's hardware decoder

Vigil aims to run on old hardware, so an old phone or tablet can become a camera screen. The minimums are as low as the libraries allow:

  • Android 7.0 (API 24), set by Navigation 3. Compose itself would allow Android 6.0.
  • iOS 15, the oldest the Kotlin/Native toolchain builds for.
  • Browsers with WebAssembly GC: Chrome 119, Firefox 120, Safari 18.2 or newer.
  • Desktop: any OS the bundled Java runtime supports.
  • LG TVs: webOS 4 or newer, in Developer Mode or rooted.

Features

  • Adding a camera takes its IP address and sign-in, not a stream URL. Vigil asks the camera over ONVIF, then tries the RTSP addresses of about thirty brands (Hikvision, Dahua, Reolink, TP-Link, EZVIZ, Swann, UniFi, YI and Wyze with community firmware, anything running Thingino, Uniview, Axis, Foscam and more) and common generic ones, and offers the main and smaller streams it finds. It stops at the first refused password, since some cameras lock the account after a few. If nothing matches, search for the brand, choose "Other / not listed", or enter the full address by hand. In browsers, which can't open RTSP connections, only ONVIF detection works

  • A live grid of cameras, either automatic or fixed at 1, 2×2, 3×3 or 4×4

  • Smaller streams for grids, because a phone's video chip decodes only so much at once: a Redmi 7A manages one 1080p stream at 30 a second and no more, shared with whatever it encodes, so a grid of full-size cameras leaves most tiles black. Give a camera its smaller stream ("Smaller stream" where it's edited, filled in by itself where the camera offers one over ONVIF) and grids use that while full screen still shows the whole picture. A camera without one is shown a keyframe at a time, a fraction of the cost. Not every camera has a second stream: Dafang Hacks serves one unless its RTSP server is given two video sources, and yi-hack's must be turned on in the camera first. A phone being a Vigil camera serves both by itself

  • Groups (e.g. "Outside") with filter chips. Press and hold a camera to drag it into place; its ⋮ menu moves it too

  • Crash reports in the open: when Vigil crashes, it keeps a report on the device. The next time it opens, it shows the report, with camera addresses, sign-ins and names taken out, and offers to open it as a GitHub issue. Nothing is sent unless the user files it, and there's no server of Vigil's own. The webOS TV app doesn't do this yet

  • Stream stats, turned on in Settings or the viewer's ⋮ menu: each camera's codec, resolution, frame rate and data rate. RTSP cameras in browsers don't report them, because the relay receives those streams

  • A fullscreen camera wall, paged by the chosen layout, that streams only the visible page. It can turn its own pages, and outlines a camera for a moment when it alerts

  • A single-camera full-screen viewer, with the camera's settings a tap away in its ⋮ menu. Swipe sideways, with the picture following your finger, or use the arrows to go to the next or previous camera in the list (within the selected group) without going back to it

  • Camera sound in the viewer, behind a speaker button that appears for cameras with sound. It starts off each time. G.711 (μ-law, A-law), L16, AAC and Opus play everywhere: Android, iOS and desktop decode them, and the browser relay adds the sound to the stream it sends (AAC and Opus as they are, PCM as uncompressed FLAC). Camera tiles never play sound

  • Hold to talk: hold the microphone button in the viewer and what you say plays on the camera when you let go, up to 12 seconds. The button appears for cameras with a speaker Vigil can reach: any with ONVIF's RTSP audio back channel in G.711, YI cameras with yi-hack firmware through speaker.sh, and Hikvision cameras and panels through ISAPI, which they offer instead of the back channel. It works on Android, iOS and desktop; browsers can't reach cameras' speakers. The ISAPI path is written from Hikvision's documentation and tested against a stand-in, not against a Hikvision device — if you have one, say how it goes

  • Rotate (90°, 180°, 270°) and mirror each camera's picture, for cameras mounted sideways or upside down. Live views, alerts, snapshots and recordings all follow it, and so do the pan and tilt controls

  • Saved positions: go to the ones on the camera from the viewer, by menu or number key, and on ONVIF cameras save where it's pointing or delete one

  • Streams pause while Vigil is in the background. Coming back within a few seconds shows the picture at once; RTSP cameras resume from their latest keyframe. A camera that drops out keeps its last picture on screen while it reconnects

  • MJPEG, JPEG-snapshot polling and RTSP sources, with HTTP Basic/Digest authentication

  • ONVIF: find cameras on the network (WS-Discovery), sign in, pick a stream profile, and pan/tilt/zoom from the viewer. Both the Media and the newer Media2 service are understood

  • On a camera that can pan and tilt, press and hold a point in the picture to bring it to the middle, then hold and drag to fine-tune where it points: see Using the viewer

  • UniFi Protect: paste the rtsps://…:7441/… address it gives, and Vigil uses the unencrypted one on port 7447. Other rtsps:// addresses are checked against what your device trusts. A camera with its own certificate, as most have, shows its fingerprint for you to trust once: Vigil remembers it, syncs it to your other devices and the TV, and warns you if it ever changes. Nothing is sent to a camera until its certificate is accepted.

  • Snapshots and recording from the viewer, for every kind of camera:

    Snapshots Recordings (QuickTime)
    Android Pictures/Vigil Movies/Vigil
    iOS Photos Files › Vigil › Recordings
    Desktop ~/Pictures/Vigil /Movies/Vigil (/Videos/Vigil on Windows/Linux)
    Web Downloaded Not available

    Recordings keep exactly what the camera sent, without re-encoding: H.264 or H.265 with its AAC, Opus or PCM sound for RTSP cameras, Motion-JPEG for the others. They play in QuickTime, iOS, VLC, mpv and ffmpeg. Rotation and mirroring are stored as metadata too: an Exif orientation tag in snapshots, and the track matrix in recordings.

  • Continuous recording, set per camera: off, on motion, or always. On motion uses the camera's motion detection and keeps from a few seconds before it until a few seconds after it stops. Vigil records the camera's full picture as it was sent, with its sound, into its own storage on the device: nothing is uploaded, synced or put in a backup, and each device decides for itself what it records.

    • A timeline per camera, from the viewer's menu: drag it to scrub, pinch or scroll to see more or less time, and jump between motion events. Play at up to four times the speed, and save a clip from any moment as a video other apps can play and share.
    • Limits in Settings: how much room recordings may take (10 GB unless changed) and, if you like, for how many days they're kept. The oldest go first, and Vigil always leaves half a gigabyte free on the device.
    • Android: recording goes on with Vigil closed once Watch with Vigil closed is on in Settings. Desktop: for as long as Vigil is running. iOS: only while Vigil is open, since the system stops it otherwise. Browsers and the TV app don't record.
  • Motion detection, turned on per camera with a sensitivity of Low, Medium or High. Cameras added through ONVIF report their own detections, which is lighter and smarter: alerts and events then say what was seen and where, like Person at Garage or Vehicle at Gate, and a camera that tells people, vehicles, animals or line crossings apart can be set to alert only for the ones you choose. Cameras that keep all their event subscriptions at one address, like some Axis models, work too. For the others, Vigil compares the picture itself, ignoring brightness changes that affect all of it: MJPEG and snapshot cameras twice a second, RTSP cameras by decoding one keyframe every two seconds on Android and iOS. Each camera alerts at most once every 30 seconds:

    • In the app: a banner with the picture that triggered it. Swipe it away, or tap it for the camera.
    • The bell in the top bar counts what's new and opens the events: filter by camera or by what was seen, grouped by day, swipe to delete with undo, and page through the pictures full screen to zoom in or save one. The last 200 stay across launches.
    • A video of each event, turned on per camera: about 20 seconds, starting just before the motion or sound, saved with your recordings. Play it from the event, except on Android 9 and older; deleting the event deletes its video too. It keeps Vigil connected to the camera, and browsers can't record.
    • Android and iOS: a system notification with the picture while Vigil is in the background. Tapping it opens the camera. With the app lock on, notifications leave the picture out.
    • Android: Android stops idle apps, so to keep alerts coming turn on Watch with Vigil closed in Settings. A foreground service keeps cameras with motion detection or recording on connected, with a notification that shows it, and comes back after a restart. It uses more battery, so it's off by default. iOS has no such thing, so alerts there stop soon after leaving Vigil.
    • Desktop: a tray notification while no Vigil window has focus.
    • Web: in-app only.
  • Sound alerts, turned on per camera with a sensitivity of Low, Medium or High: Vigil listens to the camera's sound and alerts when it hears something louder than the room usually is, like a baby crying, as Sound at Nursery. It measures the sound a tenth of a second at a time against a background level it keeps for each camera, which falls to a quiet room at once but rises only over about a minute, so a fan or a television left on becomes the background instead of alerting all evening. Half a second of the last two has to stand out, so a knock or a click doesn't count. It works with motion detection or without it, like a baby monitor, on any RTSP camera that sends sound (G.711, L16, AAC or Opus) on Android, iOS and desktop, with the same notifications, event videos, quiet hours and Watch with Vigil closed as motion. Browsers can't listen to cameras.

  • Alerts are each device's own: a phone is alerted only for what it asked for, and turning alerts on for a camera on one phone leaves the others quiet. Sound alerts are one tap away: a bell on each camera in the grid, filled for those this device is subscribed to, as well as in the viewer's menu and the camera's settings. Alert settings that cameras shared in earlier versions become each device's own once, so nothing that alerted stops.

  • Tapping an alert opens its camera full screen, on every platform. Turning alerts on for a camera also turns on Watch with Vigil closed on Android, so they still arrive with the app shut.

  • Areas to ignore: paint over the parts of a camera's picture that move by themselves, like trees or a busy road. For cameras Vigil watches itself; cameras that report their own detections set this in the camera.

  • Quiet hours: motion is still logged, without alerts.

  • Android: the launcher's menu on Vigil's icon opens the first cameras, and the app lock hides them.

  • Home-screen widgets, with the latest picture from your cameras. Tap a picture to open that camera full screen:

    • Android: one widget shows up to four cameras, and a button on it takes new pictures now. Android also asks for new ones every half hour, and Vigil takes them every few minutes while it's on screen or watching with Vigil closed, and when you leave it.
    • iOS 17 and later: one camera per widget, chosen by editing the widget. iOS doesn't let a widget reach a camera, so the pictures are the ones Vigil took while it was running: every few minutes, and when you leave it.
    • With the app lock on, widgets show a lock instead of pictures and names. The pictures never leave the device.
  • Android Auto: while parked, a list of cameras and a still picture of each, refreshed on demand.

  • Sync between your devices on the same Wi-Fi, so a TV can be set up from a phone or computer instead of its remote (Sync, in Settings or on the empty camera list):

    • One device shows a code ("Pair this device"); on another, pick it from the devices waiting nearby and type the code. Pairing can start from any device; the cameras of both end up on both.
    • Devices nearby that aren't offering to pair are listed too, greyed out: seeing a device there and knowing it can't be picked yet is the difference between "go and tap Pair this device on it" and wondering whether the network is at fault. A device already paired but not syncing says so as well, rather than going quiet.
    • Paired devices keep their cameras the same, passwords and removals included: add or change a camera on one and the others follow, whenever they're on the same network. The newest change wins. Layouts, the group on screen and stream stats stay per device.
    • Devices find each other with DNS-SD (_vigil._tcp: NSD on Android, Bonjour on iOS, Vigil's own mDNS on desktop) and connect over TCP. Everything they send is encrypted (ChaCha20-Poly1305) with a key only paired devices hold; the pairing code never goes over the network.
    • Browsers can't open sockets, so they can't sync.
    • Stop syncing on a device to take it out; its cameras stay.
  • Use an old Android phone or tablet as a camera (Settings › Use this device as a camera):

    • It streams its camera over RTSP (H.264, with AAC sound if you turn that on) to your own network and nowhere else. There's no cloud and no account, and viewers that reach the device any other way, such as over mobile data, are turned away.
    • Viewers sign in with a user name and a password. Vigil makes up the password; change either, or get a new password, on the same screen. The sign-in is Digest, so the password itself never crosses the network. The picture and sound aren't encrypted, as with most IP cameras.
    • Devices paired with it show it as a camera by themselves, and follow it when its address or password changes. Other apps, such as VLC, Home Assistant or Frigate, use the address on screen, like rtsp://192.168.1.20:8554/camera. They need RTSP over TCP, which they fall back to or can be told to use.
    • It answers ONVIF as well, on port 8556, so recorders that find cameras by scanning rather than by address — NVRs, video door panels, Home Assistant, a NAS — see it in a search and add it like any other camera. It replies to WS-Discovery probes and answers the handful of Profile S calls a recorder makes before it will accept a camera. tools/check-onvif.sh runs everything a recorder asks before accepting one, so you can see for yourself what a phone offers; what no one has confirmed yet is a particular recorder accepting it, since that needs the recorder. A single JPEG of what it sees is at http://192.168.1.20:8556/snapshot.jpg, and ONVIF points at it too, for recorders that poll a picture instead of opening the stream. The camera writes that JPEG itself, so it costs no video decoder: a phone busy encoding a 1080p stream has none to spare, and decoding one of the streamed pictures back would fail on exactly the phones this is for. Where a camera won't draw stills alongside the stream, one is decoded from the stream instead, and only if that fails too does it answer 503. Asking for one wakes the camera and lets it rest again, so polling keeps it warm rather than restarting it each time.
    • Its sound alerts come from the phone itself: it listens with its microphone while any device has subscribed to them over ONVIF events, and tells them when it hears something, along with how loud it was against the room. Each device that listens then alerts only on sounds as loud as its own sensitivity asks for, so a phone by the bed can be told of a whimper while another hears only real crying. No video has to flow for that, so a phone by the bed is told of a baby crying without holding the stream open all night. The microphone stops once nobody is subscribed, and the camera's notification says while it may be used. Its events are ONVIF's own DetectedSound, so other recorders that read events can use them too.
    • The light by the lens can be turned on from the viewer, and dimmed where the hardware allows it: the button steps through faint, low, half and full, then off. It starts faint, because a torch at full blast lights the whole room and shows where the camera is. Dimming needs Android 15 or newer and a phone whose light reports more than one strength; on anything else the light is simply on or off. The steps themselves haven't met a phone that can dim yet.
    • Pick the back or front camera, 640×480, 1280×720 or 1920×1080, and 10, 15 or 30 pictures a second. It starts at the lowest size and 15, which old phones manage; a camera that doesn't have the size asked for gives the nearest below. The picture is the way the camera's sensor lies, usually landscape: turn it in the camera's settings on the devices watching.
    • A foreground service keeps it streaming with the screen off and Vigil closed, under a notification that says how many are watching and turns it off. It stays on as the device changes networks and takes the camera back when another app is done with it. Keep the device plugged in. After a restart, open Vigil once: Android doesn't let an app start the camera by itself.
    • Many phones stop hearing multicast once the screen is off, whatever an app asks: a Redmi 7A and a Huawei Y7 did, a Galaxy S6 didn't. Vigil's camera search asks each address directly as well, so it still finds them; mDNS and WS-Discovery from other apps, recorders among them, may not. Turning off Android's Wi-Fi power saving while asleep fixes that, at a little battery: adb shell settings put global wifi_suspend_optimizations_enabled 0 (put 1 to undo it), then turn Wi-Fi off and on. Some Huawei phones also have "Keep Wi-Fi on during sleep" under Wi-Fi's advanced settings.
    • Android only. iOS stops an app's camera when the app leaves the screen, so an iPhone can't be a camera this way; desktop, web and the TV apps can't either. All of them can watch one.
  • Remote and keyboard friendly, for Android TV (the LG app has its own remote controls):

    • Wall: the D-pad moves between cameras and turns the page at the edge; Page Up/Down and Channel ±/media keys turn it directly; OK/Enter opens a camera.
    • Viewer: the D-pad pans and tilts, +/− or Channel ± zoom.

Using the viewer

Open a camera from the grid or the wall. All of this works on the picture itself, with a finger or a mouse:

To Do this
Show or hide the controls Tap
Go to the next or previous camera Swipe sideways, or use the arrows
Zoom in on a spot, or back out Double-tap
Zoom Pinch, or use the mouse wheel or trackpad. Drag to move around while zoomed in
Point the camera at something Press and hold it until a ring appears, then let go
Fine-tune where it points Press and hold, then drag without lifting your finger
Turn the camera with a mouse Hold the arrow buttons, which appear beside the zoom buttons once you use a mouse

The last three need a camera that can pan and tilt, at normal zoom. They work together: hold on what you want to see and let go to bring it to the middle, then hold and drag to put it exactly where you want it. The camera follows your finger as if you were dragging the picture. How far a camera turns is typical rather than measured, so a first hold can land a little off, which is what the drag is for.

Holding and dragging is a finger's way of aiming, and the arrow keys are a keyboard's. A mouse has neither, so once you use one an arrow cross appears above the zoom buttons: hold an arrow and the camera turns until you let go. It stays out of the way on a touchscreen and on a TV, where the remote already does it.

Architecture

Clean Architecture split across Gradle modules. Dependencies only point inwards:

androidApp ─┐
desktopApp ─┼─► shared ─► feature:cameras ─────┐
webApp ─────┤      │      feature:viewer ──────┼─► core:ui ─► core:domain
iosApp ─────┘      │      feature:motion ──────┤      │
                   │      feature:recordings ──┤      ▼
                   │      feature:settings ────┤
                   │      feature:sync ────────┘
                   └────► core:data ──────────────► core:rtsp, core:sync
                              └────────────────────► core:domain

webApp:webos-service ─► core:rtsp, core:sync

core:domain, core:rtsp ─► core:video
Module Layer Contents
core:domain Domain Models (Camera, StreamSource, CameraFeed), repository interfaces, use cases. Pure Kotlin, no framework code.
core:data Data Repository implementations, Ktor HTTP (MJPEG parser, snapshot polling, Basic/Digest auth), JSON persistence (files, or localStorage on the web).
core:video Domain What a video frame is: codecs, NAL units, H.264 and H.265 parameter sets. Pure Kotlin, so what receives frames and what decodes them don't need each other.
core:rtsp Data RTSP client (TCP interleaved, Basic/Digest), H.264 depacketiser, fragmented MP4 muxer, and the RTSP server a device streams its own camera with. Pure Kotlin, sockets supplied by the caller.
core:sync Data Device sync: records and their merge, pairing, the engine that finds and talks to other devices, mDNS, and its crypto (SHA-256, HMAC, PBKDF2, ChaCha20-Poly1305). Pure Kotlin, network supplied by the caller.
core:ui Presentation Theme, shared components, CameraFeedView, platform H.264 and H.265 decoders and video players.
feature:* Presentation Screens and ViewModels. A feature depends only on domain and core:ui, never on data or on another feature.
shared Composition root Metro AppGraph, ViewModel factory, Navigation 3 back stack, iOS MainViewController.

Dependency injection uses Metro. Modules contribute bindings to AppScope with @ContributesBinding, @ContributesIntoMap and @BindingContainer. AppGraph in :shared collects them, and Metro checks the whole graph at compile time. ViewModels are injected through metrox-viewmodel.

Credentials never touch the camera list file. They go to the Android Keystore (AES-GCM), the iOS Keychain, or the desktop OS keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service). Browsers have no secure store, so the web build keeps passwords in localStorage.

ONVIF is implemented in core:data with plain Ktor and a small namespace-agnostic XML reader, so it runs on every target. Requests carry a WS-Security UsernameToken digest, timestamped with the camera's clock (read with GetSystemDateAndTime) so cameras with a drifting clock still accept it. Discovery needs UDP multicast, so it works on Android, iOS and desktop. In browsers, enter the camera's address instead; the camera must also send CORS headers. On a real iPhone, iOS only allows multicast with Apple's com.apple.developer.networking.multicast entitlement. Without it, discovery fails and the address can still be entered by hand. The simulator doesn't have this restriction.

RTSP is implemented once, in Kotlin, in core:rtsp: it speaks RTSP over TCP (interleaved RTP), signs in with Basic or Digest, and turns RTP packets back into H.264 frames. Each platform only decodes them, with hardware it already has and no extra libraries:

  • Android: MediaCodec, drawing into a TextureView.
  • iOS: VideoToolbox, through AVSampleBufferDisplayLayer.
  • Browsers: they can't open TCP connections, so RTSP goes through a relay (webApp/webos-service), compiled from the same Kotlin to JavaScript for Node.js. It repackages the camera's H.264 as fragmented MP4 without re-encoding, for a <video> element using Media Source Extensions. Run it with Node.js (node webApp/build/dist/webos-service/service.js 8555, after ./gradlew :webApp:webos-service:assembleService) and open Vigil with ?rtspRelay=http://127.0.0.1:8555 in the address. It only answers its own machine unless given an address to listen on (… 8555 0.0.0.0). It has no password of its own and camera sign-ins travel in its requests, so only do that on a network you trust. With &audio=1 the relay adds the camera's sound. On LG TVs the same service runs sync for the native TV app (tvApp), whose full-screen viewer plays RTSP on the TV's hardware decoder.
  • Desktop: the JVM has no decoder, so the app carries one small native library (desktopApp/native): the H.264, H.265, AAC and Opus decoders of FFmpeg, on the computer's hardware on macOS and Windows and in software on Linux. Pictures come back into memory, so Compose can draw on top of the video.

H.265 plays wherever the platform's decoder handles it.

Motion detection on plain RTSP cameras decodes one keyframe every two seconds, on Android and iOS. Elsewhere it needs the camera to report motion itself over ONVIF.

Localisation uses Compose Multiplatform resources. Each module keeps its strings in src/commonMain/composeResources/values*/strings.xml. The app ships in English and European Portuguese (values-pt), and contributions for other languages are welcome.

Build logic lives in build-logic/ as three convention plugins:

  • vigil.kmp.library: targets and Metro
  • vigil.cmp: Compose
  • vigil.feature: feature-module wiring

Building

You need JDK 21+ (Android Studio's bundled JBR works), the Android SDK, and Xcode for iOS.

./gradlew allTests                         # unit tests on every target
./gradlew :androidApp:installDebug         # Android / Android TV
./gradlew :desktopApp:run                  # desktop
./gradlew :webApp:wasmJsBrowserDevelopmentRun   # web (Wasm) dev server
./gradlew :webApp:assembleWebDistribution  # web: build/dist/web
./gradlew :webApp:webos-service:assembleService   # browser RTSP relay: build/dist/webos-service
make -C tvApp ipk                          # LG webOS TV package, with the toolchain tvApp/README.md describes
VIGIL_KEYSTORE=… ./gradlew :androidApp:bundleRelease   # a signed release, with VIGIL_KEYSTORE_PASSWORD, VIGIL_KEY_ALIAS and VIGIL_KEY_PASSWORD

For iOS, open iosApp/iosApp.xcodeproj in Xcode and run the iosApp scheme. A build phase compiles the Kotlin framework; there are no other dependencies.

A build is version 0.1.0 unless VIGIL_VERSION says otherwise. The release workflow sets it from the tag, so v1.2.3 builds 1.2.3: Android's version code is worked out from it (1.2.3 is 1002003, which is why each number stays under 1000), and the desktop installers and the TV package carry it. Desktop installers built without it are 1.0.0, and so are macOS ones for a version that starts with 0, which macOS doesn't accept. The web app shows no version. The workflow doesn't build for iPhones, so give Xcode the same numbers yourself: xcodebuild … MARKETING_VERSION=1.2.3 CURRENT_PROJECT_VERSION=1002003.

The first desktop build compiles that native library, FFmpeg included, which takes a minute or two and needs a C compiler and pkg-config (and nasm on Intel). It downloads FFmpeg's source unless given -Pvigil.ffmpegSource=<dir>. On Windows, run desktopApp/native/build.sh desktopApp/build/appResources/common in an MSYS2 MinGW shell first. Packaging needs a JDK with jpackage, which Android Studio's lacks.

Browser tests (Wasm, and JS for the logic modules) run in headless Chrome. On machines without Chrome they're skipped.

A fake camera for development

tools/fake-camera/fake_camera.py serves an ffmpeg test pattern as MJPEG, as a JPEG snapshot (with CORS enabled) and as H.264 over RTSP. It also acts as an ONVIF device: it answers WS-Discovery probes and serves the device, media and PTZ services.

python3 tools/fake-camera/fake_camera.py
# MJPEG:    http://localhost:8081/video.mjpg
# Snapshot: http://localhost:8081/snapshot.jpg
# RTSP:     rtsp://localhost:8654/main (any path; TCP or UDP; a beeping AAC sound track, G.711 on /pcmu)
# ONVIF:    http://localhost:8081/onvif/device_service (admin / admin)
# PTZ log:  http://localhost:8081/ptz-log
# --degrees or --stepper report the position as yi-hack or Dafang Hacks do
# --pan --web-ptz hikvision shows a scene that pan and tilt really move across
# --people and --vehicles say it saw a person or a vehicle, turn about with plain motion
# --crying makes the sound quiet for seven seconds in ten, then loud, to set off sound alerts
# --reference-parameters tells event subscriptions apart as Axis cameras do

The ONVIF profiles' stream URIs point at its RTSP server.

The Android emulator reaches it at 10.0.2.2:8081.

Website

docs/ holds the project website: plain HTML and CSS with no build step, published by GitHub Pages. To preview it, run python3 -m http.server --directory docs and open http://localhost:8000.

To turn it on, go to the repository's Settings › Pages, choose Deploy from a branch, then main and /docs. It appears at https://tiper.github.io/Vigil/. Pages on a private repository needs a paid GitHub plan, and the site's GitHub links only work once the repository is public.

The pictures on the site are drawings, not photographs: docs/assets/*.svg are mockups of the app with invented scenes — a driveway, a garden gate — built from flat shapes. No camera footage of any kind is published, real or test. Where a screenshot is wanted instead, take it from the web build showing tools/fake-camera/fake_camera.py, never a real camera.

License

GPL-3.0

About

Open-source IP camera viewer for phones, tablets, TVs, desktop and the browser, built with Kotlin Multiplatform and Compose Multiplatform.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages