aboutsummaryrefslogtreecommitdiff
path: root/cutVideo
blob: db0f8d00bbbf88daee763ee071a83cb0fb95091c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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"