From 60844fe0c16db3486aa20d83f6939262b1b4d3ce Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Mon, 21 May 2018 21:56:56 +1000 Subject: [PATCH] update synopses --- avchdtomp4.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/avchdtomp4.sh b/avchdtomp4.sh index ccc5312..24373f3 100755 --- a/avchdtomp4.sh +++ b/avchdtomp4.sh @@ -1,7 +1,7 @@ #! /bin/bash # AVCHD to MP4 converter -# ffmpeg cmdline taken from http://pvdm.xs4all.nl/wiki/index.php/Convert_an_AVCHD_/_MTS_file_to_MP4_using_ffmpeg +# ffmpeg arguments taken from http://pvdm.xs4all.nl/wiki/index.php/Convert_an_AVCHD_/_MTS_file_to_MP4_using_ffmpeg OPTIND=1 @@ -9,6 +9,14 @@ src="" dest="" verbose=0 +if (( $# < 2 )) + then + printf "\n\x1b[31mWrong number of arguments\x1b[0m\n\n" + printf "Usage: avchdtomp4 -s SOURCE -d DESTINATION [-v]\n where SOURCE is the source file, or a directory scanned for *.MTS files\n DESTINATION is the output directory relative to working directory\n [-v] enables verbose mode in ffmpeg" + exit 1 +fi + + while getopts s:d:v option; do case "$opt" in s) -- 2.43.2