add AR model

This commit is contained in:
Sen Liang committed 2022-03-17 15:17:20 +08:00
1 parent e0f24982d1
commit a09d220b85
13 files changed
+184 -67

No files matched your search

+8 -2
View File
@@ -13,14 +13,16 @@ if __name__ == '__main__':
vpath_videos = sorted(path_root.glob("raw/*.MP4"), reverse=False)
print(f"Have {len(vpath_videos)} dir files")
IDs = ["1-29min", "2-23min", "3-27min"]
# IDs = ["1-29min", "2-23min", "3-27min"]
# IDs = ["1-29min", "2-23min", "3-27min"]
durations = 0
# 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 in IDs: continue
# if iname in IDs: continue
# data path
ipath_data = path_root.joinpath("processing", ipath_item.stem)
@@ -43,6 +45,10 @@ if __name__ == '__main__':
video = VideoFileClip(str(ipath_item))
print(f"video duration = {video.duration}, fps = {video.fps}, (start, end)=({video.start},{video.end}), nframes={int(video.duration * video.fps)}")
# durations += video.duration
# print(f"\t -> Total durations = ({durations / 60 } min) ({durations / 3600 } h))")
# continue
if video.audio is None:
print("\nERROR: audio info is None")
continue