diff options
Diffstat (limited to 'dot/local/bin/webencode')
-rwxr-xr-x | dot/local/bin/webencode | 17 |
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 | 2 | CODEC='-c:a aac -c:v libx264' | |
3 | INPUT=$1 | ||
3 | case $# in | 4 | case $# 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 | ;; | ||
12 | esac | 8 | esac |
13 | 9 | exec ffmpeg -hide_banner -i "$INPUT" $CODEC "$OUTPUT" | |
14 | ffmpeg -hide_banner -i "$INPUT" -c:a aac -c:v libx264 "$OUTPUT" | ||