dotfiles/scripts/slideshow
2023-04-25 09:22:57 -05:00

22 lines
444 B
Bash
Executable file

#!/usr/bin/env bash
while getopts af: flag
do
case "${flag}" in
a) all="true";;
f) fullname=${OPTARG};;
*) echo ${OPTARG};;
esac
done
echo $all
# echo $2
if [ $all ]; then
ffmpeg -framerate 1 -pattern_type glob -i '*.jpg' \
-vf 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1' \
-c:v libx264 -r 30 -pix_fmt yuv420p slideshow.mp4
fi