conver_to_gif
This commit is contained in:
parent
993fe0d4f3
commit
8f92f2ed8b
1 changed files with 23 additions and 0 deletions
23
convert_to_gif.sh
Executable file
23
convert_to_gif.sh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
pfad="${1%/*}"
|
||||||
|
mkdir -p ${pfad}/frames
|
||||||
|
|
||||||
|
while (( "$#" ))
|
||||||
|
do
|
||||||
|
|
||||||
|
cd "${1%/*}" # gehe ins Verzeichnis
|
||||||
|
|
||||||
|
FILENAME=${1##*/} # Dateiname ist alles ab dem letzten '/'
|
||||||
|
echo "$FILENAME"
|
||||||
|
# guck dir die Ausgabe erstmal an - wenn alles passt kannst Du das "echo" weglassen
|
||||||
|
ffmpeg -i "$FILENAME" -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png
|
||||||
|
shift
|
||||||
|
cd -
|
||||||
|
done
|
||||||
|
|
||||||
|
convert -loop 0 ${pfad}/frames/ffout*.png output.gif
|
||||||
|
#convert.sh <Ordner>/*.mp4
|
||||||
|
|
Loading…
Reference in a new issue