summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdot/local/bin/webencode17
1 files changed, 6 insertions, 11 deletions
diff --git a/dot/local/bin/webencode b/dot/local/bin/webencode
index ede6b72..26c62fc 100755
--- a/dot/local/bin/webencode
+++ b/dot/local/bin/webencode
@@ -1,14 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2CODEC='-c:a aac -c:v libx264'
3INPUT=$1
3case $# in 4case $# in
4 2) INPUT=$1 5 1) OUTPUT=${INPUT%.*}.web.mp4 ;;
5 OUTPUT=$2 6 2) OUTPUT=$2 ;;
6 ;; 7 *) echo "Usage: $0 <input> [output]" >&2; exit 1 ;;
7 1) INPUT=$1
8 OUTPUT=${1%.*}.web.mp4
9 ;;
10 *) exit 1
11 ;;
12esac 8esac
13 9exec ffmpeg -hide_banner -i "$INPUT" $CODEC "$OUTPUT"
14ffmpeg -hide_banner -i "$INPUT" -c:a aac -c:v libx264 "$OUTPUT"