From 3e8cff856909ff80fe700a6bd0871e2f71758a08 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 8 Oct 2020 18:23:23 +0200 Subject: [PATCH] update identify resolution --- mybashrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mybashrc b/mybashrc index 01405f6..8389c30 100644 --- a/mybashrc +++ b/mybashrc @@ -812,8 +812,10 @@ _strip_audio() { _identify_resolution() { for i in "$PWD"/*.mp4; do - height=$(ffprobe -v error -print_format json -show_format -show_streams -show_chapters "$i" | jq .streams[0] | jq -r .height) - mv "$i" "${i%.*}-$height.mp4" + if ! echo "$i" | grep -qE "240|480|720|1080|1440|2160"; then + height=$(ffprobe -v error -print_format json -show_format -show_streams -show_chapters "$i" | jq .streams[0] | jq -r .height) + mv "$i" "${i%.*}-$height.mp4" + fi done }