snippets/speedUpVideo

17 lines
294 B
Plaintext
Raw Permalink Normal View History

2022-11-26 20:53:44 +01:00
#!/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"