RE: Post Processing script - need help please » test_process.sh
1 |
#!/bin/bash
|
---|---|
2 |
|
3 |
# Your output directory (change this), and make sure it's writable:
|
4 |
OUTPUT_DIR="/home/liljim/testrecordings" |
5 |
|
6 |
SOURCE_PATH="$1" |
7 |
BASE_NAME="$2" |
8 |
|
9 |
# gets the filename, without the extension, from the basename
|
10 |
FILENAME="${BASE_NAME%.*}" |
11 |
|
12 |
# assigns it to new variable
|
13 |
DEST="$OUTPUT_DIR/$FILENAME.mp4" |
14 |
|
15 |
echo "Encoding '$SOURCE_PATH' to '$DEST'" |
16 |
|
17 |
/usr/bin/HandBrakeCLI -Z "Android 1080p30" -O -s 1 -i "$SOURCE_PATH" -o "$DEST" |
18 |
|
19 |
echo "DONE Encoding '$SOURCE_PATH' to '$DEST'" |
20 |
|
21 |
# Uncomment this when you're done testing
|
22 |
#rm $1
|