8 Commits

Author SHA1 Message Date
Ray Lyon
935b4d4e8b Merge pull request #1 from skoobasteeve/functions
Functions
2022-07-01 17:52:48 -04:00
Ray Lyon
a39903d110 Merge branch 'main' into functions 2022-07-01 17:52:39 -04:00
a765093f64 added starz and showtime 2022-03-28 19:48:18 -04:00
Ray Lyon
b68daead14 Merge pull request #2 from skoobasteeve/movie-check-script
Movie check script
2022-03-28 19:37:16 -04:00
394a92efaa merge? 2020-11-28 16:48:13 -05:00
d914434618 More error handling, input file check 2020-11-25 17:03:16 -05:00
2217c1d773 added file input option, broke into functions 2020-11-25 16:31:14 -05:00
8a8cf03861 error function and for loop fix 2020-11-25 15:04:51 -05:00
2 changed files with 8 additions and 4 deletions

View File

@@ -45,10 +45,10 @@ folder_encode () {
FILENAME=$(basename "$FILE") FILENAME=$(basename "$FILE")
if [[ $RES -gt 1920 ]]; then if [[ $RES -gt 1920 ]]; then
echo "File is 4K or higher, encoding using CRF $QUALITY_4K" echo "File is 4K or higher, encoding using CRF $QUALITY_4K"
ffmpeg -i "$FILE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_4K" -maxrate 25M -bufsize 25M -c:a copy "$INPUT_SOURCE"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2 ffmpeg -i "$FILE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_4K" -c:a copy "$INPUT_SOURCE"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2
elif [[ $RES -le 1920 ]] && [[ -n $RES ]]; then elif [[ $RES -le 1920 ]] && [[ -n $RES ]]; then
echo "File is HD or lower, encoding using CRF $QUALITY_HD" echo "File is HD or lower, encoding using CRF $QUALITY_HD"
ffmpeg -i "$FILE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_HD" -maxrate 15M -bufsize 15M -c:a copy "$INPUT_SOURCE"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2 ffmpeg -i "$FILE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_HD" -c:a copy "$INPUT_SOURCE"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2
else else
echo "ERROR Line $LINENO: Source file $FILE is not a valid video file" 1>&2 echo "ERROR Line $LINENO: Source file $FILE is not a valid video file" 1>&2
echo "Skipping..." echo "Skipping..."
@@ -67,10 +67,10 @@ file_encode () {
RES=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$INPUT_SOURCE") RES=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$INPUT_SOURCE")
if [[ $RES -gt 1920 ]]; then if [[ $RES -gt 1920 ]]; then
echo "File is 4K or higher, encoding using CRF $QUALITY_4K" echo "File is 4K or higher, encoding using CRF $QUALITY_4K"
ffmpeg -i "$INPUT_SOURCE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_4K" -maxrate 25M -bufsize 25M -c:a copy "$FILEDIR"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2 ffmpeg -i "$INPUT_SOURCE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_4K" -c:a copy "$FILEDIR"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2
elif [[ $RES -le 1920 ]] && [[ -n $RES ]]; then elif [[ $RES -le 1920 ]] && [[ -n $RES ]]; then
echo "File is HD or lower, encoding using CRF $QUALITY_HD" echo "File is HD or lower, encoding using CRF $QUALITY_HD"
ffmpeg -i "$INPUT_SOURCE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_HD" -maxrate 15M -bufsize 15M -c:a copy "$FILEDIR"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2 ffmpeg -i "$INPUT_SOURCE" -c:v libx264 -preset slow -tune film -crf "$QUALITY_HD" -c:a copy "$FILEDIR"/output/"$FILENAME" || echo "ERROR Line $LINENO: File not encoded, unknown error occurred." 1>&2
else else
echo "ERROR Line $LINENO: Source file $INPUT_SOURCE is not a valid video file" 1>&2 echo "ERROR Line $LINENO: Source file $INPUT_SOURCE is not a valid video file" 1>&2
fi fi

View File

@@ -102,6 +102,10 @@ def services_speller(service):
service_proper = "Apple TV+" service_proper = "Apple TV+"
elif service == "paramount": elif service == "paramount":
service_proper = "Paramount+" service_proper = "Paramount+"
elif service == "starz":
service_proper = "STARZ"
elif service == "showtime":
service_proper = "Showtime"
else: else:
return service return service
return service_proper return service_proper