in scripts/generate_video_filmstrip_standalone.py [0:0]
def generate_video_filmstrip_interval(ivideo, intervaln):
cspace = ' '
totaln = int(minimum_vlen() / intervaln)
offset = 0;
for i in range(totaln):
print(i)
timecodems = offset + (intervaln * i);
timecoden = float(timecodems / 1000);
if timecoden < 60:
thumbflag = "-ss 00:00:" + str(timecoden) + cspace + "-frames:v 1"
else:
timecodemin = int(timecoden/60)
timecodesec = timecoden - timecodemin;
thumbflag = "-ss 00:" + str(timecodemin) + ":" + str(timecodesec) + cspace + "-frames:v 1"
#timecodestr = f"{timecoden:.2f}"
timecodestr = f"{timecodems:05}"
ofname = f"{filenamebase}_{timecodestr}.{imgformat}"
fcommand="ffmpeg -i " + ifile + cspace + thumbflag + cspace + ofname
#print(str(timecoden) + cspace + fcommand)
os.system(fcommand)
filmstrip_dict[timecodestr] = f"{ofnamebase}_{timecodestr}.{imgformat}"