fix(videos): real ffmpeg progress via -progress pipe, exclude .converting.mp4

- ffmpeg -progress pipe:1 streams out_time_ms lines; we parse them in the
  reading loop so % = out_time_s / duration_s (actual encode position)
- find_video_files() skips *.converting.mp4 temp files so they are never
  listed, uploaded, or shown in the UI

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 02:13:45 -04:00
co-authored by Copilot
parent afce229310
commit b711d421cc
2 changed files with 22 additions and 5 deletions
+3 -1
View File
@@ -232,10 +232,12 @@ def unmount_device(mount_point=DEFAULT_MOUNT_POINT):
def find_video_files(source_folder):
"""Walk source_folder, returning (absolute_path, relative_path) for every
file whose extension looks like a video, regardless of folder layout."""
file whose extension looks like a video, excluding in-progress conversion temps."""
found = []
for root, _dirs, files in os.walk(source_folder):
for file in files:
if file.endswith(".converting.mp4"):
continue
if os.path.splitext(file)[1].lower() in VIDEO_EXTENSIONS:
abs_path = os.path.join(root, file)
rel_path = os.path.relpath(abs_path, source_folder)