Skip to content

Instantly share code, notes, and snippets.

@steverobbins
Created November 28, 2024 07:35
Show Gist options
  • Save steverobbins/226f0ba7a2dea48172923f23fad7faeb to your computer and use it in GitHub Desktop.
Save steverobbins/226f0ba7a2dea48172923f23fad7faeb to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
YESTERDAY=$1
DATETIME=`date -u +"%Y%m%d%H%M%S"`
#DATETIME=20241119024831
./run.sh stgo-n-mobo-c,stgo-e-mobo-c,stgo-w-mobo-c,stgo-s-mobo-c "$YESTERDAY" $2 "$DATETIME"
cd ~/Downloads
ffmpeg -i "file:stgo-n-mobo-c-$YESTERDAY-$DATETIME.mp4" -i "file:stgo-e-mobo-c-$YESTERDAY-$DATETIME.mp4" -i "file:stgo-w-mobo-c-$YESTERDAY-$DATETIME.mp4" -i "file:stgo-s-mobo-c-$YESTERDAY-$DATETIME.mp4" -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" tmp.mp4
ffmpeg -i file:tmp.mp4 -vf scale=-1:2048 "news-$YESTERDAY-$DATETIME.mp4"
rm -rf tmp.mp4
@steverobbins
Copy link
Author

steverobbins commented Nov 28, 2024

Put this in the directory of https://github.com/steverobbins/HPWREN-video-maker and run it. It will generate a 2x2 video from the Santiago north, east, west, and south cameras

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment