From 60a19494de8fdbf048beb78801638a117da74aa4 Mon Sep 17 00:00:00 2001 From: legop3 Date: Sat, 22 Nov 2025 22:53:01 -0500 Subject: [PATCH] ugh --- pi/bin/video-publisher.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pi/bin/video-publisher.sh b/pi/bin/video-publisher.sh index e41a4dcf..e41dde68 100644 --- a/pi/bin/video-publisher.sh +++ b/pi/bin/video-publisher.sh @@ -17,7 +17,8 @@ VIDEO_WIDTH="${VIDEO_WIDTH:-1920}" VIDEO_HEIGHT="${VIDEO_HEIGHT:-1080}" VIDEO_FPS="${VIDEO_FPS:-30}" VIDEO_BITRATE="${VIDEO_BITRATE:-3000000}" -FLIP_ARGS=(--transform rotate180) +# Flip the camera 180deg (supported by rpicam-vid/libcamera-vid) +FLIP_ARGS=(--rotation 180) if [[ -n "${LIBCAMERA_BIN:-}" ]]; then LIBCAMERA_BIN_PATH="$LIBCAMERA_BIN" @@ -39,6 +40,12 @@ else exit 1 fi +# Prefer a single rotate flag when supported; fall back to h+v flip otherwise. +FLIP_ARGS=(--hflip --vflip) +if "${LIBCAMERA_BIN_PATH}" --help 2>&1 | grep -q -- "--rotation"; then + FLIP_ARGS=(--rotation 180) +fi + run_pipeline() { "${LIBCAMERA_BIN_PATH}" \ --inline \