File size: 315 Bytes
b0c0f32
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import threading
import os
video_path = "./videos"
files = os.listdir(video_path)
thread_num = 1
i = 0
for i in range(thread_num):
    open("videos-%d.txt" % (i), "w").write('')
for file in files:
    if file.endswith('.mp4'):
        open("videos-%d.txt" % (i % thread_num), "a").write(file + '\n')
        i += 1