fix cuts
This commit is contained in:
parent
0562515f68
commit
856d12a90d
1 changed files with 10 additions and 5 deletions
|
|
@ -22,9 +22,14 @@ def detect_cuts(path, seconds=True):
|
|||
for segment in path:
|
||||
info = ox.avinfo(segment)
|
||||
segment_cuts = detect_cuts(segment, seconds)
|
||||
if segment_cuts:
|
||||
if seconds:
|
||||
cuts.append([c + position for c in segment_cuts])
|
||||
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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue