From c66ff4e336dbf8d7bd466bff66afc752a2f95726 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sat, 2 May 2020 10:56:51 +0200 Subject: [PATCH] cutVideo --- cutVideo | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 cutVideo diff --git a/cutVideo b/cutVideo new file mode 100755 index 0000000..d73ab5a --- /dev/null +++ b/cutVideo @@ -0,0 +1,16 @@ +#!/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" + +echo "--> $outfile" + +ffmpeg -y -ss "$2" -t "$3" -i "$fullpath" "$outfile"