From 2462cddbd76f4d41e915722a696e87c6edc17127 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sat, 26 Nov 2022 20:53:44 +0100 Subject: [PATCH] snippet for speeding up videos --- speedUpVideo | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 speedUpVideo diff --git a/speedUpVideo b/speedUpVideo new file mode 100755 index 0000000..dc89307 --- /dev/null +++ b/speedUpVideo @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ "$#" -ne 2 ]; then + echo "USAGE: $0 FILE FACTOR" + exit 1 +fi + +fullpath="$1" +factor=$(echo "1.0 $2" | awk '{printf "%.2f", $1/$2}') + +source fileextensions +outfile="$dir/$filename""Speed.mp4" + +echo "$outfile" + +ffmpeg -y -i "$fullpath" -filter:v "setpts=$factor*PTS" "$outfile"