implemented writing of list file
This commit is contained in:
parent
a62ca9d50c
commit
d7a0be71fb
@ -54,10 +54,11 @@ print(videoLen)
|
|||||||
|
|
||||||
longer = audioLen if audioLen > videoLen else videoLen
|
longer = audioLen if audioLen > videoLen else videoLen
|
||||||
shorter = audioLen if audioLen < videoLen else videoLen
|
shorter = audioLen if audioLen < videoLen else videoLen
|
||||||
|
shorterFile = FILES[Stream.AUDIO] if audioLen < videoLen else FILES[Stream.VIDEO]
|
||||||
|
|
||||||
timesLoop = ceil(longer.seconds / shorter.seconds)
|
timesLoop = ceil(longer.seconds / shorter.seconds)
|
||||||
|
|
||||||
print('Longer: {}'.format(longer))
|
with open('list.txt', 'w') as f:
|
||||||
print('Shorter: {}'.format(shorter))
|
for i in range(timesLoop):
|
||||||
|
print(shorterFile, file=f)
|
||||||
|
|
||||||
print('Loop {} times.'.format(timesLoop))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user