From 44c58b988dc0b63ded872488527e6f78c2b87e44 Mon Sep 17 00:00:00 2001 From: Fabrice Quenneville Date: Sun, 15 Nov 2020 23:07:18 -0500 Subject: [PATCH] Fix for videos with no frame --- curator.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/curator.py b/curator.py index 73f86c8..b04ad42 100755 --- a/curator.py +++ b/curator.py @@ -208,6 +208,13 @@ def get_resolution(filename): output = output.splitlines()[-1] elif "SEI type" in output: output = output.splitlines()[-1] + elif "no frame!" in output: + output = output.splitlines()[-1] + # elif "no frame" in output: + # print(str(filename)) + # print(output) + # output = output.splitlines()[-1] + # exit() except subprocess.CalledProcessError: print(f"{bcolors.FAIL}There seams to be an error with {filename}{bcolors.ENDC}") return False @@ -236,6 +243,8 @@ def get_codec(filename): output = output.splitlines()[-1] elif "SEI type" in output: output = output.splitlines()[-1] + elif "no frame!" in output: + output = output.splitlines()[-1] except subprocess.CalledProcessError: print(f"{bcolors.FAIL}There seams to be an error with {filename}{bcolors.ENDC}") return False