From d16f63be5a13cb660b9372c6af3c0567d15cc78d Mon Sep 17 00:00:00 2001 From: jaydee Date: Tue, 24 Sep 2024 09:08:41 +0200 Subject: [PATCH] bitwarden --- handle_imported_video.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/handle_imported_video.py b/handle_imported_video.py index 4e05a2f..4c502e6 100644 --- a/handle_imported_video.py +++ b/handle_imported_video.py @@ -10,7 +10,7 @@ import getopt try: - opts, args = getopt.getopt(sys.argv[1:], "p:d:s:", ["command=", "help", "output=", "backup"]) + opts, args = getopt.getopt(sys.argv[1:], "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" @@ -20,6 +20,7 @@ output = None # QJ : getopts _DEV = "gopro9_1" _SEQUENCES = [] +_FLIP = False for o, a in opts: if o == "-h": _ACTION = True @@ -27,11 +28,14 @@ for o, a in opts: _DEV = True elif o in ("-p", "--part"): _DAY_DIR = a + elif o in ("-f", "--flip"): + _FLIP = True elif o in ("-s", "--sequence"): a = a.split(",") for s in a: print(s) _SEQUENCES.append("{:04d}".format(int(s))) + else: _WIZZARD = True @@ -91,7 +95,10 @@ if os.path.exists(_FULL_PATH): f.close() print(_FULL_PATH) - myCmd = '/opt/ffmpeg/ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name + if _FLIP: + myCmd = '/opt/ffmpeg/ffmpeg -f concat -i video.txt -vcodec copy -acodec copy -vf "transpose=1,transpose=1" ' + export_name + else: + myCmd = '/opt/ffmpeg/ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name print(myCmd) print(os.getcwd()) status, output = subprocess.getstatusoutput(myCmd)