summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-09-22 15:50:27 +0200
committerJonas Smedegaard <dr@jones.dk>2014-09-22 18:03:03 +0200
commitfdcad574409205a84a8b9fd6914fd28ad80dd097 (patch)
treef3bf42aa8236c4428514ad79d1a35ec8ab347890
parentf3680d46d06deab82c01e484261c783e82d6005a (diff)
Add option --sample-length.
-rwxr-xr-xlocalvideowebencode5
1 files changed, 4 insertions, 1 deletions
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