This commit is contained in:
2025-06-23 11:59:06 +02:00
parent e49c40a1fd
commit 6828a0c3c0

View File

@@ -142,8 +142,24 @@ def export_gps(_DEV,_SOURCE_DIR,_DAY_DIRS):
#os.remove(_FULL_PATH + "ffprobe") #os.remove(_FULL_PATH + "ffprobe")
def add_overlay(): def add_overlay(_DEV,_SOURCE_DIR,_DAY_DIRS):
myCmd = "ffmpeg -i video.mp4 -i overlay.png -filter_complex [0][1]overlay=x=0:y=0 output.mp4" for _DAY_DIR in _DAY_DIRS:
if ops == "win":
_FULL_PATH = _SOURCE_DIR + "\\" + _DEV + "\\" + _DAY_DIR + "\\"
else:
_FULL_PATH = _SOURCE_DIR + _DEV + "/" + _DAY_DIR + "/"
for filename in os.listdir(_FULL_PATH):
if _FILTER:
if _PATERN in filename:
pass
else:
continue
if filename.endswith(".MP4") and filename.startswith("joined_"):
myCmd = f"ffmpeg -i {filename} -c:v libvpx-vp9 -i {filename.replace('.MP4', 'MOV')} -filter_complex [0][1]overlay=x=0:y=0,hflip,vflip overlay_{filename}"
print(myCmd)
status, output = subprocess.getstatusoutput(myCmd)
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: