Ajouter png-to-vertical-video-mp4.sh
This commit is contained in:
parent
1e97a12980
commit
0813ee0a4a
1 changed files with 21 additions and 0 deletions
21
png-to-vertical-video-mp4.sh
Normal file
21
png-to-vertical-video-mp4.sh
Normal 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
|
Loading…
Reference in a new issue