mirror of
https://gitlab.sectorq.eu/jaydee/python.git
synced 2025-12-14 10:44:52 +01:00
bitwarden
This commit is contained in:
@@ -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,12 +28,15 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user