From fd375d5e66a1ad9235b011aabbee5790ba1492f8 Mon Sep 17 00:00:00 2001 From: WORD559 Date: Thu, 5 Jul 2018 22:40:39 +0100 Subject: [PATCH] Floating point division for silence length so that the sound effect definitely plays at the correct point --- PPM.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PPM.py b/PPM.py index 82fd688..aee2c7e 100755 --- a/PPM.py +++ b/PPM.py @@ -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: