snippets/cutVideo
2020-05-14 20:01:22 +02:00

18 lines
328 B
Bash
Executable File

#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "USAGE: $0 FILE START DURATION"
exit 1
fi
fullpath="$1"
dir=`dirname "$fullpath"`
filename=`basename "$fullpath"`
extension="${filename##*.}"
filename="${filename%.*}"
outfile="$dir/$filename""Cut.$extension"
echo "$outfile"
ffmpeg -y -ss "$2" -to "$3" -i "$fullpath" "$outfile"