From 8445465f7d9620609c6fff5b637873736a1f9237 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 21 Oct 2011 16:53:11 -0500 Subject: [PATCH] ffmpeg (v0.8) progress is no longer a float. Current format is 00:00:00.00. --- video_encoder.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/video_encoder.py b/video_encoder.py index c225a31..d307f3e 100644 --- a/video_encoder.py +++ b/video_encoder.py @@ -101,11 +101,12 @@ def execute( int(float(units[2]) * 1000) if duration and progress_callback: - progress_callback( - float(progress_match.group(1)) * 1000, - duration - ) + units = progress_match.group(1).split(":") + progress = (int(units[0]) * 60 * 60 * 1000) + \ + (int(units[1]) * 60 * 1000) + \ + int(float(units[2]) * 1000) + progress_callback(progress, duration) else: header += line else: