Fix issue with ffmpeg not reporting progress

This commit is contained in:
Brett Williams
2023-05-24 15:52:21 -05:00
parent 4d620d0ea6
commit 2e41e46826

View File

@@ -42,7 +42,7 @@ class FFMPEGRenderWorker(BaseRenderWorker):
stream_info = subprocess.check_output([self.engine.renderer_path(), "-i", # https://stackoverflow.com/a/61604105
input_path, "-map", "0:v:0", "-c", "copy", "-f", "null", "-y",
"/dev/null"], stderr=subprocess.DEVNULL).decode('utf-8')
"/dev/null"], stderr=subprocess.STDOUT).decode('utf-8')
found_frames = re.findall('frame=\s*(\d+)', stream_info)
self.total_frames = found_frames[-1] if found_frames else '-1'
self.frame = 0