diff --git a/ffcuesplitter/ffmpeg.py b/ffcuesplitter/ffmpeg.py index d95ed06..a39231a 100644 --- a/ffcuesplitter/ffmpeg.py +++ b/ffcuesplitter/ffmpeg.py @@ -197,9 +197,11 @@ def run_ffmpeg_command_with_progress(self, cmd, seconds): for output in proc.stdout: if "out_time_ms" in output.strip(): - s_processed = int(output.split('=')[1]) / 1_000_000 - percent = s_processed / seconds * 100 - progbar.update(round(percent) - progbar.n) + out_time_ms_val = output.split('=')[1].strip() + if out_time_ms_val.isdigit(): + s_processed = int(out_time_ms_val) / 1_000_000 + percent = s_processed / seconds * 100 + progbar.update(round(percent) - progbar.n) if proc.wait(): # error logging.error("Popen proc.wait() Exit status %s",