def video2frame(video_name):
    video = read_video(video_name)
    video_frame_number = int((video.duration * video.fps))
    video_frame_ciphers = math.ceil(math.log(video_frame_number, 10))
    if (not os.path.exists(('testset/' + video_name))):
        os.makedirs(('testset/' + video_name))
    for i in range(0, video_frame_number):
        video.save_frame((((('testset/' + video_name) + '/frame_') + str(i).zfill(video_frame_ciphers)) + '.jpg'), (i / video.fps))
def video2frame(video_name):
    video = read_video(video_name)
    video_frame_number = int((video.duration * video.fps))
    video_frame_ciphers = math.ceil(math.log(video_frame_number, 10))
    if (not os.path.exists(('testset/' + video_name))):
        os.makedirs(('testset/' + video_name))
    for i in range(0, video_frame_number):
        video.save_frame((((('testset/' + video_name) + '/frame_') + str(i).zfill(video_frame_ciphers)) + '.jpg'), (i / video.fps))