diff options
| author | Luke Hoersten <[email protected]> | 2026-06-15 06:47:57 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-06-15 06:47:57 -0500 |
| commit | 80defa7ee6815984477030464e3587b54e0e9f51 (patch) | |
| tree | bb8dc4c4db6ef7701c11a13efe1b21020b348c1e /main/http_api.c | |
| parent | 7b04ad6faf3bb70a0c3783e8446275f6f152b61e (diff) | |
scrypted: snapshot quality — fetch native res, resize + re-encode via ffmpeg
Stopped asking cam.takePicture for a specific dimension. Most camera
plugins default snapshot JPEGs to q≈75 and do a quick bilinear downscale
from native (1920x1080 or so) to whatever we requested, which looked
visibly worse than the H.264 keyframe from the same camera at the same
panel resolution.
pushFrame now:
1. takePicture without picture.{width,height} → native-res JPEG
2. spawn ffmpeg child_process: scale w:h:flags=lanczos, mjpeg q:v 2
3. POST the result.
q:v 2 is near-lossless; Lanczos is a sharper downscale than the camera
plugin's default. Adds ~10-20 ms ffmpeg work per frame on a real CPU
(noise-level on a Pi 4), well under the snapshot-source ceiling that
already gates pushFrame at ~500 ms.
Diffstat (limited to 'main/http_api.c')
0 files changed, 0 insertions, 0 deletions
