This commit is contained in:
2025-06-18 13:40:19 +02:00
parent a0e0a3d0e8
commit 276f0145b0

View File

@@ -95,6 +95,23 @@ def modify_creation_date(path,src_file):
accessed = create_date["accessed"]
)
def export_gps(_DEV,_SOURCE_DIR,_DAY_DIRS):
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 not filename.startswith("G"):
myCmd = f"gopro2gpx -s {filename} {filename.replace('.MP4', '')}"
print(myCmd)
status, output = subprocess.getstatusoutput(myCmd)
def flip_videos(_DEV,_SOURCE_DIR,_DAY_DIRS):
print("Flipping")
for _DAY_DIR in _DAY_DIRS:
@@ -418,3 +435,5 @@ if _ACTION == "all":
join_videos(_DEV, _SOURCE_DIR,_DAY_DIRS)
if _ACTION == "get_metadata":
modify_creation_date("/media/nas/nas-photo/imported/gopro9_1/2025-06-02", "GH010256.MP4")
if _ACTION == "export_gps":
export_gps(_DEV, _SOURCE_DIR,_DAY_DIRS)