Skip to content

Commit

Permalink
vid-stitcher shouldnt concatenate vids in wrong order now
Browse files Browse the repository at this point in the history
  • Loading branch information
rabaukeronny committed Feb 4, 2022
1 parent da81dc7 commit 9ca0629
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion surveillor.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ def video_stitcher():
output_dir = os.path.join(
dir_and_subdir, f"concat_{datetime_tag()}.mkv")

dict_ = dict(zip([int(''.join((x.split('_')[-2], x.split('_')[-1].replace('.mkv', '')))) for x in vids], [x for x in vids]))
vids_sorted = list(dict(sorted(dict_.items())).values())
with open(list_txt_dir, "w") as fp:
for vid in vids:
for vid in vids_sorted:
vid_str = f"file {vid}\n"
fp.writelines(vid_str)

Expand Down

0 comments on commit 9ca0629

Please sign in to comment.