excitoon / video-remove-silence

Tool for removing silence from video files
MIT License
109 stars 23 forks source link

Division By 0 #9

Open Kyvski opened 4 years ago

Kyvski commented 4 years ago

Sometimes changing the threshold level prevents this, but waiting 10+ min just for it to fail is getting annoying. It already takes forever, I don't want to run the program 2 or 3 times just for one video. If you could fix this, it would be much appreciated!

Traceback (most recent call last): 65536kB time=00:50:13.13 bitrate= 178.2kbits/s speed=7.55x File "C:\Users\kylep\Documents\jumpcutter-master\Alt\video-remove-silence", line 288, in out_wav.writeframes(compress_audio(args, wav, audio_start_frame, audio_end_frame, audio_result_frames)) File "C:\Users\kylep\Documents\jumpcutter-master\Alt\video-remove-silence", line 250, in compress_audio r = i / (crossfade_length - 1) ZeroDivisionError: division by zero

Kyvski commented 4 years ago

In case anyone else has this issue, I have a fixed version on my fork. Not sure if it's efficient or whatever, so I'm not going to submit a pull request. Sound seems unaffected by my edit, so I think it's ok. It works at least.