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
What might be the issue is that the duration of your file was incorrectly determined to be 0, in which case division by 0 will occur on this line.
I'll add a conditional to only run (seconds_processed / self._duration_secs) * 100 if self._can_get_duration is True. I'll let you know when I have added this change, after which please upgrade to the latest version of better-ffmpeg-progress and let me know if this fixes the issue.
Hi,
when I run the script with the progress_handler I see the error message:
(env) [xxxx]$ /Users/[xxxx]/env/bin/python [xxxx]test_runner.py
Running: ffmpeg -y -i [xxxx] -c:a libmp3lame -y output.mp3 -loglevel verbose -progress pipe:1 -nostats
0%| | 0/384.304 [00:00<?, ?s/s]
[Error] float division by zero
Exiting Better FFmpeg Progress.
The code below:
from better_ffmpeg_progress import FfmpegProcess
def handle_progress_info(percentage):
print(f"The FFmpeg process is {percentage}% complete. ETA is / seconds.")
process = FfmpegProcess(["ffmpeg", "-i", "[xxxx]", "-c:a", "libmp3lame", "-y", "output.mp3"], )
process.run(progress_handler=handle_progress_info)
The text was updated successfully, but these errors were encountered: