diff options
-rwxr-xr-x | localvideowebencode | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/localvideowebencode b/localvideowebencode index 4ed0bcb..b89e6b0 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -38,6 +38,8 @@ html favoring open formats with optional non-JavaScript Flash fallback. -t, --title Title used in html fallback graphics (default: stem) --filter Add melt filter (applied to all input files) + --sample[=frame] Limit output to a 150 frames sample from + beginning or optionally a later start frame -h, --help This help text Examples: @@ -70,7 +72,7 @@ bitrate=768k h264profile=baseline # parse cmdline options -TEMP="`getopt -s sh -o hs:a:b:p:t: -l help,size:,aspect:,bitrate:,profile:,h264profile:,stem:,title:,filter: -n "$PRG" -- "$@"`" || exit1 "Internal getopt error." +TEMP="`getopt -s sh -o hs:a:b:p:t: -l help,size:,aspect:,bitrate:,profile:,h264profile:,stem:,title:,filter:,sample:: -n "$PRG" -- "$@"`" || exit1 "Internal getopt error." eval set -- "$TEMP" while true ; do case "$1" in @@ -90,6 +92,7 @@ while true ; do esac done ;; + --sample) sample="in=${2:-0} out=$((${2:-0} + 150))"; shift 2;; --) shift; break;; *) exit1 "Internal error resolving options.";; esac @@ -125,7 +128,7 @@ title=${title:-$stem} # TODO: Check and fail if all needed tools are not available # TODO: When verified beneficial, add option real_time=-2 -args_in="-progress ${profile:+-profile $profile}${args_in:+ $args_in}" +args_in="-progress $sample ${profile:+-profile $profile}${args_in:+ $args_in}" args=" ${bitrate:+b=${bitrate}} ${size:+s=$size} ${aspect:+aspect=$aspect}" args_audio="ac=2 ar=44100 ab=96k" |