Floating point division for silence length so that the sound effect definitely plays at the correct point

This commit is contained in:
WORD559 committed 2018-07-05 22:40:39 +01:00
1 parent 1b552a9e30
commit fd375d5e66
1 file changed
+1 -1
+1 -1
View File
@@ -895,7 +895,7 @@ if __name__ == '__main__':
# If a frame has an associated sound effect, get which sound effect to use
sfx = line.split(":")[1].strip() if line.strip() != "" else ""
if sfx != "": # If a sound effect must be played...
length = frame//fps
length = frame/float(fps)
print "Adding "+sfx+" at {length} seconds into the video.".format(length=length)
# ...run each command in series with the correct arguments
with open(os.devnull,"w") as null: