4-seasons: validate JPEGs with ffprobe, add optional grey-frame filter
The previous size check caught empty files but not corrupt JPEGs with a partial header (common first frame after a camera reconnect). Replace with ffprobe codec detection — if ffprobe can't identify a video stream in the file it's skipped with a clear "corrupt" message. Also adds SEASONS_GREY_STDDEV_MIN (default 0 = off): when enabled, frames with near-zero pixel standard deviation (uniform grey = bad RTSP signal) are silently dropped before encoding. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
@@ -255,6 +255,16 @@ CRF_MONTAGE_FINAL=22 # montage-mvt.sh — final archive montage (H
|
||||
ENCODE_PRESET=slow # ffmpeg preset for all encodes (slow/medium/fast)
|
||||
AUDIO_BITRATE=192k # montage-mvt.sh — music track on movement montages
|
||||
|
||||
# ── Frame validation (4-seasons.sh) ──────────────────────────────────────────
|
||||
# Corrupt or empty frames (e.g. first frame after a camera reconnect) are always
|
||||
# skipped automatically via ffprobe.
|
||||
#
|
||||
# SEASONS_GREY_STDDEV_MIN: also skip uniform-grey frames caused by a bad RTSP
|
||||
# signal. These are valid JPEGs but contain a near-solid grey image.
|
||||
# Value is the minimum pixel standard deviation on a 0–255 scale.
|
||||
# 0 = disabled (default). Try 5–10 if your camera produces grey frames on reconnect.
|
||||
SEASONS_GREY_STDDEV_MIN=0
|
||||
|
||||
# ── Montage attribution overlay ───────────────────────────────────────────────
|
||||
# A translucent bar across the top of each movement montage, naming the
|
||||
# music source ("The Four Seasons — Antonio Vivaldi ...").
|
||||
|
||||
Reference in New Issue
Block a user