You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffmpeg:silencedetect and ffmpeg:filter_complex_script are both prone to raising ZeroDivisionError when computing time_remaining. This occurs because percentage can be zero when hhmmssd_to_seconds returns zero.
Example:
C:\Users\rpanderson\Videos> autoscrub autoprocess input.mp4 output.mp4
[autoscrub:info] Processing systems3.mp4
[ffprobe] Getting audio sample rate...
[ffmpeg:ebur128] Checking loudness of file...
[autoscrub:info] Measured loudness = -16.3 dBLUFS; Silence threshold = -16.3 dB; Gain to apply = -1.7 dB
[ffmpeg:silencedetect] Searching for silence...
[ffmpeg:silencedetect] Completed in 00:00:25
[autoscrub:info] Found 119 silences of average duration 3.7 seconds.
[autoscrub:info] Generating ffmpeg filter_complex script...
[autoscrub:info] autoscrubbing video
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_mainreturn _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_codeexec(code, run_globals)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\autoscrub.exe\__main__.py", line 7, in <module>
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\click\core.py", line 764, in __call__returnself.main(*args, **kwargs)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\click\core.py", line 717, in main
rv =self.invoke(ctx)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\click\core.py", line 1137, in invokereturn _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\click\core.py", line 956, in invokereturn ctx.invoke(self.callback, **ctx.params)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\click\core.py", line 555, in invokereturn callback(*args, **kwargs)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\autoscrub\scripts\cli.py", line 276, in autoprocess
result = autoscrub.ffmpegComplexFilter(input, filter_graph_path, output, run_command=True, overwrite=True, stderr_callback=callback)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\autoscrub\__init__.py", line 1107, in ffmpegComplexFilter
stdout, stderr = _agnostic_communicate(p, new_line_callback=stderr_callback)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\autoscrub\__init__.py", line 185, in _agnostic_communicate
new_line_callback(local_buffer)
File "C:\Users\rpanderson\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\autoscrub\scripts\cli.py", line 100, in new_line_callback
time_remaining = (time.time()-self.start_time)/percentage*(100-percentage)
ZeroDivisionError: float division by zero
The text was updated successfully, but these errors were encountered:
Getting same error here. Checking the code, it will crash whenever seconds is zero or seconds >= duration, since that will result percentage being 0 or 100.
ffmpeg:silencedetect
andffmpeg:filter_complex_script
are both prone to raisingZeroDivisionError
when computingtime_remaining
. This occurs becausepercentage
can be zero whenhhmmssd_to_seconds
returns zero.Example:
The text was updated successfully, but these errors were encountered: