Ajouter png-to-vertical-video-mp4.sh

This commit is contained in:
Francois Pelletier 2024-02-03 21:58:16 +00:00
parent 1e97a12980
commit 0813ee0a4a

View file

@ -0,0 +1,21 @@
declare -a ori=("v" "c" "h")
tsfile=$(date -d "today" +"%Y%m%d%H%M%S")
for f in "${ori[@]}"
do
for i in *.png
do
for j in $(seq 1 3)
do
convert $i -gravity center -background black -scale 540x960 -extent 540x960 $i-framed${f}$j.png
done
done
mkdir -p frames${f}/
convert -limit memory 4GiB -limit map 4GiB *-framed${f}*.png -delay 10 -morph 10 frames${f}/%05d.morph.png
ffmpeg -i frames${f}/%05d.morph.png -c:v libx264 -vf fps=15 -pix_fmt yuv420p output-${tsfile}-${f}.mp4
rm -rf frames${f}
done
rm -f *-framed*.png