def generate_video_filmstrip_partition_n()

in scripts/generate_video_filmstrip_standalone.py [0:0]


def generate_video_filmstrip_partition_n(ivideo, totaln):
    cspace = ' '
    for i in range(totaln):
        print(i)
        timecoden = (i/totaln) * durms
        if timecoden < 60:
            thumbflag = "-ss 00:00:" + str(timecoden) + cspace + "-update -frames:v 1"
        else:
            timecodemin = int(timecoden/60)
            timecodesec = timecoden - timecodemin;
            thumbflag = "-ss 00:" + str(timecodemin) + ":" + str(timecodesec) + cspace + "-update -frames:v 1"
        ofname = f"{filenamebase}_{i:02d}.{imgformat}"
        fcommand="ffmpeg -i " + ifile + cspace + thumbflag + cspace + ofname
        #print(str(timecoden) + cspace + fcommand)
        os.system(fcommand)
        filmstrip_dict[str(i)] = f"{ofnamebase}_{i:02d}.{imgformat}"