This commit is contained in:
2025-06-23 12:41:30 +02:00
parent 39d8873a64
commit 270fd8de42

View File

@@ -158,12 +158,18 @@ def add_overlay(_DEV,_SOURCE_DIR,_DAY_DIRS):
else: else:
continue continue
if filename.endswith(".MP4") and filename.startswith("joined_"): if filename.endswith(".MP4") and filename.startswith("joined_"):
myCmd = f"ffmpeg -i {filename} -c:v libvpx-vp9 -i {filename.replace('.MP4', '.WEBM')} -filter_complex [0][1]overlay=x=0:y=0,hflip,vflip overlay_{filename}" if _FLIP:
myCmd = f"ffmpeg -i {filename} -c:v libvpx-vp9 -i {filename.replace('.MP4', '.WEBM')} -filter_complex [0][1]overlay=x=0:y=0,hflip,vflip overlay_{filename}"
else:
myCmd = f"ffmpeg -i {filename} -c:v libvpx-vp9 -i {filename.replace('.MP4', '.WEBM')} -filter_complex [0][1]overlay=x=0:y=0 overlay_{filename}"
print(myCmd) print(myCmd)
status, output = subprocess.getstatusoutput(myCmd) #status, output = subprocess.getstatusoutput(myCmd)
print(output) print(output)
ff = FfmpegProgress(myCmd)
with tqdm(total=100, position=1, desc="Encode") as pbar:
for progress in ff.run_command_with_progress():
pbar.update(progress - pbar.n)
pbar.close()
def flip_videos(_DEV,_SOURCE_DIR,_DAY_DIRS): def flip_videos(_DEV,_SOURCE_DIR,_DAY_DIRS):
print("Flipping") print("Flipping")
for _DAY_DIR in _DAY_DIRS: for _DAY_DIR in _DAY_DIRS: