File size: 555 Bytes
3a3c68a abca1b7 3a3c68a abca1b7 3a3c68a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from tqdm.auto import tqdm
from Loader import GridLoader
from helpers import *
loader = GridLoader()
all_videos = loader.load_videos(verbose=True)
print(all_videos[-10:])
corrupted_videos = []
for video_path in tqdm(all_videos):
try:
load_video(video_path)
except Exception as e:
corrupted_videos.append(video_path)
print('corrupted video', video_path)
print(f'corrupted videos: {len(corrupted_videos)}')
record_file = open('corrupted-videos.txt', 'w')
record_file.write('\n'.join(corrupted_videos))
record_file.close() |