This commit is contained in:
gutmet 2020-05-14 20:01:22 +02:00
parent f92fbfc0c7
commit ea5e382e6e
3 changed files with 14 additions and 6 deletions

View File

@ -1,10 +1,16 @@
#!/bin/bash #!/bin/bash
cutFile="$(cutVideo $1 $2 $3)" if [ "$#" -ne 3 ]; then
echo "USAGE: $0 FILE START DURATION"
exit 1
fi
cutFile="$(cutVideo "$1" "$2" "$3")"
echo "cutFile=$cutFile"
status=$? status=$?
if [ $status -eq 0 ]; then if [ $status -eq 0 ]; then
echo "$(shrinkVideo $cutFile)" echo "$(shrinkVideo "$cutFile")"
status=$? status=$?
if [ $status -eq 0 ]; then if [ $status -eq 0 ]; then
rm "$cutFile" rm "$cutFile"

View File

@ -2,11 +2,12 @@
if [ "$#" -ne 3 ]; then if [ "$#" -ne 3 ]; then
echo "USAGE: $0 FILE START DURATION" echo "USAGE: $0 FILE START DURATION"
exit 1
fi fi
fullpath="$1" fullpath="$1"
dir=`dirname $fullpath` dir=`dirname "$fullpath"`
filename=`basename $fullpath` filename=`basename "$fullpath"`
extension="${filename##*.}" extension="${filename##*.}"
filename="${filename%.*}" filename="${filename%.*}"
outfile="$dir/$filename""Cut.$extension" outfile="$dir/$filename""Cut.$extension"

View File

@ -2,11 +2,12 @@
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo "USAGE: $0 FILE" echo "USAGE: $0 FILE"
exit 1
fi fi
fullpath="$1" fullpath="$1"
dir=`dirname $fullpath` dir=`dirname "$fullpath"`
filename=`basename $fullpath` filename=`basename "$fullpath"`
filename="${filename%.*}" filename="${filename%.*}"
outfile="$dir/$filename""Shrunk.mp4" outfile="$dir/$filename""Shrunk.mp4"