From: Andrew Lorimer Date: Mon, 21 May 2018 11:56:56 +0000 (+1000) Subject: update synopses X-Git-Url: https://git.lorimer.id.au/scripts.git/diff_plain/60844fe0c16db3486aa20d83f6939262b1b4d3ce update synopses --- 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)