diff --git a/vidmod b/vidmod index 3d4e37e..bda8cf6 100755 --- a/vidmod +++ b/vidmod @@ -18,9 +18,9 @@ vidmod_main() { d) outputdir="$OPTARG" ;; f) ffmpeg_extra_opts="$OPTARG" ;; o) final="$OPTARG" ;; - h) vidmod_usage && return ;; + h) vidmod_help && return ;; v) vidmod_version && return ;; - *) vidmod_usage && return $e_args ;; + *) vidmod_help && return $e_args ;; esac done @@ -70,6 +70,27 @@ vidmod_main() { done } +vidmod_help() { +cat << USAGE +$scriptname $VERSION + +Usage: $scriptname [options] change1 [change2...] input + +Do rapid changes to video files using ffmpeg or other tools. + +Changes: 60fps, butter, crossfade, loop, mp4, mute, reverse, slowdown, twitter + +Options: + + -d Output directory. Defaults to directory of input file. + -o Last output file. When specified, any intermediate file will + be temporary. + -h Show this help screen. + -v Show version. + +USAGE +} + vidmod_169() { # shellcheck disable=SC2086 ffmpeg -i "$input" $ffmpeg_opts -vf "setdar=16/9" "$output" @@ -163,24 +184,6 @@ vidmod_twitter() { "$output" } -vidmod_usage() { - echo "$scriptname $VERSION" - echo - echo "Usage: $scriptname [options] change1 [change2...] input" - echo - echo "Do rapid changes to video files using ffmpeg or other tools." - echo - echo "Changes: 60fps, butter, crossfade, loop, mp4, mute, reverse, slowdown, twitter" - echo - echo "Options:" - echo - echo " -d Output directory. Defaults to directory of input file." - echo " -o Last output file. When specified, any intermediate file will" - echo " be temporary." - echo " -h This help screen." - echo -} - vidmod_version() { echo "$scriptname $VERSION" }