18 lines
595 B
Bash
Executable File
18 lines
595 B
Bash
Executable File
#!/usr/bin/env bash
|
||
PI_HOST="nikto@192.168.42.253" # user@IP‑of lesavka
|
||
REMOTE_DIR="/tmp" # where eye*-idr.h264 are written
|
||
|
||
set -eu
|
||
WORKDIR="$(mktemp -d)"
|
||
echo "⏬ pulling h264 samples from $PI_HOST ..."
|
||
scp "${PI_HOST}:${REMOTE_DIR}/eye*.h264" "$WORKDIR/"
|
||
|
||
echo "🎞️ converting to PNG ..."
|
||
for h264 in "$WORKDIR"/eye*.h264; do
|
||
png="${h264%.h264}.png"
|
||
ffmpeg -loglevel error -y -f h264 -i "$h264" -frames:v 1 "$png"
|
||
echo "🖼️ $(basename "$png") ready"
|
||
xdg-open "$png" >/dev/null 2>&1 &
|
||
done
|
||
echo "✅ done - images are opening (directory: $WORKDIR)"
|