This commit is contained in:
j 2026-01-15 15:59:14 +00:00
commit 856d12a90d

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 += [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