From fdcad574409205a84a8b9fd6914fd28ad80dd097 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 22 Sep 2014 15:50:27 +0200 Subject: Add option --sample-length. --- localvideowebencode | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'localvideowebencode') diff --git a/localvideowebencode b/localvideowebencode index 3830a2a..71699fa 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -92,6 +92,8 @@ html favoring open formats with optional non-JavaScript Flash fallback. --sample Create only a 150 frames long sample. --sample-start Create sample, starting at a specific frame. (default: start at first frame) + --sample-length Create sample, of specified length in frames. + (default: 150 frames - i.e. approx. 5s) -h, --help This help text Examples: @@ -130,7 +132,7 @@ samplestart=0 samplelength=150 # parse cmdline options -TEMP="`getopt -s sh -o hp:s:a:r:b:t: -l help,profile:,size:,aspect:,rate:,video:,refbpp:,bitrate:,formats:,h264profile:,h264preset:,webmpreset:,audio:,audioprefilter:,loudness,loudness-results:,filter:,stem:,title:,sample,sample-start: -n "$PRG" -- "$@"`" || exit1 "Internal getopt error." +TEMP="`getopt -s sh -o hp:s:a:r:b:t: -l help,profile:,size:,aspect:,rate:,video:,refbpp:,bitrate:,formats:,h264profile:,h264preset:,webmpreset:,audio:,audioprefilter:,loudness,loudness-results:,filter:,stem:,title:,sample,sample-start:,sample-length: -n "$PRG" -- "$@"`" || exit1 "Internal getopt error." eval set -- "$TEMP" while true ; do case "$1" in @@ -155,6 +157,7 @@ while true ; do -t|--title) title="$2"; shift 2;; --sample) sample=yes; shift;; --sample-start) sample=yes; samplestart="$2"; shift 2;; + --sample-length) sample=yes; samplelength="$2"; shift 2;; --) shift; break;; *) exit1 "Internal error resolving options.";; esac -- cgit v1.2.3