From ee094f596bad8f1feff776874063b6e235c8d17f Mon Sep 17 00:00:00 2001 From: jaydee Date: Wed, 25 Sep 2024 00:48:50 +0200 Subject: [PATCH] bitwarden --- handle_imported_video.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/handle_imported_video.py b/handle_imported_video.py index aa7c7ae..a2cfbbc 100644 --- a/handle_imported_video.py +++ b/handle_imported_video.py @@ -19,7 +19,7 @@ elif sys.platform == "darwin": elif sys.platform == "win32": ops = "win" try: - opts, args = getopt.getopt(sys.argv[1:], "ta:r:fp:d:s:", ["command=", "help", "output=", "backup"]) + opts, args = getopt.getopt(sys.argv[1:], "x:ta:r:fp:d:s:", ["command=", "help", "output=", "backup"]) except getopt.GetoptError as err: # print help information and exit: print(str(err)) # will print something like "option -a not recognized" @@ -53,6 +53,8 @@ for o, a in opts: _ACTION = a elif o in ("-t", "--test"): _TEST = True + elif o in ("-x", "--file"): + _FILE = a elif o in ("-s", "--sequence"): a = a.split(",") for s in a: @@ -70,7 +72,17 @@ for o, a in opts: #print(_FULL_PATH) - +if _ACTION == "flip": + export_name = "X" + _FILE + if ops == "win": + myCmd = [ + "ffmpeg", "-display_rotation", "180", "-f", "-i", _FILE ,"-vcodec", "copy", "-acodec", "copy", "-y", export_name +] + else: + myCmd = [ + "/opt/ffmpeg/ffmpeg", "-display_rotation", "180", "-f", "-i", _FILE, "-vcodec", "copy", "-acodec", "copy", "-y", export_name +] + proc = subprocess.Popen(myCmd,stdout=subprocess.DEVNULL,stderr=subprocess.STDOUT) if _ACTION == "join": for _DAY_DIR in _DAY_DIRS: if ops == "win":