Files
maintenance/media/h265Batch.sh
2022-11-15 08:17:46 -05:00

15 lines
556 B
Bash

#!/bin/bash
#
# This script requires HandBrakeCLI. On macOS, at least, you need to download
# and install it separately from Handbrake.
#
# See: https://handbrake.fr/downloads2.php
if [ -z "$1" ] ; then
TRANSCODEDIR="."
else
TRANSCODEDIR="$1"
fi
# Change the preset if you like (see options: "HandBrakeCLI --preset-list")
# If you want to transcode ALL movie files, remove the -name option.
find "$TRANSCODEDIR"/* -type f -name "*.*" -exec bash -c 'HandBrakeCLI -i "$1" -o "${1%\.*}".m4v --preset="Hardware/H.265 NVENC 1080p"' __ {} \;