1
0
Fork 0

refactor ffmpeg-x265

This commit is contained in:
VirtuBox 2020-08-10 18:10:06 +02:00
parent 21b6205653
commit 699f151800
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
1 changed files with 14 additions and 6 deletions

View File

@ -756,12 +756,20 @@ _TRANSFER_AUDIO() {
} }
_x265_encode() { _x265_encode() {
if [ "$#" -eq 1 ]; then if [ "$#" -eq 0 ]; then
ffmpeg -i "$1" -c:v libx265 -crf 28 -c:a aac -b:a 160k "${1%.*}-x265.mp4" echo "Usage : ffmpeg-x265 <file> <options>"
else echo "Options :"
for i in "$PWD"/*; do echo " -d : process all files in the current directory"
ffmpeg -i "$i" -c:v libx265 -crf 28 -c:a aac -b:a 160k "${i%.*}-x265.mp4" elif [ "$#" -eq 1 ]; then
done if [ "$1" = "-d" ]; then
for i in "$PWD"/*; do
ffmpeg -i "$i" -c:v libx265 -crf 28 -c:a aac -b:a 160k "${i%.*}-x265.mp4"
done
else
if [ -f "$1" ]; then
ffmpeg -i "$1" -c:v libx265 -crf 28 -c:a aac -b:a 160k "${1%.*}-x265.mp4"
fi
fi
fi fi
} }