bitwarden

This commit is contained in:
jaydee
2024-09-24 15:13:59 +02:00
parent c4acbda07f
commit b5546dccd0

View File

@@ -7,6 +7,8 @@ import datetime
import shutil import shutil
import json import json
import getopt import getopt
from ffmpeg_progress_yield import FfmpegProgress
from tqdm import tqdm
if sys.platform == "linux" or sys.platform == "linux2": if sys.platform == "linux" or sys.platform == "linux2":
# linux # linux
@@ -113,21 +115,53 @@ if os.path.exists(_FULL_PATH):
f.close() f.close()
print(_FULL_PATH) print(_FULL_PATH)
if _FLIP: # if _FLIP:
if ops == "win": # if ops == "win":
myCmd = 'ffmpeg -display_rotation 180 -f concat -i video.txt -vcodec copy -acodec copy ' + export_name # myCmd = 'ffmpeg -display_rotation 180 -f concat -i video.txt -vcodec copy -acodec copy ' + export_name
else: # else:
myCmd = '/opt/ffmpeg/ffmpeg -display_rotation 180 -f concat -i video.txt -vcodec copy -acodec copy ' + export_name # myCmd = '/opt/ffmpeg/ffmpeg -display_rotation 180 -f concat -i video.txt -vcodec copy -acodec copy ' + export_name
else: # else:
if ops == "win": # if ops == "win":
myCmd = 'ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name # myCmd = 'ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name
else: # else:
myCmd = '/opt/ffmpeg/ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name # myCmd = '/opt/ffmpeg/ffmpeg -f concat -i video.txt -vcodec copy -acodec copy ' + export_name
print(myCmd) print(myCmd)
print(os.getcwd()) print(os.getcwd())
status, output = subprocess.getstatusoutput(myCmd) #status, output = subprocess.getstatusoutput(myCmd)
#print(output)
print(status) if _FLIP:
if ops == "win":
myCmd = [
"ffmpeg", "-display_rotation", "180", "-f", "concat", "-i", "video.txt ","-vcodec", "copy", "-acodec", "copy", export_name ,"-f", "null", "/dev/null",
]
else:
myCmd = [
"/opt/ffmpeg/ffmpeg", "-display_rotation", "180", "-f", "concat", "-i", "video.txt ","-vcodec", "copy", "-acodec", "copy", export_name ,"-f", "null", "/dev/null",
]
else:
if ops == "win":
myCmd = [
"ffmpeg", "-f", "concat", "-i", "video.txt ","-vcodec", "copy", "-acodec", "copy", export_name ,"-f", "null", "/dev/null",
]
else:
myCmd = [
"/opt/ffmpeg/ffmpeg", "-f", "concat", "-i", "video.txt ","-vcodec", "copy", "-acodec", "copy", export_name ,"-f", "null", "/dev/null",
]
ff = FfmpegProgress(myCmd)
with tqdm(total=100, position=1, desc="Convert") as pbar:
for progress in ff.run_command_with_progress():
pbar.update(progress - pbar.n)
# get the output
print(ff.stderr)
status = 0
if status == 0: if status == 0:
print("Moving...") print("Moving...")
for p in parts: for p in parts: