Compare commits

...

2 commits

Author SHA1 Message Date
j
856d12a90d fix cuts 2026-01-15 15:59:14 +00:00
j
0562515f68 extend list 2026-01-15 15:58:04 +00:00

View file

@ -22,11 +22,16 @@ def detect_cuts(path, seconds=True):
for segment in path:
info = ox.avinfo(segment)
segment_cuts = detect_cuts(segment, seconds)
if seconds:
cuts.append([c + position for c in segment_cuts])
else:
fps = AspectRatio(info['video'][0]['framerate'])
cuts.append([c + int(position*fps) for c in segment_cuts])
if segment_cuts:
if seconds:
if cuts:
cuts.append(position)
cuts += [c + position for c in segment_cuts]
else:
if cuts:
cuts.append(int(position*fps))
fps = AspectRatio(info['video'][0]['framerate'])
cuts += [c + int(position*fps) for c in segment_cuts]
position += info['duration']
return cuts