From 2a398777065106353f785006168e251ecdca3bcf Mon Sep 17 00:00:00 2001 From: Ray Lyon Date: Wed, 25 Nov 2020 15:05:49 -0500 Subject: [PATCH] exclude directories from for loop --- ffmpeg/ffmpeg-batch-encode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg/ffmpeg-batch-encode.sh b/ffmpeg/ffmpeg-batch-encode.sh index 1ef6776..951b804 100755 --- a/ffmpeg/ffmpeg-batch-encode.sh +++ b/ffmpeg/ffmpeg-batch-encode.sh @@ -33,7 +33,7 @@ if [ ! -d "$DIRECTORY/output" ]; then fi # Encode each file in the directory with different CRF setting based on resolution -for FILE in "$DIRECTORY"/*; do +for FILE in "$DIRECTORY"/*.*; do RES=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$FILE") FILENAME=$(basename "$FILE") if [[ $RES -gt 1920 ]]; then