Turn your Android device into a remote security IP camera
- π Built-in server that streams MJPEG and H.264 video to any web browser, video app or NVR, including Frigate, with Home Assistant integration.
- ποΈ Remote web interface for live view, camera, image, recording and zoom controls.
- ποΈ Live microphone audio and two-way push-to-talk from the web interface.
- βοΈ Optional OpenTunnel remote access outside your home network (can be self-hosted).
- π€³ Switch between the main and selfie camera.
- π Motion detection with notifications, record on motion, continuous recording and automatic cleanup of old recordings.
- πΎ Start manual recordings and browse, play, download or delete them in the web interface, saved to internal storage or an SD card.
- π‘ Optional RTSP stream (H.264 + AAC) with a lighter sub stream for players and NVRs.
- π°οΈ Optional ONVIF camera mode for UniFi Protect, Home Assistant and other NVRs.
- π Username and password protection with automatic or custom TLS certificates for HTTPS and RTSPS.
- π§© Provides an HTTP control API for automation and integrations.
- βοΈ Configure the streaming, RTSP and ONVIF ports and choose which network interface to listen on.
- πΌοΈ Adjustable image quality and frame rate, plus automatic pause at a configurable battery temperature.
- π Night-sight mode that streams long-exposure stills as video.
- π Automatically switch night mode by GPS twilight, ambient light, schedule or camera auto-exposure, with optional grayscale, torch-on when dark and torch-on-motion.
- π Optional burned-in text overlay for streams and recordings.
- βοΈ Controls to crop the live stream and snapshots.
- π΄ Turn the display off while streaming.
- π₯Ύ Optional start on boot.
If you are planning to run this 24/7, please make sure that your phone does not stay at 100% charge. Doing so may damage the battery and cause it to swell up, which could cause it to explode.
Some models include an option to only charge to 80%, make sure this is enabled where possible.
Note: running at a higher image quality may cause some phones to over heat, which can also damage the battery.
Continuous streaming - whether from an always-on camera mode (Camera always on, Motion clips or Continuous recording), a browser or an NVR - can cause some devices to over heat and power off. Use Pause streaming at battery temperature under Stream β Device Safety to protect the device. It is enabled by default at 45 Β°C and can be adjusted or set to 0 to disable it.
The app runs as a foreground service with a persistent notification, so it won't be closed while streaming. For reliable 24/7 operation:
- Unrestricted battery usage: Open Settings > Apps > Android IP Camera > Battery and select Unrestricted (or Don't optimise) so Android doesn't sleep the app.
- Don't swipe the app away from recent apps - force-stopping it terminates the server.
- Don't dismiss the persistent notification or the server may get stopped.
- The display can be safely turned off while streaming.
- Disable automatic updates: Installing an update stops the app and its background streaming service. App stores and updaters (Google Play, F-Droid, Obtainium, etc.) may install updates in the background, interrupting 24/7 operation. Turn off auto-update for Android IP Camera in the store or updater, and install updates manually when you are able to reopen the app and start streaming again.
- Enable Start on Boot in the app settings for unattended setups. On Android 14 and newer, Android does not allow the camera/microphone foreground service to start from the background, so the app posts a notification after boot; tap it to open the app and start streaming.
Open https://[ip_address]:4444 (or http:// when TLS is disabled) and use the three tabs.
Choose the lens and adjust the picture, night mode and framing.
- Quick controls: switch camera, torch, mute audio, push-to-talk, start a recording and take a snapshot.
- Lens: zoom, focus, exposure and contrast.
- Night Vision: night-sight stills, night exposure/ISO and grayscale.
- Automatic night mode: switch night-sight, grayscale and the torch automatically from GPS, ambient light, a schedule or the camera's own exposure.
- Framing & orientation: rotation, mirror, output scale and crop.
- Snapshot settings: choose the snapshot resolution and an optional countdown.
Tune the live video, audio and device safety.
- Browser Playback: choose H.264 or MJPEG for this browser.
- Main stream: quality, bandwidth, keyframes and noise reduction.
- Text overlay: burn time, date, battery, Wi-Fi, temperature and the camera name into the video.
- RTSP substream: a lighter stream for slow links.
- Device Safety: pause streaming when the battery gets too hot.
Choose when the camera runs and how clips are recorded.
- On demand, Camera always on, Motion clips or Continuous recording.
- Motion notifications, sensitivity, stop delay, clip length and automatic cleanup are configured here.
See Web control panel settings for defaults and the full technical behaviour, and Server API Reference for the remote-control API and every parameter.
Web control panel settings reference
- Night-sight mode replaces live video with night-sight stills. Expect a much lower frame rate and a pause while each photo is captured.
- Cameras without manual night exposure can produce slow stills without getting brighter; normal video with grayscale may look better.
- If the still pipeline keeps timing out (some legacy HALs hang on
takePicturewhile preview runs), Night-sight mode stays selected but the stream automatically falls back to normal live video, keeping grayscale and the automatic night decision active. - Night exposure and Night ISO set the still shutter time and sensor sensitivity with auto-exposure off. Night exposure defaults to 50% of the camera's usable range. Higher values brighten a dark room; very long exposures blur movement.
- Grayscale Night Mode removes colour noise from live video and night stills on both MJPEG and H.264. It does not change exposure or ISO.
- Framing & orientation: rotation, mirror and output scale. Crop is available from a desktop browser; drag a rectangle over the preview to set it.
- Snapshot settings: choose stream/full-sensor resolution and an optional countdown before the snapshot (0 = instant).
Choose Schedule, GPS, LUX, GPS or LUX or Camera AE.
- GPS follows civil twilight (β6Β° sun elevation); the offset shifts both transitions later (positive) or earlier (negative).
- LUX switches night on below the threshold and day at or above it.
- Schedule uses the phone's local time and may cross midnight.
- Camera AE uses the camera's ISO/exposure telemetry with a frame-luma fallback. Metering always comes from a day-referenced video/preview/analysis stream; brightened night stills are never used. Lower the threshold to switch earlier (default 90%). Entry needs 15 seconds of continuous darkness; exit normally needs 60 seconds of brightness, or 10 seconds for a nearly pure-white frame. On cameras whose night mode only exists as an OEM extension there is no day-referenced stream while night-sight owns the camera, so the decision latches until that night session ends.
- Auto Night-sight mode turns the selected trigger into an actual night-sight switch. It is independent of Auto grayscale and the torch: any combination can be selected. The manual Night-sight checkbox stays enabled; toggling it while automation owns the switch creates a temporary override until the next night/day transition.
- Auto grayscale follows the trigger's dark/light decision independently of Night-sight mode, so grayscale can turn on while the stream stays live video. The manual Grayscale Night Mode checkbox stays enabled; toggling it while Auto grayscale is active creates a temporary override until the next night/day transition. With no trigger selected, the manual setting applies normally.
- Torch:
On motionlights the torch on motion after dark (needs an always-on mode with motion notifications).On while darkkeeps the torch lit while the trigger says dark; in On demand it runs only while the camera session is active (viewer, recording, snapshot or preview) and turns off when the camera is released. Camera AE can use it in On demand because the dark decision is latched for that session (LUX is also latched while the torch is on, since its sensor can see the torch); in always-on modes Camera AE cannot be combined with it because the torch would blind the meter. While any torch is lit, Night-sight and grayscale are paused without clearing their selections or temporary overrides, then restored when the torch turns off.
- Browser Playback: H.264 needs HTTPS/TLS and a browser with WebCodecs; MJPEG works everywhere. The choice is per browser.
- Target bitrate: Auto scales about 0.2 bits per pixel per frame with resolution and frame rate. A manual value stays fixed and is clamped to what the device encoder supports.
- Bitrate mode: VBR favours quality; CBR favours steadier bandwidth. CBR falls back to VBR when unsupported. Android 12+ applies a VBR quality floor, so a low target can still produce a higher average bitrate.
- Keyframe interval: longer intervals reduce average bandwidth for 24/7 recording; new viewers request a keyframe when they connect.
- Noise reduction applies only to the rear camera's GPU H.264 path; the GPU load scales with the level.
- Audio gain applies to the camera microphone output, including RTSP audio.
- Text overlay (OSD): burns time, date, battery, Wi-Fi, temperature and camera name into the video. Leave the camera name blank to use the selected lens.
- RTSP substream: a smaller stream for slow links. Keep its bitrate around half the viewer's connection speed so dips do not stall it. Changes apply the next time an RTSP viewer connects.
- Device Safety: pause streaming at a chosen battery temperature. Defaults to 45 Β°C when no value has been set;
0disables the guard. Streaming resumes after the battery cools by 3 Β°C. Continuous streaming from an always-on mode, browser or NVR can overheat some devices.
- On demand starts the camera for a viewer and releases it when the last viewer leaves. The on-phone preview also keeps it running while shown.
- Camera always on keeps the camera ready for fast connections and continuous Camera AE. Notify on motion adds ONVIF motion events and phone notifications.
- No automatic recording, Record on motion and Continuous recording choose whether clips are written. Motion clips always enable notifications; continuous recording can run without them.
- Motion sensitivity, stop delay, continuous clip length and storage cleanup are configured here. Event delivery, clip timing defaults and storage paths are described in Server API Reference.
The app can publish its local web server through OpenTunnel as a public HTTPS URL, without opening a port on your router. OpenTunnel is a blind TLS tunnel: the certificate's private key stays on the phone.
- Set a Username and Password in the app settings and keep Enable Authentication on. The tunnel refuses to start without both, because its URL is public.
- In Settings > Remote Access (OpenTunnel), leave the server at
https://opentunnel.xyzor enter a self-hosted OpenTunnel server. - Tap Register. The first run creates the tunnel identity and waits for a certificate; this can take a minute or two. The main screen shows one line of progress while it happens.
- Once connected, the main screen shows the public
https://β¦URL. Tap it to open the camera in a browser.
Disconnect & disassociate removes the tunnel from the server and deletes the saved identity, certificates and route config; the URL cannot be recovered afterwards. A registered tunnel reconnects automatically while the app is running. The OpenTunnel client is built into the APK for arm64-v8a and armeabi-v7a.
π₯ Frigate config
Use the example config below to add your phone's camera to Frigate & update the URLs. The android-cam composite stream additionally wires up two-way talk / push-to-talk from the Frigate live view (it needs a GO2RTC_ALLOW_ARBITRARY_EXEC=true environment variable set).
go2rtc:
streams:
android-cam-video:
# For example: https://test:Testing123@192.168.0.5:4444/video/h264
# Or use to use a .env file:
# https://{ANDROID_CAM_USER}:{ANDROID_CAM_PASSWORD}@[ip_address]:4444/video/h264
- "https://[username]:[password]@[ip_address]:4444/video/h264"
android-cam-audio:
- "https://[username]:[password]@[ip_address]:4444/audio"
android-cam:
# Video
- ffmpeg:android-cam-video#video=copy
# Phone audio
- ffmpeg:android-cam-audio#audio=copy
# Push-to-talk (from Frigate, requires GO2RTC_ALLOW_ARBITRARY_EXEC=true)
- "exec:/usr/lib/ffmpeg/8.0/bin/ffmpeg -hide_banner -v error -f alaw -ar 8000 -ac 1 -i - -ar 44100 -ac 1 -c:a pcm_s16le -f s16le -method POST -tls_verify 0 https://[username]:[password]@[ip_address]:4444/audio/upload#backchannel=1#audio=alaw/8000"
cameras:
android-cam:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/android-cam # "android-cam-video" can be used if just the video is required
input_args: preset-rtsp-restream
roles:
- detect
- record
- audio
webrtc:
candidates:
- 127.0.0.1:8555Note: if your username or password contains special characters, you'll need to URL encode them via:
python3 -c 'import urllib.parse; print(urllib.parse.quote(input(), safe=""))'
With the RTSP server enabled in the app settings, use the following config in Frigate:
go2rtc:
streams:
android-cam:
- "rtsps://[username]:[password]@[ip_address]:8554/live"
android-cam-sub:
- "rtsps://[username]:[password]@[ip_address]:8554/live/sub"
cameras:
android-cam:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/android-cam
input_args: preset-rtsp-restream
roles:
- record
- audio
# Detect on the lighter sub stream (or drop this input and add `detect` above)
- path: rtsp://127.0.0.1:8554/android-cam-sub
input_args: preset-rtsp-restream
roles:
- detectRTSP endpoints, streams and playback
The app can serve the camera over RTSP, the protocol most NVRs, home automation systems and video players expect from an IP camera. It is off by default: enable it in Settings > RTSP / ONVIF > Enable RTSP. The address is then shown on the main screen:
rtsps://[username]:[password]@[ip_address]:8554/live
Note: VLC does not reliably handle self-signed TLS certificates for RTSPS streams. Use mpv or ffplay to play, or use a trusted certificate. Disabling TLS may work with VLC, at the risk of sending your username/password in plaintext.
- Endpoints:
/liveis the main H.264 stream and/live/subis the optional smaller stream (usertsp://when TLS is disabled). - Video: the same hardware H.264 stream as
/video/h264(resolution, frame rate, target bitrate, bitrate mode, keyframe interval, rotation, mirror and noise reduction follow the web controls; noise reduction only affects the GPU H.264 path). Each client starts at a keyframe. - Sub stream: a smaller version of the same picture for slow links such as 4G, watchable alongside the main stream. Choose its size (240p to 720p), frame rate and bitrate (300 to 2000 kbps, 500 by default), and whether to include audio, under Substream on the web interface's Settings tab (shown when RTSP is enabled). Changes apply the next time a viewer connects. The phone encodes it only while someone watches it; where the picture does not go through the GPU path, the sub stream carries the main stream instead.
- Audio: the microphone as AAC-LC (44.1 kHz mono), honouring the
audio_gaincontrol. It can be turned off with Include Audio and is left out when microphone permission is not granted. - Transport: RTP over UDP or interleaved in the RTSP TCP connection (
-rtsp_transport tcp), whichever the client asks for. Audio and video carry RTCP sender reports so players keep them in sync. - Authentication: the same username and password as the web server, using RTSP Digest authentication (Basic is accepted when a client sends it up front).
- Port:
8554by default, configurable with RTSP Port (it must differ from the streaming and ONVIF ports). - Lifecycle: the camera starts when a client connects and is released when the last one leaves, as with the web streams.
/control/stopalso disconnects RTSP clients and refuses new ones until/control/start. - TLS: when enabled, RTSP is served over TLS (
rtsps://) using the same certificate as the web server and ONVIF, so the control connection and credentials are encrypted. With TLS disabled it is plainrtsp://, so only use it on a trusted network (or through a VPN) in that case.
Examples:
- mpv:
mpv "rtsps://[username]:[password]@[ip_address]:8554/live" - ffplay:
ffplay -rtsp_transport tcp "rtsps://[username]:[password]@[ip_address]:8554/live"
π°οΈ ONVIF camera
ONVIF lets NVRs and home automation systems discover and control the camera as a standard IP camera. It is enabled by Settings > RTSP / ONVIF > Enable RTSP, or automatically while an always-on camera mode (Camera always on, Motion clips or Continuous recording) is selected.
- ONVIF:
https://[ip_address]:8000/onvif/device_service(Profile S device, media and media2 services, WS-Discovery), orhttp://on the same port when TLS is disabled. The port is8000by default and configurable with ONVIF Port. - Snapshot:
https://[ip_address]:8000/onvif/snapshot.jpg(orhttp://without TLS) - RTSP:
rtsps://[username]:[password]@[ip_address]:8554/live, orrtsps://on the same port when TLS is enabled - Motion events: Notify on motion publishes ONVIF motion events through both PullPoint and WS-BaseNotification, so polling clients and hardware NVRs both see motion. It can be enabled with Camera always on or Continuous recording and is always enabled for Motion clips. When it is off, the motion detector does not run. Camera always on without notifications keeps the stream ready for NVRs without motion detection. Recording modes, event delivery and notification details are in Server URL Paths & Remote Control API below.
- If the phone is on the same network as the console, it shows up under third-party cameras. Otherwise, use UniFi Devices > ? > Try advanced adoption and enter
[ip_address]:8000with the app's username and password. - In the camera's Protect settings, turn off audio recording if audio is disabled in the app.
- Protect needs a motion zone for third-party cameras before it creates motion events. If none exists, add a full-frame one through the Protect API (the settings UI doesn't offer zones for third-party cameras).
Add the phone with the ONVIF integration (host https://[phone-ip], port 8000), or adopt it in UniFi Protect and use the Protect integration. Both expose the camera and a motion binary sensor.
To protect the stream and the password from being sent in plain-text, a certificate can be used to start the web stream over HTTPS.
When TLS is enabled, the same certificate is also used by the RTSP (rtsps://) and ONVIF (https://) endpoints. If the certificate cannot be loaded, those servers refuse to start rather than falling back to plaintext.
The app will automatically generate a self-signed certificate on first launch, but if you have your own domain you can use Let's Encrypt to generate a trusted certificate and skip the self-signed security warning message, by changing the TLS certificate in the settings.
To generate a new self-signed certificate, clear the app settings and restart or clone this repo and run ./scripts/generate-certificate.sh then use the certificate personal_certificate.p12 file it generates.
Other similar IP camera apps exist, but most are closed source. You cannot verify that they keep video on the device, that they never send recordings to someone else, or that security issues get fixed. With this app you can.
This app is open source so you do not have to take its privacy claims on trust. The code that controls the camera, encodes video and handles logins is in this repository. You can read it, build it and compare it with the APK you install.
By default, video stays on your local network. The phone serves the stream and the recordings directly to the clients you point at it. Nothing leaves your network, unless you enable the optional OpenTunnel service. Recordings are written to the phone, not uploaded anywhere.
Logins and streams are protected by username and password authentication across the web, RTSP and ONVIF endpoints. When TLS is enabled, the same certificate encrypts all three. You can check how credentials and certificates are handled in the source instead of trusting a privacy policy.
The F-Droid release is built from this same source, and the reproducible build workflow checks a clean rebuild against it.
Some of the code in this repository may be generated with the assistance of AI tools. All changes are reviewed and tested on a real device with a human in the loop before being released.
Server URL Paths & Remote Control API
When the streaming server is running (default port 4444, via https:// or http:// depending on TLS configuration), you can access the following endpoints. The streaming port can be changed under Settings > Startup > Streaming Port, and the interface all servers bind to under Listen Interface.
- Web Control Panel (
/)- Usage: Open
https://[ip_address]:[port]/(orhttp://...) in any web browser. - Description: Serves the built-in control panel, which plays the rear or front camera video stream and allows muting/unmuting audio. Remote controls include: camera selection, image rotation, manual video recording, audio/video sync, flashlight toggle, resolution, zoom, exposure, contrast and optional GPU noise reduction.
- Usage: Open
- Motion JPEG Video Stream (
/video/mjpeg)- Usage: Open directly in a web browser or configure in external home automation tools (e.g. Home Assistant MJPEG IP Camera).
- Format:
multipart/x-mixed-replace; boundary=frame
- Raw H.264 Video Stream (
/video/h264)- Usage: Play in media players that support raw Annex-B H.264 stream demuxing.
- mpv: Run
mpv "https://[ip_address]:[port]/video/h264"
- mpv: Run
- Usage: Play in media players that support raw Annex-B H.264 stream demuxing.
- RTSP stream
- Usage: The RTSP endpoints, sub stream, audio, transport, authentication, lifecycle and TLS are documented in π‘ RTSP stream above.
- Live Audio Stream (
/audio)- Usage: Listen to the live microphone audio.
- Format:
audio/wavchunked transfer-encoding (WAV container, 16-bit PCM mono, 44.1kHz).- mpv: Run
mpv "https://[ip_address]:[port]/audio"
- mpv: Run
- Raw Audio Stream (
/audio/raw)- Usage: Listen to the raw (unprocessed) microphone source, bypassing any system audio processing (e.g. noise suppression, echo cancellation, AGC). On Android 7.0+ (API 24+) this uses the
UNPROCESSEDaudio source; on older devices it falls back to the standard microphone. - Format:
audio/wavchunked transfer-encoding (WAV container, 16-bit PCM mono, 44.1kHz).- mpv: Run
mpv "https://[ip_address]:[port]/audio/raw"
- mpv: Run
- Usage: Listen to the raw (unprocessed) microphone source, bypassing any system audio processing (e.g. noise suppression, echo cancellation, AGC). On Android 7.0+ (API 24+) this uses the
- Two-Way Audio Upload (
/audio/upload, POST)- Usage: Send raw audio to the phone, whose speaker plays it live. Used by the built-in web control panel's push-to-talk button and by go2rtc/Frigate two-way talk (see the Frigate config above).
- Body: Raw 16-bit PCM mono 44.1kHz. Accepts
Content-Length,chunkedtransfer-encoding andExpect: 100-continue. - Responses:
200 OKper complete body;503 Service Unavailableif streaming is disabled.
- Still Snapshot (
/video/snapshot)- Usage: Fetch a single high-resolution image.
- Format:
image/jpeg - Query Parameter:
?camera=<id|front|back|toggle>to query a specific camera sensor.- Example:
https://[ip_address]:[port]/video/snapshot?camera=back
- Example:
- Device Info and Capabilities JSON (
/info.json)- Usage: Query available camera sensors, their supported resolutions (for the output path that lens actually uses), device battery percentage, battery temperature in degrees Celsius (
temperatureC), Wi-Fi signal strength, individual camera lens settings, the burned-in overlay settings (osd) and the overheat-pause threshold (overheatPauseC), plus the current main-stream encoder settings, including the negotiatedeffectiveResolutionandstreamDenoise. - Format:
application/json
- Usage: Query available camera sensors, their supported resolutions (for the output path that lens actually uses), device battery percentage, battery temperature in degrees Celsius (
- Start Recording (
/record/start, POST)- Usage: Start recording the live camera feed to a local MP4 file. The camera and H.264 encoder are started on demand if not already running. Manual recordings are saved under
YYYY/MM/DD/YYYY-MM-DD-HHMMSS-manual.mp4inside the recordings folder. Recordings started by Motion clips use the same folder layout with a-motion.mp4suffix, and Continuous recording segments use-continuous.mp4. - Responses:
201 Created: Recording started; returns the recording status JSON.409 Conflict:{"error":"already_recording", ...}- a recording is already in progress.503 Service Unavailable:{"error":"no_encoder", ...}- failed to initialize the H.264 encoder.500 Internal Server Error:{"error":"start_failed", ...}- recording failed to start.
- Usage: Start recording the live camera feed to a local MP4 file. The camera and H.264 encoder are started on demand if not already running. Manual recordings are saved under
- Stop Recording (
/record/stop, POST)- Usage: Stop the in-progress local MP4 recording and finalize the file.
- Responses:
200 OK: Recording stopped; returns the final recording status JSON.409 Conflict:{"error":"not_recording", ...}- no recording is in progress.500 Internal Server Error:{"error":"stop_failed", ...}- failed to finalize the recording.
- Recording Status (
/record/status)- Usage: Query whether a local MP4 recording is currently active.
- Format:
application/json-{"recording":<bool>, "uri":<string>, "durationMs":<long>, "width":<int>, "height":<int>, "mode":<string>}(or{"recording":false, "mode":<string>}when idle).modeisoff,notify,motionorcontinuous.
- Recordings Index (
/files)- Usage: Open
https://[ip_address]:[port]/filesin a web browser for a folder browser of the recordings stored on the device (Movies/AndroidIPCamera). Folders can be opened from the list or via the breadcrumb. - Format:
text/html- static page shell that loads the current folder listing from/files.json?dir=<relative path>, renders folders as navigation links, and renders every entry with emoji-only πΎ Download and ποΈ Delete buttons (the Delete button asks for confirmation and issues aDELETE /files/<relative path>request). File names open the recording in the browser's video player. Deleting a folder removes the folder and all of its contents.
- Usage: Open
- Recordings List JSON (
/files.json)- Usage: Query a recordings folder listing programmatically or feed custom front-ends. Use
?dir=2026/11/09to list a subfolder; omitdirfor the recordings root. - Format:
application/json-{"folder":<string>, "path":<string>, "entries":[{"name":<string>, "isDirectory":<bool>, "sizeBytes":<long>, "lastModifiedMs":<long>}, ...]}
- Usage: Query a recordings folder listing programmatically or feed custom front-ends. Use
- Play or Download Recording (
/files/<relative path>, GET or HEAD)- Usage: Open a recorded MP4 in the browser's native video player, which starts streaming immediately and keeps working while the file is being read (MP4s are served as
video/mp4withContent-Disposition: inline). Other files download as before. Use the πΎ Download button in the recordings list to save a copy; the player's own save/download control also works. Path segments include recording folders, e.g./files/2026/11/09/2026-11-09-093000-manual.mp4. Supports a singleRange: bytes=...request (including open-ended and suffix forms) so browsers can seek and stream progressively; the response advertisesAccept-Ranges: bytes. - Responses:
200 OKwith the file bytes (or headers only forHEAD),206 Partial ContentwithContent-Rangefor a range request,416 Range Not Satisfiablefor a range outside the file,404 Not Foundif the file does not exist,400 Bad Requestfor invalid paths.
- Usage: Open a recorded MP4 in the browser's native video player, which starts streaming immediately and keeps working while the file is being read (MP4s are served as
- Delete Recording (
/files/<relative path>, DELETE)- Usage: Permanently delete a recorded MP4, or delete a folder and everything below it. The recordings root itself cannot be deleted.
- Responses:
200 OK:{"deleted":true}- file or folder deleted.404 Not Found:{"error":"not_found"}- no such file or folder in the recordings folder.500 Internal Server Error:{"error":"delete_failed"}- the entry exists but could not be deleted.
- Enable Streaming (
/control/start)- Usage: Re-enable streaming of the media routes after it has been disabled (e.g. by a home-automation system).
- Format:
application/json-{"streaming":true}
- Disable Streaming (
/control/stop)- Usage: Stop serving the media routes (
/video/*,/audio*, and the RTSP stream when enabled) without closing the listening port, and disconnect any viewers that are currently connected. The/control/*endpoints remain reachable so streaming can be turned back on remotely. When disabled, media routes return503 Service Unavailablewith a hint to POST/control/start. - Format:
application/json-{"streaming":false}
- Usage: Stop serving the media routes (
- Streaming Status (
/control/status)- Usage: Query whether streaming is currently enabled.
- Format:
application/json-{"streaming":<bool>}
Settings can be changed dynamically by passing query parameters in HTTP GET requests (e.g., to the root path / or any control endpoint).
- Parameters:
camera=<id|front|back|toggle>: Switches the active camera sensor (supports logical:physical ids).resolution=<low|medium|high|auto|max|WxH>: Change capture/stream resolution. Uselow|medium|highfor presets;auto/maxor explicitWxHmay be used to control the negotiated stream size.fps=<1..60>: Main stream frame rate.stream_bitrate=<auto|500..8000>: Main stream target bitrate in kbps.autoscales ~0.2 bits per pixel per frame with resolution and frame rate.stream_bitrate_mode=<vbr|cbr>: Main stream rate control mode (falls back to VBR when unsupported). Android 12+ enforces a minimum quality floor in VBR, so a lowstream_bitratecan still produce a higher average bitrate; CBR bypasses that floor and stays closer to the target.stream_keyframe_interval=<1..120>: Seconds between main stream keyframes.stream_denoise=<0..100>: Noise Reduction slider. Spatial noise reduction runs on the phone's GPU before H.264 encoding;0disables it and the GPU load scales with the slider: levels 1β25 sample a 5-tap cross, 26β50 a full 3Γ3, 51β75 add one wider ring, and 76β100 add the second ring. It applies live only to the back camera's GPU H.264 path, so MJPEG, front-camera and software YUV streams are not filtered. When the web panel's preview is MJPEG, switch to H.264 to see the effect live; RTSP and recordings still use it. The current value is reported asstreamDenoisein/info.json.zoom=<value>: Adjusts digital zoom (e.g.,1.0,2.5).scale=<value>: Adjusts preview stream scale (per-camera; e.g.,0.5,1.0).exposure=<value>: Adjusts exposure value (per-camera).contrast=<value>: Adjusts contrast (software; per-camera, integer).torch=<on|off|toggle>: Controls the flashlight.audio_gain=<value>: Changes microphone gain multiplier (e.g.,1.0,2.0).focus_distance=<0..1|-1>: Set manual focus distance (0..1). Use-1to restore autofocus.snapshot_res=<max|stream>: Choose snapshot resolution for the selected camera (maxfor full sensor,streamto match current stream resolution).recording_mode=<off|always_on|motion|continuous>: Camera/recording behaviour with no viewer connected: on demand (off), camera always on (always_on: keeps the stream ready for NVRs and samples Camera AE continuously, with optional notifications and recording), motion clips (motion: always enables notifications and records a clip on motion), or continuous segmented recording (continuous: notifications are optional). The legacynotifyvalue is still accepted asalways_onwithnotify_on_motion=true.notify_on_motion=<true|false>: Enable motion detection, ONVIF motion events and phone motion notifications. It is forced on formotion, forced off foroff, and otherwise independent of the recording mode. When off foralways_onorcontinuous, the detector does not run and no motion events are sent; continuous recording still records.recording_segment_minutes=<1..120>: Length of each continuous-recording clip (default 5).recording_storage_limit_percent=<50..99>: Delete the oldest recordings once the drive reaches this usage (default 90).motion_sensitivity=<1..10>: Motion detector sensitivity.motion_record_stop_delay=<0..300>: Seconds to keep a motion clip after motion clears.rotate=<degrees>: Rotate video stream/snapshot (persisted per-camera).mirror=<true|false>: Mirror the video.crop=<left,top,right,bottom|reset>: Crop the stream and snapshots to a normalised rectangle (0..1) of the rotated frame, persisted per-camera.resetremoves the crop and restores the full frame. Changes restart the camera so the H.264 encoder follows the crop's aspect ratio. In the web control panel, open Settings β Crop and drag a rectangle over the video preview; cropping is applied on the phone and can only be changed from a desktop browser.api=<auto|camerax|camera1>: Prefer capture API implementation. Inauto, a CameraX start whose H.264 GL surface never produces a frame falls back to Camera1; an explicitcameraxchoice stays on CameraX and switches H.264 to the software YUV path instead. A Camera1 HAL eviction (Camera error 2) also restarts the camera automatically.night_mode=<on|off>: Replace live video with night-mode still photos on cameras that support it. The camera takes one night-sight / night-scene / low-light still at a time and feeds it into the current MJPEG or H.264 stream, so the frame rate drops to match the exposure time. If two consecutive stills time out, the selection stays on but the stream falls back to normal live video (with grayscale still following the night decision) so a legacy HAL cannot leave the camera on a frozen frame. When Auto Night-sight mode owns the switch, the web UI sendsnight_mode_overrideinstead so a manual toggle becomes a temporary override./info.jsonreportssettings.nightMode.availablefor the selected camera andcameras[].nightMode.availablefor each lens;settings.nightMode.enabledis the stored selection, whilenightSightDesired,nightSightOverrideandactivedescribe the current automatic/override state.night_exposure=<ms>: Night-mode shutter time in milliseconds, applied with auto-exposure off. Only available whensettings.nightMode.manualis true. The usable range is reported assettings.nightMode.exposureMinMs/exposureMaxMs(also per lens undercameras[].nightMode), and the current value issettings.nightMode.exposureMs. The default is 50% of the usable range.night_iso=<value>: Night-mode sensor sensitivity (ISO), applied with auto-exposure off. The usable range is reported assettings.nightMode.isoMin/isoMax(also per lens undercameras[].nightMode), and the current value issettings.nightMode.iso. Longer exposure and higher ISO brighten dark scenes; very long exposures blur movement.night_grayscale=<on|off>: Grayscale Night Mode (default off). Removes chrominance from the live GL video pipeline and the night still loop while preserving luminance, contrast and detail, which hides coloured low-light sensor noise. It applies to both MJPEG and H.264 without restarting the stream, and never changes camera exposure or ISO. The current value is reported assettings.nightMode.grayscalein/info.json.night_grayscale_follow=<true|false>: Auto grayscale (default false). When an automatic night-mode trigger is selected, the effective grayscale state follows that trigger's dark/light decision, independently of whether Night-sight mode is on. A dark trigger enables grayscale even withnight_modeoff; a light trigger disables it even if the manual checkbox is on. The manual Grayscale Night Mode checkbox remains enabled; toggling it while Auto grayscale owns the state creates a temporary override that expires on the next night/day transition. With no trigger selected (or no usable sensor/location decision yet), the manualnight_grayscalesetting applies. While a torch is lit, night-sight and grayscale are paused without clearing either selection, then restored when the torch turns off./info.jsonreportssettings.nightMode.grayscaleFollow,grayscaleOverride,grayscaleDesiredandgrayscaleEffective.night_grayscale_override=<on|off|clear>: Temporary grayscale choice while Auto grayscale is active and the trigger has a night/day decision. It overrides the automatic state until the next trigger transition, then automation resumes.clearreturns to the automatic state immediately. When Auto grayscale or the trigger is off,on/offupdate the manualnight_grayscalesetting instead.auto_night_mode=<off|gps|lux|gps_lux|schedule|camera_ae>: Automatic night mode trigger. It isoffuntil a trigger is explicitly selected.gpsfollows civil twilight (β6Β° sun elevation) from the phone's location;luxfollows the phone's ambient light sensor;gps_luxuses either;scheduleuses fixed local times;camera_aeuses the camera's ISO/exposure telemetry with frame-luma fallback from a day-referenced video/preview/analysis stream; processed night stills are never used for the decision.camera_aeworks in every recording mode: in On demand it samples only while a viewer, recording, snapshot or the on-phone preview runs the camera and never keeps the camera open, and each new camera session starts in day video so it re-detects; with Camera always on it samples continuously. On cameras whose night mode is only an OEM CameraX extension there is no day-referenced stream while night-sight runs, so the decision latches until the night session ends. Selectingoffstops the schedule and disables the switching, grayscale-follow and torch controls. The GPS position is requested once and cached for 48 hours. Requires location permission for GPS modes./info.jsonreports the state assettings.nightMode.autoMode(and the legacyautoboolean),autoSwitching,autoOffsetMinutes,autoLocationGranted,autoLocationAcquiring,autoLuxThreshold,autoLuxAvailable, the live ambient-light readingautoLux(null unless a LUX trigger is selected),autoScheduleStart,autoScheduleEnd,autoCameraAeThreshold,autoCameraAeSource,autoCameraAeLatched, the liveautoCameraAe*telemetry fields, and the phone-localautoStart/autoEndtimes for the current or upcoming period.auto_night_switching=<true|false>: Auto Night-sight mode (default false). When true, the selected trigger is allowed to switch night-sight stills itself. This is independent of Auto grayscale and the torch profile: any combination of the three can be selected. When false, the trigger still drives Auto grayscale and the torch profile, but night-sight is not toggled automatically. The manual Night-sight checkbox remains enabled; toggling it while Auto Night-sight owns the state creates a temporary override until the next night/day transition./info.jsonreports the shared decision assettings.nightMode.autoDark, the stored selection asenabled, and the effective/override state asnightSightDesired,nightSightOverrideandactive.night_mode_override=<on|off|clear>: Temporary Night-sight choice while Auto Night-sight mode is active and the trigger has a night/day decision. It overrides the automatic state until the next trigger transition, then automation resumes.clearreturns to the automatic state immediately. When Auto Night-sight mode or the trigger is off,on/offupdate the regularnight_modeselection instead.auto_night_offset=<minutes>: Shift both GPS night-mode transitions by this many minutes (β999 to 999). Positive values make both switches happen later; negative values make them earlier.auto_night_lux=<lux>: LUX threshold forluxandgps_luxmodes (default 5). Night mode turns on below the value and off at or above it.auto_night_schedule_start=<HH:mm>/auto_night_schedule_end=<HH:mm>: Local-time window for thescheduletrigger (default21:00β06:00). The window may cross midnight.auto_night_camera_ae_threshold=<50..100>: ISO percentage used to enter night incamera_aemode (default 90). Entry also requires exposure at least 90% of the frame duration, or a clearly dark frame luma from the day-referenced stream, plus 15 seconds of continuous darkness. Exit normally takes 60 seconds of brightness; a nearly pure-white day-referenced frame (luma β₯ 240) forces a day switch after 10 seconds. Processed night stills are never used for metering. On demand meters only while the camera is running; Camera always on meters continuously.night_torch_mode=<off|motion|always>: Torch profile while the automatic trigger says it is dark. It is independent of Auto Night-sight mode and Auto grayscale; all three can be selected together.motionturns the torch on for motion and restores night-sight/grayscale after the timer; it requires an always-on camera mode with motion notifications enabled (Motion clips, or Camera always on/Continuous recording with Notify on motion).alwayskeeps the torch on while the trigger says dark: in On demand it runs only while the camera session is active (viewer, recording, snapshot or preview) and turns off when the camera is released, while always-on modes keep it on for the whole dark period. While any torch (manual, motion or always) is lit, night-sight and grayscale are paused without clearing their selections, and return when the torch turns off. Camera AE can be combined withalwaysin On demand because the dark decision is latched for that streaming session (LUX is also latched while the torch is on); it cannot be combined withalwaysin always-on modes because the torch would blind the meter./info.jsonreportssettings.nightMode.torchMode(legacyautoFlashremains true only formotion) andflashPausedwhile the suppression is active.night_auto_flash=<true|false>: Legacy alias fornight_torch_mode=motion|off.night_auto_flash_seconds=<1..99>: Seconds to keep the torch on after motion clears (default 10). Additional motion during this wait restarts the timer.osd_enabled=<true|false>: Burn the text overlay into the video itself (H.264 and MJPEG, including RTSP and recordings)./info.jsonreports the per-element choices undersettings.osd.osd_time=<true|false>,osd_date=<true|false>,osd_battery=<true|false>,osd_wifi=<true|false>,osd_temperature=<true|false>,osd_camera_name_enabled=<true|false>: Choose which overlay elements are shown. All elements are enabled by default when the overlay is switched on.osd_camera_name=<text>: Camera-name line in the overlay. Leave empty to use the selected lens (for exampleBack 0). Maximum 40 characters.overheat_pause_c=<0..100>: Pause streaming when the battery reaches this temperature in Β°C. Defaults to45when never set;0disables the guard. Streaming uses the same gate as/control/stopand resumes after the battery cools by 3Β°C.
- Example command:
https://[ip_address]:[port]/?torch=on&zoom=2.0
Choose a camera and automatic-recording mode under Recordings above. This section covers motion-event delivery and where clips are stored.
When Notify on motion is enabled (or Motion clips is selected), the app compares luma frames in the background. Sensitivity (1 = least sensitive, 10 = most sensitive, default 5) controls how much the frame must change; lighting changes such as a TV cutting between scenes are ignored. Motion is published as tns1:RuleEngine/CellMotionDetector/Motion and tns1:VideoSource/MotionAlarm over both PullPoint (CreatePullPointSubscription + PullMessages) and WS-BaseNotification (wsnt:Subscribe, Renew, Unsubscribe). Home Assistant, ONVIF Device Manager and UniFi Protect poll via PullPoint; hardware NVRs (for example Xiongmai/VMS) subscribe and receive wsnt:Notify HTTP POSTs at their consumer address whenever motion starts or stops. With Notify on motion off, the ONVIF service stays available but no motion events are published.
Notifications to an NVR contain event metadata only (topic and motion state, no video) and are posted to the consumer URL the authenticated NVR supplies, which is normally plain HTTP on the local network.
- Stop Recording After Motion (under Sensitivity, default 10 seconds): how long a motion recording keeps running after motion clears;
0stops immediately. - Continuous Clip Length (default 5 minutes): how often continuous recording closes the current file. Delete Oldest Clips at (default 90%) removes the oldest recordings once that drive usage is reached.
Recordings are saved to Movies/AndroidIPCamera by default. Choose another folder, such as one on an SD card, under Settings > Recording > Recording Storage Location.
ONVIF and RTSP use the username and password from the Authentication settings. ONVIF discovery uses UDP multicast, so the phone and the client must be on the same network (or reachable through a VPN that forwards multicast).
Permissions
The app uses the following permissions to function:
- Camera (
android.permission.CAMERA): Required to capture and stream the video feed. - Microphone (
android.permission.RECORD_AUDIO): Required to record and stream audio. (Requested optionally at runtime; streaming works without audio if denied). - Notifications (
android.permission.POST_NOTIFICATIONS): Required on Android 13+ to post a persistent foreground service notification, keeping the background streaming server running reliably, and to send motion alerts while the camera is always on. - Network (
android.permission.INTERNET,android.permission.ACCESS_NETWORK_STATE): Required to host the server and stream data to your browser/connected clients. - Storage (
android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE): Required on older Android versions to load custom TLS/HTTPS certificates from file storage and to save locally recorded MP4 files (WRITE_EXTERNAL_STORAGEonly applies to Android 9 / API 28 and below; on newer versions recordings are saved to app-specific storage without extra permissions). - Wi-Fi & Location (
android.permission.ACCESS_WIFI_STATE,android.permission.ACCESS_FINE_LOCATION,android.permission.ACCESS_COARSE_LOCATION,android.permission.NEARBY_WIFI_DEVICES): Used optionally to read the current Wi-Fi network's connection signal strength so it can be displayed in the web control panel overlay, and to follow sunrise/sunset for automatic night mode. If location is not granted, the Wi-Fi icon is hidden and automatic night mode stays off; manual night mode still works. - Start on boot (
android.permission.RECEIVE_BOOT_COMPLETED): Allows the app to optionally offer to start streaming after the device boots. This feature is off by default and must be enabled in the app settings. On Android 14 and newer the app posts a notification after boot and streaming starts when it is tapped, because Android only allows the camera/microphone foreground service to start while the app is in the foreground.
Reproducible builds
Build releases in the container. Native macOS and Windows builds are not byte-for-byte identical to Linux builds - the Rust compiler, Android NDK and JDK each ship separate host toolchains - so they do not match the F-Droid APK. Build the release APK in the provided Docker builder or on a Linux CI runner, not with Android Studio's native toolchain.
The builder image is pinned to
linux/amd64because the Android NDK only ships x86_64 Linux host tools. On Apple Silicon, ARM Windows and ARM Linux hosts Docker runs it through x86_64 emulation: Docker Desktop does this automatically (Rosetta on Apple Silicon), while ARM Linux needsqemu-user-static/binfmt support for x86_64 containers. Docker prints a platform-mismatch warning on ARM hosts; it is expected and the build still runs.Run the commands below from the repository root, so the mounted
/workspacecontainsgradlewandrust-toolchain.toml.
This project uses reproducible builds. Release APKs should be built from a clean tree at the tagged commit in the container:
docker build -t android-ip-camera:builder .
docker run --rm \
-v "$PWD":/workspace \
-v "$HOME/.cache":/cache \
android-ip-camera:builder release #-PenableAbiSplits=falseThe container keeps the Android SDK, NDK, Gradle caches and Rust toolchain in $HOME/.cache (android-sdk/, gradle/, cargo/ and rustup/) and installs them on the first run, so later builds start quickly. Delete those directories to force a clean reinstall. Gradle's daemon is disabled in the container because it cannot survive the end of a docker run.
Signed app bundle build (verified afterwards like the APK release):
docker run --rm \
-v "$PWD":/workspace \
-v "$HOME/.cache":/cache \
android-ip-camera:builder releaseBundleDebug build:
docker run --rm \
-v "$PWD":/workspace \
-v "$HOME/.cache":/cache \
android-ip-camera:builder debugClean the Gradle build outputs, or wipe the cached toolchains to force a fresh install:
docker run --rm \
-v "$PWD":/workspace \
-v "$HOME/.cache":/cache \
android-ip-camera:builder clean
docker run --rm \
-v "$HOME/.cache":/cache \
android-ip-camera:builder clean-cacheSigning: copy signing.properties.default to signing.properties, set storeFile to your keystore (for example app/signing-key.jks) and fill in the passwords. Without signing.properties, add -PskipSigning to the release or releaseBundle command to produce an unsigned APK or bundle.
The release variant will automatically sign the APK and app bundle builds. Build-tools 35+ is known to produce signatures that fail reproducibility verification.
The OpenTunnel client is compiled from opentunnel-native by the Gradle build, so a local build also needs the Android NDK 27.2.12479018 and a Rust toolchain with the aarch64-linux-android and armv7-linux-androideabi targets. The Docker builder installs both.
By default, release builds generate architecture-specific APK splits for arm64-v8a and armeabi-v7a (the Rust OpenTunnel client is built for both) in addition to a universal APK. For F-Droid and other scenarios where a single universal APK is preferred, you can disable ABI splits:
F-Droid builds (single universal APK):
./gradlew clean assembleRelease -PenableAbiSplits=falseRelease builds with architecture-specific APKs (default):
./gradlew clean assembleReleaseRelease build as an app bundle:
./gradlew clean bundleReleaseThe Docker builder wraps this as apic-build releaseBundle, which also verifies the bundle's signature and certificate after the build.
The enableAbiSplits property defaults to true. Set it to false to generate only the universal APK, which is the recommended approach for F-Droid to avoid unnecessary complexity in the build pipeline.
Every APK only packages the arm64-v8a and armeabi-v7a ABIs (ndk.abiFilters in app/build.gradle). CameraX ships an x86/x86_64 build of libimage_processing_util_jni.so, but the OpenTunnel client is only built for ARM. Packaging the CameraX x86 libraries would advertise x86 support (for example in the F-Droid listing) even though remote access would not work there.
To verify that two unsigned builds from the same source are identical:
mkdir -p build/unsigned
./gradlew clean assembleRelease -PskipSigning --no-daemon --max-workers=1 -Dorg.gradle.parallel=false
cp app/build/outputs/apk/release/*universal-release.apk build/unsigned/build1.apk
./gradlew clean assembleRelease -PskipSigning --no-daemon --max-workers=1 -Dorg.gradle.parallel=false
cp app/build/outputs/apk/release/*universal-release.apk build/unsigned/build2.apk
cmp -s build/unsigned/build1.apk build/unsigned/build2.apk && echo OK
# or: shasum -a 256 build/unsigned/build1.apk build/unsigned/build2.apkIf they differ, inspect with diffoscope build/unsigned/build1.apk build/unsigned/build2.apk.
To verify your signed release APK matches an unsigned rebuild use apksigcopier - the first APK must be signed:
./gradlew clean assembleRelease
apksigcopier compare app/build/outputs/apk/release/*universal-release.apk --unsigned build/unsigned/build1.apk && echo OKCI runs this check automatically via the Reproducible Build workflow.
Builds downloaded from the official repository should match the following signing certificate:
apksigner verify --print-certs app/build/outputs/apk/release/*universal-release.apk
Signer #1 certificate DN: CN=DigitallyRefined
Signer #1 certificate SHA-256 digest: 1111be81c861e199c6485d367c37680c4b778fba301980d2f0f9a2800f77f70a
Signer #1 certificate SHA-1 digest: 1560ceccdd719b2b97d431ad9a4c877abf5c2f32
Signer #1 certificate MD5 digest: 5fdf04f5b6bab9fdacbe28aa6dc85abbThe stylised store screenshots and feature graphic are rendered from the raw captures in fastlane/metadata/android/en-US/images/phoneScreenshots/ with Pillow in Docker:
docker run --rm -v "$(pwd):/work" -w /work python:3.12-slim bash -c \
"apt-get update -qq && apt-get install -y -qq fonts-noto-core fonts-dejavu-core > /dev/null 2>&1 && \
pip install -q pillow && \
python fastlane/scripts/store_assets.py"Outputs are written to fastlane/metadata/android/en-US/images/phoneScreenshots/stylised/.



