Spaces:
Running
Running
File size: 701 Bytes
8d11d43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from latentsync.utils.util import count_video_time
from tqdm import tqdm
def count_total_videos_time(fileslist_path: str):
with open(fileslist_path, "r") as f:
filepaths = f.readlines()
# Remove trailing newline characters
filepaths = [filepath.strip() for filepath in filepaths]
total_videos_time = 0
for filepath in tqdm(filepaths):
total_videos_time += count_video_time(filepath)
print(f"Fileslist path: {fileslist_path}")
print(f"Total videos time: {round(total_videos_time/3600)} hours")
if __name__ == "__main__":
fileslist_path = "/mnt/bn/maliva-gen-ai-v2/chunyu.li/fileslist/data_v10_core.txt"
count_total_videos_time(fileslist_path)
|