add audio2mesh model support
This commit is contained in:
1 parent
5eb304186a
commit
386df9a4ab
83 files changed
+9318
-1307
No files matched your search
@@ -11,13 +11,14 @@ if __name__ == '__main__':
|
||||
vpath_videos = sorted(path_root.glob("raw/*.mp4"), reverse=False)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
IDs = ["2021-P29"]
|
||||
# for each video
|
||||
for i, ipath_item in enumerate(vpath_videos):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
# if i < 40: continue
|
||||
# if iname not in IDs: continue
|
||||
if iname not in IDs: continue
|
||||
|
||||
# data path
|
||||
ipath_data = path_root.joinpath("processing2", ipath_item.stem)
|
||||
@@ -55,10 +56,10 @@ if __name__ == '__main__':
|
||||
nframes = int(video_sub.duration * video_sub.fps)
|
||||
|
||||
# check frames
|
||||
nframe_real = len(list(ipath_frame.glob("*.jpg")))
|
||||
if nframe_real == nframes:
|
||||
print(f"\n Skip: have already done!")
|
||||
continue
|
||||
# nframe_real = len(list(ipath_frame.glob("*.jpg")))
|
||||
# if nframe_real == nframes:
|
||||
# print(f"\n Skip: have already done!")
|
||||
# continue
|
||||
|
||||
# check fps
|
||||
if int(video_sub.fps) != 50:
|
||||
@@ -94,7 +95,7 @@ if __name__ == '__main__':
|
||||
audio_sub.write_audiofile(str(ipath_audio_sub), fps=audio_sub.fps)
|
||||
print(f"save audio > {ipath_audio_sub}")
|
||||
|
||||
# save trim video
|
||||
print(f"write_images_sequence...")
|
||||
ipath_format = str(ipath_frame) + "/frame-%06d.jpg"
|
||||
video_sub.write_images_sequence(ipath_format, fps=50)
|
||||
# # save trim video
|
||||
# print(f"write_images_sequence...")
|
||||
# ipath_format = str(ipath_frame) + "/frame-%06d.jpg"
|
||||
# video_sub.write_images_sequence(ipath_format, fps=50)
|
||||
Reference in new issue
Block a user