#!/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"