From 8919ec3d4d229b46f402fd59608e6d4f4b0bc870 Mon Sep 17 00:00:00 2001 From: simono41 Date: Sun, 1 Apr 2018 15:45:57 +0200 Subject: [PATCH] convert_to_png.sh --- convert_to_png.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 convert_to_png.sh diff --git a/convert_to_png.sh b/convert_to_png.sh new file mode 100755 index 0000000..4a8c587 --- /dev/null +++ b/convert_to_png.sh @@ -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 /*.mp4 +