mirror of
https://github.com/mr0xb/scripts.git
synced 2026-08-27 19:34:57 -04:00
.
This commit is contained in:
parent
62156a1d85
commit
e698f046c8
5 changed files with 183 additions and 0 deletions
18
media/handbrake/handbrake.sh
Normal file
18
media/handbrake/handbrake.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#/bin/bash
|
||||
|
||||
file="$1"
|
||||
if [ -f "$file" ];
|
||||
then
|
||||
|
||||
output="${file##*/}"
|
||||
/usr/bin/HandBrakeCLI --preset-import-gui preset.json -map-metadata 0 -E mp3 -B 128 -b 1600 -e x265 -x vbv-maxrate=1600 -x vbv-bufsize=2200 -X 1920 -Y 1080 --audio-lang-list "eng" --subtitle-lang-list "eng" --all-subtitles -i "${file}" -o "${output%.*}.mkv"
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "would have moved $file to $file.old" >> log.txt
|
||||
echo "would have moved $output to $file" >> log.txt
|
||||
else
|
||||
echo "error with $file" >> error.txt
|
||||
fi
|
||||
else
|
||||
echo "$file not found!" >> error.log
|
||||
fi
|
||||
Loading…
Reference in a new issue