2020-05-02 10:56:51 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ "$#" -ne 3 ]; then
|
|
|
|
echo "USAGE: $0 FILE START DURATION"
|
|
|
|
fi
|
|
|
|
|
|
|
|
fullpath="$1"
|
|
|
|
dir=`dirname $fullpath`
|
|
|
|
filename=`basename $fullpath`
|
|
|
|
extension="${filename##*.}"
|
|
|
|
filename="${filename%.*}"
|
|
|
|
outfile="$dir/$filename""Cut.$extension"
|
|
|
|
|
2020-05-02 11:08:32 +02:00
|
|
|
echo "$outfile"
|
2020-05-02 10:56:51 +02:00
|
|
|
|
|
|
|
ffmpeg -y -ss "$2" -t "$3" -i "$fullpath" "$outfile"
|