Zero-Gradle Android Pro Camera2 + 9-Sensor Cyber-Flora Sanctuary Glass HUD + LAN HTTP-FLV Pull & Direct YouTube Live RTMP/RTMPS + On-Device Audio Mixer + Timelapse Platform for Android 9–16+ (minSdk 28, targetSdk 35).
Run 100% standalone on an Android phone streaming directly to YouTube Live over TLS (rtmps://), or pull a clean hardware-encoded H.264 + AAC mezzanine feed over LAN (http://<PHONE_IP>:8890/stream.flv) into go2rtc, FFmpeg, OBS, or MediaMTX.
You do not need Android Studio, Gradle, or a computer to use PalaRez StreamCam. A signed, universal (arm64 / armv7 / x86_64, Android 9–16+) prebuilt APK is published on GitHub Releases (kept out of git history so the repository stays clean):
- Install on Your Phone: Open Releases → Latest on your Android phone, download
palarez-cam.apk, and tap to install (enable "Install unknown apps" for your browser when prompted). - Grant Permissions: Launch PalaRez StreamCam and allow Camera, Microphone, Location (optional, for GPS altitude/fix — GPS coordinates are never burned onto video unless you manually toggle them on), and Notifications (keeps the foreground broadcast alive 24/7).
- Mount & Frame: Mount your phone horizontally (landscape). Tap a lens pill (
0: MAIN,1: FRONT,2: MACRO), double-tap the preview to check focus with the2.5xFocus Loupe, and if you are under LED grow lights, open PRO OPTICS and toggle Reduce LED Strobe (60Hz AE + 5-Frame Mix) ON. - Add Your YouTube Stream Key & Test Safely:
- Open the SENSORS & RTMP tab.
- Select YouTube RTMPS (
rtmps://a.rtmps.youtube.com/live2) and paste your Stream Key from YouTube Studio → Go Live (or paste a fullrtmps://.../xxxx-xxxxURL using the Paste button — it auto-splits server & key). - Tap Test Ingest (Dry-Run) to verify DNS, TLS, and RTMP handshake without going live.
- Go Live: Switch back to CAPTURE & LIVE, pick a preset (e.g.,
Sanctuary Eco 1080p15 (800k)for 24/7 low-bandwidth stability, orYouTube HD 1080p24 (2000k)), and tap GO LIVE (RTMP). Optionally tap Blackout in the top bar so the screen stays dark in a grow tent while streaming continuously.
Browser Remote on Any Device: Look at the top bar of the app for your phone's LAN address (for example
http://192.0.2.10:8890/). Open it from any laptop, tablet, or second phone on the same Wi-Fi to view live telemetry, toggle Anti-Strobe/Mic/Torch, snap photos, or start/stop streams remotely.
Every recipe below mirrors a real workflow verified during testing, using RFC 5737 example IP 192.0.2.10 and sample placeholders (xxxx-xxxx-xxxx-xxxx-xxxx). Drop-in starter configs live in examples/.
Best for dedicated plant shelves, terrariums, workshops, or weather stations running directly from an Android phone on Wi-Fi:
- In CAPTURE & LIVE, choose
Sanctuary Eco 1080p15 (800k)(uses< 1 Mbpsupload — great for shared or cellular Wi-Fi; chooseCellular Relief 1080p15 (480k)if your uplink is< 0.7 Mbps). - In PRO OPTICS, enable Reduce LED Strobe (
60Hz AE + 5-Frame GPU Anti-Strobe) to eliminate120 Hz/ PWM grow-light horizontal banding. - Mute the microphone (
MIC AUDIO: OFF) if grow-tent fans are loud — the app physically releases Android's mic and sends silent AAC frames so YouTube stays healthy. - In SENSORS & RTMP, paste your YouTube stream key, tap Test Ingest, then tap GO LIVE and switch the top bar chip to Blackout (zero light leak during plant night cycles).
Upload any .mp3, .wav, .m4a, .aac, .flac, or .ogg track directly onto the phone (48 kHz studio files are resampled on-device to 44.1 kHz mono AAC at exact pitch) and stream straight from phone → YouTube:
# 1. Upload your music track to the phone (replaces 192.0.2.10 with your phone's IP)
curl -s -X POST --data-binary @./my_track.mp3 \
"http://192.0.2.10:8890/api/audio/upload?name=my_track.mp3"
# 2. Load the track with hardware mic muted (or set audio_enabled:true & mic_gain:0.20 to blend room sound)
curl -s -X POST http://192.0.2.10:8890/api/control \
-H 'Content-Type: application/json' \
-d '{
"preset": "sanctuary_eco_1080p15_800k",
"anti_flicker_mode": "60hz_tmix",
"audio_enabled": false,
"music_gain": 0.90,
"music_loop": true,
"music_track": "my_track.mp3",
"music_playing": true
}'
# 3. Optional offline sound check: record 5 seconds from LAN HTTP-FLV before going live on YouTube
ffmpeg -y -i "http://192.0.2.10:8890/stream.flv" -t 5 -c copy test_mix.flvOnce happy with the preview, tap GO LIVE (RTMP) on the phone (or use palarez_ingest_ctl.py go-live --phone 192.0.2.10 --yes-go-live).
Deliver an entire .m3u album sequentially from the phone — creating a dedicated YouTube broadcast per song with its lyrics and your custom channel/support links in the description, waiting until YouTube transitions to LIVE before starting playback at 0:00, and cleanly marking each broadcast complete when the track finishes:
# 1. Copy the sanitized templates from examples/ and customize with your own tracks, lyrics, and links
cp examples/.env.example .env
# Place your .mp3 files and optional matching .txt lyric sidecars (see examples/Track01_Sample_Sunrise.txt) in ./tracks/
# 2. Always verify titles (<=100 chars), descriptions (<=5000 chars), and durations via --dry-run first
python3 scripts/album_live_orchestrator.py \
--m3u ./examples/sample_album.m3u \
--tracks-dir ./tracks \
--title-prefix "My Live Studio Session" \
--dedication "Thanks to our community!" \
--support-file ./examples/support_links.txt \
--dry-run --all
# 3. Pre-stage all tracks onto phone storage (keeps phone IDLE)
python3 scripts/album_live_orchestrator.py \
--phone http://192.0.2.10:8890 \
--m3u ./examples/sample_album.m3u \
--tracks-dir ./tracks \
--upload-only --all
# 4. Run live (start with --track 1 --privacy unlisted to test, then --all --privacy public)
python3 scripts/album_live_orchestrator.py \
--phone http://192.0.2.10:8890 \
--m3u ./examples/sample_album.m3u \
--tracks-dir ./tracks \
--title-prefix "My Live Studio Session" \
--support-file ./examples/support_links.txt \
--token-file ./youtube_token.json \
--client-secret ./client_secret.json \
--live --all --privacy publicUse the phone purely as a low-latency wireless hardware H.264 camera (?clean=1 strips the phone HUD when your PC adds its own graphics; omit ?clean=1 to keep the phone's Sanctuary Glass HUD):
- OBS Studio: Add a Media Source → uncheck Local File → set Input to
http://192.0.2.10:8890/stream.flv(or?clean=1). go2rtc/ Home Assistant: Copyexamples/go2rtc.yamlinto yourgo2rtc.yaml.- Timed
ffmpegHub Mix to YouTube (e.g. a 3:33 showcase broadcast pulling video from the phone and mixing a studio.wavfrom your PC):ffmpeg -re -i "http://192.0.2.10:8890/stream.flv" \ -stream_loop 0 -i "./my_studio_track.wav" \ -t 00:03:33 -map 0:v:0 -map 1:a:0 \ -c:v copy -c:a aac -b:a 128k -ar 44100 \ -f flv "rtmps://a.rtmps.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx"
If your phone lacks a hardware hygrometer (or you want accurate shelf temperature instead of battery temperature), copy examples/home_assistant_push.yaml into Home Assistant to push live RH %, ambient °C, and local QNH barometric pressure to POST http://192.0.2.10:8890/api/control every minute. Pair with docker compose up -d --build (port :8895) and set Companion Archive URL to http://<HUB_IP>:8895 to collect full-resolution timelapse JPEGs + 9-sensor JSON logs automatically.
flowchart LR
Cam["Camera2 Hardware\n(Main OIS / Front / 40D Macro)"] --> GL["HudGlRenderer (OpenGL ES 2.0)\n• Optional 5-Frame FBO Anti-Strobe\n• 1280x720 Sanctuary Glass HUD\n• 2.5x Preview-Only Focus Loupe"]
Sens["TelemetryCollector\n9 Priority Hardware Sensors + GNSS"] --> GL
GL --> View["Cockpit SurfaceView\n(Awake / Sanctuary Blackout / AutoSleep)"]
GL --> Pbuf["640x360 Offscreen Pbuffer\nGET /snapshot.jpg & /mjpeg"]
GL --> VEnc["Hardware MediaCodec H.264 (CBR)"]
Mic["Hardware Mic (AudioRecord)\n+ MusicPcmPlayer (48→44.1 kHz)"] --> AEnc["Hardware MediaCodec AAC-LC\n(44.1 kHz Mono)"]
VEnc --> Fan{"Shared Single-Encode\nFan-Out"}
AEnc --> Fan
Fan --> RTMP["RtmpMuxer\nDirect YouTube RTMPS / RTMP"]
Fan --> FLV["LocalPhoneHttpServer (:8890)\nGET /stream.flv (go2rtc / FFmpeg)"]
- On-Demand Hardware Encoders:
MediaCodecH.264 (COLOR_FormatSurface, CBR) and AAC-LC (44.1 kHzmono) spin up only when an outbound RTMP/RTMPS broadcast or at least one LANGET /stream.flvviewer is active, and power down automatically when idle to minimize continuous standby heat. - Zero Proprietary Dependencies: Pure Android SDK Java (
android.jarAPI 35) compiled directly viaaapt2+javac+d8+apksignerin under 5 seconds — no Gradle daemon, no Maven artifacts, and no third-party native blobs.
Probes both CameraManager.getCameraIdList() and auxiliary/physical IDs (0..4 + getPhysicalCameraIds()) so OEM-hidden macro and ultrawide sensors are directly selectable alongside primary lenses (e.g., on Moto G Power: CAM 0 Back Main 4.3mm OIS 10D, CAM 1 Front 2.8mm 0D, CAM 2 Back Macro 1.7mm 40D / 2.5cm minimum focus).
- Hot-Applied Camera2 Controls (update on the live repeating
TEMPLATE_RECORDrequest with zero dropped broadcast frames):- Focus: Continuous Video AF (
manual_focus: false, default) or locked Manual Diopter (manual_focus: true,focus_distancefrom0.0D∞ up to lensmin_focus_diopter, wheredistance_cm = 100 / D). - 2.5x Preview Focus Loupe: Double-tap the phone viewfinder to toggle a
2.5xcenter magnification loupe on the phone preview surface only — never crops or alters the live broadcast or snapshots. - Exposure: Auto Exposure with EV bias (
manual_exposure: falsedefault;exposure_compdefault0, UI slider-12..+12clamped to hardwareevMin..evMax) or Manual ISO + Shutter (manual_exposure: trueonMANUAL_SENSORlenses;isodefault400, clamped to hardwareiso_rangewith floor50;shutter_nsdefault16,666,667 ns[1/60s], UI presets1/2000s–1s, API floor100,000 ns[1/10000s], capped at<= 500,000,000 ns[1/2s] so long exposures cannot stall live video capture sessions). - White Balance (
awb):auto(default),daylight,cloudy,incandescent(ortungsten),fluorescent,shade. - Zoom (
zoom):1.0x(default) up to hardwaremax_zoom(UI slider1.0x–8.0x; usesCONTROL_ZOOM_RATIOon Android 11+ andSCALER_CROP_REGIONon Android 9–10). - Flashlight Torch (
torch):falsedefault; automatically disabled whenhas_flashisfalse. - Stabilization (
stabilization): Enables optical (LENS_OPTICAL_STABILIZATION_MODE_ONwhen present) and electronic (CONTROL_VIDEO_STABILIZATION_MODE_ON) stabilization (truedefault). - Mount Rotation (
rotation_deg):0(Landscape Upright, full16:9— automatically cancels embeddedSurfaceTexture90°/270°portrait transforms and270°front-camera offsets),180(Landscape Flipped, full16:9),90(Portrait CW), or270(Portrait CCW, cleanly pillarboxed inside the16:9stream).
- Focus: Continuous Video AF (
- Pipeline-Restarting Controls: Changing
preset,width+height,fps(5..60, default15), orcamera_idcleanly restarts the Camera2 + OpenGL + encoder pipeline (and automatically resumes RTMP or HTTP-FLV if active). Standalone updates tovideo_bitrate_kbps(300..12000, default800),audio_bitrate_kbps(32..256, default96), orkeyframe_sec(1..10, default2) take effect on the next encoder start or pipeline restart.
High-PPFD horticultural LED fixtures driven by 120 Hz rectified AC or PWM dimmers often cause severe rolling-shutter horizontal banding on CMOS phone sensors. Four modes are supported in PRO OPTICS and via POST /api/control:
| Mode | Camera2 AE Antibanding | GPU Temporal Ring (FS_TMIX5) |
Extra VRAM | Recommended Use |
|---|---|---|---|---|
off (default) |
AUTO |
Disabled (0 FBOs) |
0 MB |
Sunlight, tungsten, or DC-regulated lighting |
60hz_hw |
60HZ (1/120s multiples) |
Disabled (0 FBOs) |
0 MB |
Standard 60 Hz indoor lighting with fast subject motion (zero motion blur) |
60hz_tmix (anti_flicker: true) |
60HZ (1/120s multiples) |
5-frame RGBA FBO box average (333 ms @ 15fps) |
~39 MB @ 1080p |
Recommended for 60 Hz / 120 Hz / PWM LED grow tents |
50hz_tmix |
50HZ (1/100s multiples) |
5-frame RGBA FBO box average | ~39 MB @ 1080p |
50 Hz mains regions with PWM / rectified LED grow lights |
Caveats: (1) The 5-frame temporal average runs in Pass 1 before Pass 2 HUD compositing, so HUD text and reticles remain 100% razor-sharp with zero ghosting; FBO textures are freed immediately when switched back to
offor60hz_hw. (2) Whenmanual_exposure: true(CONTROL_AE_MODE_OFF), Android Camera2 bypasses hardware AE antibanding because shutter speed is manually locked — choose a flicker-harmonic shutter (1/120sor1/60sfor 60 Hz) alongside60hz_tmix.
| Preset ID | UI Label | Resolution | FPS | Video Bitrate | Audio Bitrate | Keyframe | Default HUD Mode |
|---|---|---|---|---|---|---|---|
sanctuary_eco_1080p15_800k (default) |
Sanctuary Eco 1080p15 (800k) | 1920x1080 |
15 |
800 kbps |
96 kbps |
2s |
sanctuary_card |
relief_1080p15_480k |
Cellular Relief 1080p15 (480k) | 1920x1080 |
15 |
480 kbps |
80 kbps |
2s |
sanctuary_card |
youtube_hd_1080p24_2000k |
YouTube HD 1080p24 (2000k) | 1920x1080 |
24 |
2000 kbps |
96 kbps |
2s |
sanctuary_card |
motion_1080p30_4500k |
High-Motion 1080p30 (4500k) | 1920x1080 |
30 |
4500 kbps |
128 kbps |
2s |
sanctuary_card |
hub_mezzanine_1440p15_4000k |
Hub Mezzanine 2.5K15 (Clean) | 2560x1440 |
15 |
4000 kbps |
128 kbps |
2s |
clean |
All 9 environmental, optical, time, and inertial metrics are structured under priority in GET /api/telemetry (default sampling interval sensor_interval_ms = 500, range 100..10000 ms):
- Time (
priority.time):epoch_ms,iso_local(yyyy-MM-dd'T'HH:mm:ssZ),iso_utc, and IANAtimezone. - Temperature (
priority.temperature): Automatic source priorityexternal_hub(external_temp_cpushed via/api/control) →ambient_hw(TYPE_AMBIENT_TEMPERATURE) →battery(BatteryManager) →imu_die(e.g.,lsm6dso_temp). Exposesprimary_c,primary_f,source, plusambient_hw_c,imu_die_c, andbattery_c. - Pressure (
priority.pressure): Barometric station pressurehpa(e.g., BoschBMP580) + configurable sea-level QNH referencesea_level_ref_hpa(850.0..1100.0, default1013.25hPa). - Altitude (
priority.altitude): Continuous indoor/outdoor hybrid fusion — usesgps_3dwhen 3D GPS horizontalaccuracy_m <= 25.0, and automatically falls back to indoor barometric altitude (barometer_bmp580fromsea_level_ref_hpaandhpa). Reportseffective_m,effective_ft,baro_alt_m,gps_alt_m, andsource. - Light Intensity (
priority.light): Ambient illuminancelux(TYPE_LIGHT) + AC/LEDflicker_hz(auto-detected from hardware flicker sensors when available). - Compass (
priority.compass): FusedTYPE_ROTATION_VECTOR(or accelerometer + magnetometer fallback) remapped viaremapCoordinateSystem(AXIS_X, AXIS_Z)onto the camera optical sightline so upright tripod mounting never hits gimbal lock; automatically adds+180°when switched to a front-facing lens. Reportsheading_deg(0–360°), 16-windcardinal, andreference: "camera_optical_axis". - Humidity (
priority.humidity): Reportsavailable(true/false),rh_pct, andsource(humidity_hwifTYPE_RELATIVE_HUMIDITYexists,external_hubwhenexternal_humidity_pctis injected via/api/control, ornone/RH N/Aon devices without an onboard hygrometer). - Gravity (
priority.gravity): 3-axis vectorx, y, z(m/s²),norm_mps2, and spirit-levelpitch_deg/roll_deg. - Gyroscope (
priority.gyroscope): 3-axis angular ratex, y, z(rad/s),rms_rads, and tripod vibration flagstable(truewhenrms_rads < 0.03).
- OEM Sensor Noise Filtering: By default (
raw_sensors: false),TelemetryCollectorskips one-shot triggers and noisy vendor gesture/SAR/proximity sensors (flatup,stowed,capsense, etc.). Enableraw_sensors: truevia/api/control(or the SENSORS & RTMP tab) and queryGET /api/telemetry?raw_sensors=1to inspect all raw hardware sensor arrays undersensors.
- 3 HUD Profiles (
hud_mode):sanctuary_card(default): 4-corner emerald reticles + top-right glowing status/FPS/callsign/clock pill + bottom-left translucent dark-emerald glass card ( atmospheric row, inertial/compass row, optional GPS row, and inset camera/audio footer).minimal_pill: 4-corner reticles + top-right status/callsign/clock pill only.clean: Zero HUD burn-in (100%raw camera frame) for externalgo2rtc/FFmpeg/ OBS compositors.
- Granular Row & OPSEC Toggles:
hud_enabled(true),hud_env(true),hud_motion(true),hud_camera(true),hud_gps(falsedefault — never burns home/sanctuary coordinates onto video unless explicitly enabled), andhud_radio_power(falsedefault — never burns LAN IP onto video unless explicitly enabled). - Stream Key Redaction: Stream keys are masked in the UI (
PasswordTransformationMethodwithShow/Hide+ smartPasteURL splitter) and redacted to****-<last4>inGET /api/statusand confirmation dialogs.
Stream standalone background music or narrated sessions directly from the phone into RTMP/RTMPS and /stream.flv without an external PC:
- Stage
.mp3,.wav,.m4a,.aac,.flac, or.oggfiles (1 B .. 64 MB) onto phone internal storage viaPOST /api/audio/upload?name=track.mp3and inspect staged tracks viaGET /api/audio/tracks. MusicPcmPlayerdecodes compressed audio viaMediaExtractor+MediaCodec, downmixes multi-channel PCM (16-bitor32-bit float) to mono, and performs fractional linear-interpolation resampling (srcSampleRate -> 44,100 Hz) so48 kHzstudio masters play at exact musical pitch and wall-clock tempo.- Mix live microphone + music with independent gains (
mic_gain:0.0..2.0, default1.0;music_gain:0.0..2.0, default0.90;music_loop:falsedefault). - Hardware Mic Release When Muted: Setting
audio_enabled: falsephysically stops and releasesAudioRecord(clearing Android's green microphone privacy indicator) while a monotonic23.22 ms(1024 / 44100 s) clock continues feedingMusicPcmPlayeraudio or zero-filled silent PCM into AAC so YouTube Live RTMP never stalls for missing audio packets.
- 3 Display Modes (
display_mode/ top-bar chip):keep_awake(Awake, default): Keeps screen on at normal brightness for active framing.blackout(Blackout): KeepsFLAG_KEEP_SCREEN_ONactive at1%brightness behind a near-black#FA000000Sanctuary Blackout curtain so zero stray screen light disturbs dark-cycle plants or IR tents (double-tap anywhere to restoreAwake).auto_sleep(AutoSleep): Allows the physical screen to lock/turn off whileStreamService'sPARTIAL_WAKE_LOCK+WIFI_MODE_FULL_LOW_LATENCYlock keep Camera2, sensors,:8890, and RTMPS running 24/7.
- Full-Resolution Stills & Scheduled Timelapse:
Snap Photo(snap: trueorGET /snapshot.jpg?fullres=1) andtimelapse_enabled(timelapse_interval_sec:3..86400, default60s) capture native full-sensor JPEGs (quality=95) alongside matching<yyyyMMdd_HHmmss>.json9-sensor telemetry sidecars in/sdcard/Android/data/com.palarez.streamcam/files/Pictures/{stills,timelapse}/without interrupting live video, and optionally push both toarchive_url.
Every phone advertises _palarez-cam._tcp. over mDNS (NsdManager) on port 8890 (default) and serves:
| Method & Path | Description |
|---|---|
GET / |
Browser remote console (/mjpeg preview, quick toggles, dry-run validator, 2-step Go Live confirmation) |
GET /api/capabilities |
Hardware lenses, presets, supported resolutions/FPS, HUD modes & physical sensor flags |
GET /api/schema |
Self-describing JSON contract for every endpoint and every POST /api/control field |
GET /api/status |
lifecycle_state (IDLE, ARMED_READY, CONNECTING, STREAMING, ERROR), readiness flags, masked RTMP target, music status, warnings[] & LAN URLs |
GET /api/telemetry |
9 priority sensors + battery, Wi-Fi, GPS, audio dBFS, camera & stream stats (?raw_sensors=1 appends raw vectors) |
GET /snapshot.jpg |
Synchronous 640x360 JPEG (?clean=1 omits HUD non-destructively; ?fullres=1 captures native full-sensor Camera2 JPEG + JSON sidecar) |
GET /mjpeg |
~5 fps 640x360 multipart MJPEG preview (?clean=1 omits HUD; auto-idles GPU readback 15s after disconnect) |
GET /stream.flv |
Live hardware H.264 + AAC-LC HTTP-FLV pull stream (?clean=1 switches shared encoder hud_mode to clean) |
GET /api/audio/tracks |
Lists staged audio files in files/tracks/ and current MusicPcmPlayer + gain state |
POST /api/audio/upload?name=<file> |
Atomic raw binary upload (1 B .. 64 MB; .mp3/.wav/.m4a/.aac/.flac/.ogg) to phone storage |
POST /api/rtmp/validate |
Non-publishing DNS/TCP/TLS/RTMP C0–C2 + AMF0 connect(app) dry-run check (optional {"rtmp_url": "..."}) |
POST /api/control |
Atomic JSON configuration, live Camera2 tuning, external sensor injection, music transport, arming & stream start/stop |
Note on
?clean=1: Requesting/snapshot.jpg?clean=1or/mjpeg?clean=1renders an un-overlaid640x360offscreen pass without changing the active broadcast HUD. Because/stream.flvshares the single hardware H.264 encoder with outbound RTMP, requesting/stream.flv?clean=1setshud_modeto"clean"persistently until re-enabled via UI orPOST /api/control.
# 1. Inspect capabilities, status, and 9 priority sensors
curl -s http://<PHONE_IP>:8890/api/status | jq .
curl -s http://<PHONE_IP>:8890/api/telemetry | jq .priority
# 2. Hot-tune Macro lens (CAM 2), manual 32D (~3.1 cm) focus, daylight AWB & 60Hz 5-frame anti-strobe
curl -s -X POST http://<PHONE_IP>:8890/api/control \
-H 'Content-Type: application/json' \
-d '{"camera_id":"2","manual_focus":true,"focus_distance":32.0,"awb":"daylight","anti_flicker_mode":"60hz_tmix"}'
# 3. Inject external greenhouse hygrometer / temperature from Home Assistant & calibrate QNH
curl -s -X POST http://<PHONE_IP>:8890/api/control \
-H 'Content-Type: application/json' \
-d '{"external_humidity_pct":58.4,"sea_level_hpa":1016.2}'
# 4. Upload a backing track & arm playback from 0:00 with muted hardware mic (does NOT go live)
curl -s -X POST --data-binary @track01.mp3 \
"http://<PHONE_IP>:8890/api/audio/upload?name=track01.mp3"
curl -s -X POST http://<PHONE_IP>:8890/api/control \
-H 'Content-Type: application/json' \
-d '{"audio_enabled":false,"music_gain":0.90,"music_track":"track01.mp3","music_playing":false,"music_seek_start":true}'Designed for operators and automation agents to stage either hub-pulled HTTP-FLV or direct YouTube RTMPS without risking an accidental live broadcast (go-live refuses to run unless --yes-go-live is explicitly passed):
# Discover phones via mDNS (_palarez-cam._tcp), Companion Hub (:8895), or direct IP
./scripts/palarez_ingest_ctl.py discover --ip <PHONE_IP>
# Mode 1 (Hub-Managed): Stage Clean 1440p15 Mezzanine, verify codecs via ffprobe & register in go2rtc
./scripts/palarez_ingest_ctl.py stage-hub --phone <PHONE_IP> \
--preset hub_mezzanine_1440p15_4000k --camera 0 \
--go2rtc http://127.0.0.1:1984 --name palarez_cam1
# Mode 2 (Direct YouTube RTMPS): Load stream key from gitignored .env, arm phone & run non-live TLS/RTMP check
echo 'YOUTUBE_STREAM_KEY_PALAREZ=xxxx-xxxx-xxxx-xxxx-xxxx' >> .env
./scripts/palarez_ingest_ctl.py stage-youtube --phone <PHONE_IP> \
--secrets-env .env --secret-var YOUTUBE_STREAM_KEY_PALAREZ \
--preset sanctuary_eco_1080p15_800k
# Explicitly start or stop outbound RTMP broadcast ONLY when ready
./scripts/palarez_ingest_ctl.py go-live --phone <PHONE_IP> --yes-go-live
./scripts/palarez_ingest_ctl.py stop --phone <PHONE_IP>Sequentially broadcasts an .m3u album playlist directly from the phone to YouTube Live RTMPS as one dedicated live broadcast per track (reading optional <track_stem>.txt lyric sidecars, checking title <= 100 chars and description <= 5000 chars, waiting for YouTube ready -> testing -> live transition before starting MusicPcmPlayer at 0:00 so zero song intros are clipped, and completing each broadcast cleanly):
# Dry-run metadata & duration check (touches neither YouTube nor the phone)
python3 scripts/album_live_orchestrator.py --m3u ./album.m3u --tracks-dir ./tracks --dry-run --all
# Pre-stage all audio tracks onto phone storage while keeping phone IDLE
python3 scripts/album_live_orchestrator.py --phone http://<PHONE_IP>:8890 \
--m3u ./album.m3u --tracks-dir ./tracks --upload-only --allpalarez-cam.apk requires zero server to operate. Deploy the lightweight Python stdlib Companion Hub (companion/server.py or compose.yaml) if you want browser QR APK installation, multi-phone LAN discovery (GET /api/phones), or central JSONL telemetry + JPEG frame archival:
# Option A: Self-compiling Docker container (builds APK on first boot + serves :8895)
docker compose up -d --build
# Option B: Direct Python stdlib server on host
./build_apk.sh
python3 companion/server.pyPoint Companion Archive URL in Tab 3 (or archive_url in POST /api/control) to http://<HUB_IP>:8895 to stream periodic telemetry into data/telemetry.jsonl (GET /api/latest, GET /api/phones) and archive stills/timelapse frames under data/frames/ (GET /frames/<filename>).
Unlike typical Android Studio apps that depend on Gradle daemons, Maven caches, AndroidX/Jetpack, and dozens of opaque transitive libraries, palarez-cam compiles 100% offline in ~5 seconds using 5 direct Android SDK commands (aapt2 → javac --release 11 → d8 → zipalign → apksigner) in build_apk.sh:
| Dimension | Typical Gradle Camera App | palarez-cam Zero-Gradle Build |
|---|---|---|
| APK Size & Compatibility | 15 – 50 MB (often split by CPU ABI) |
113 KB single universal Pure-DEX APK (arm64 / armv7 / x86_64) |
| Clean Build Speed | 30s – 5+ min + heavy JVM daemon (1–4 GB RAM) |
~5 seconds clean build, zero daemon |
| Dependencies & Auditability | 50–200+ Maven/AAR packages | 0 third-party libraries — all runtime code lives in 9 readable .java files |
| Offline & Long-Term Durability | Breaks across AGP/Gradle/Kotlin upgrades | 100% offline with standard Java 11 + Android SDK CLI tools |
Read or share the full standalone breakdown: GitHub Gist — Why
palarez-camUses a Zero-Gradle Android Build
Requires JDK 11+ (e.g., OpenJDK 17/21), Python 3, zip, and Android SDK Platform 35 + Build-Tools 35.0.0 (build_apk.sh auto-detects ANDROID_HOME, ANDROID_SDK_ROOT, ~/.local/share/android-sdk, ~/Android/Sdk, ~/Library/Android/sdk, and /opt/android-sdk):
git clone https://github.com/chieftechnicalwizard/palarez-cam.git
cd palarez-cam
./build_apk.sh
adb install -r output/palarez-cam.apk
build_apk.shautomatically generates a local RSA-2048 signing keystore in gitignoredkeystore/palarez-cam.jks(keystore/.storepass) on first build so iterativeadb install -rupgrades preserve app preferences and staged tracks.
Both broadcast modes were verified end-to-end on real Android hardware with live Cyber-Flora Sanctuary Glass HUD telemetry (1920x1080@15fps 800kbps H.264 + AAC, 0 errors):
- Channel Live Streams Page: https://www.youtube.com/@honeywaxtreefarm/streams
| # | Broadcast Test | Mode | Length | Verified Public Live / VOD Link |
|---|---|---|---|---|
| 00 | TBM Monstrose Boogie (3:33 Timed Go-Live Test) |
Phone /stream.flv → ffmpeg + .wav → YouTube RTMPS |
3:33 |
https://www.youtube.com/watch?v=y4jfJnNcGkE |
All 11 tracks of the Honey Wax Tree Farm (Original v1.0) album were streamed sequentially directly from the phone (com.palarez.streamcam → rtmps://a.rtmps.youtube.com/live2, on-device MusicPcmPlayer 48→44.1 kHz PCM mixing, mic muted) using scripts/album_live_orchestrator.py:
| # | Track Title | Length | Verified Public Live / VOD Link |
|---|---|---|---|
| 01 | Crown of the Sacred Geometry | 299.52s |
https://www.youtube.com/watch?v=zzqD8jWwZhs |
| 02 | Crystal Lens of the Desert | 265.82s |
https://www.youtube.com/watch?v=DwQnbuSISfs |
| 03 | Ascension of El Serpiente | 243.07s |
https://www.youtube.com/watch?v=m1uxzkpwhco |
| 04 | Solar Temple Horizon | 269.71s |
https://www.youtube.com/watch?v=_Nl-oz0AFu4 |
| 05 | Midnight Flower Supernova | 252.00s |
https://www.youtube.com/watch?v=KQXWhTVePYA |
| 06 | Sacred Geometry Funk | 301.03s |
https://www.youtube.com/watch?v=nnBelFlt7rQ |
| 07 | TBM Monstrose Boogie | 360.02s |
https://www.youtube.com/watch?v=TJHYL_Mr08E |
| 08 | Dayman & The Cosmic Mirage | 286.94s |
https://www.youtube.com/watch?v=0FefgONut9w |
| 09 | Areole Electric Alchemy | 311.59s |
https://www.youtube.com/watch?v=vdm-C3nHe3U |
| 10 | Super Pedro Intergalactic Groove | 248.95s |
https://www.youtube.com/watch?v=30vZBR-nIyE |
| 11 | Sunrise at Honey Wax Oasis | 214.94s |
https://www.youtube.com/watch?v=H4Yh78DmX8s |
- My video appears sideways or upside down: Open PRO OPTICS → Camera Mount Rotation Fix. Use
0 deg (Landscape Upright)when mounted horizontally with the charging port on the right,180 degif mounted horizontally upside-down, or90/270 degfor vertical portrait mounting. - Rolling dark stripes / flickering under LED grow lights: Open PRO OPTICS and turn on Reduce LED Strobe (
60Hz AE + 5-Frame GPU Anti-Strobe) (or50Hzin 50 Hz mains regions). If you also enable Manual Exposure, pick a shutter speed divisible by your mains frequency (1/120sor1/60sfor 60 Hz;1/100sor1/50sfor 50 Hz). - Stream buffers or drops frames on slow Wi-Fi: Switch the preset in CAPTURE & LIVE from
800ktoCellular Relief 1080p15 (480k), or verify your Wi-Fi uplink sustains at least1.5xthe chosen video + audio bitrate. - YouTube Studio shows "No Data": Tap Test Ingest (Dry-Run) in SENSORS & RTMP to verify DNS, TLS, and RTMP
connectreachability, and double-check that your stream key matches the active YouTube Studio broadcast. - Android says "App not installed (package conflicts)" when upgrading: Prebuilt GitHub Release APKs and self-built
./build_apk.shAPKs use different signing keys. Uninstall the previous copy once before switching between a Release APK and a self-compiled build.
Sponsorship and donations support Shekinah Shine maintenance, sanctuary groundskeeping, 24/7 broadcast infrastructure, and open-source development.
·
PayPal Donate (Shekinah Shine) ·
Cash App ·
Venmo ·
GitHub Sponsors ·
Shekinah Shine Website
Released under the Apache License 2.0 — see NOTICE.




