From f08b23f261ea7ab2376688dad6a51289c4f9d183 Mon Sep 17 00:00:00 2001 From: Martin Kaistra Date: Wed, 4 Mar 2015 11:54:29 +0100 Subject: don't terminate ffmpeg too early, fixes problems with windows. also: use matroska container instead of mp4 --- video_thread.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'video_thread.py') diff --git a/video_thread.py b/video_thread.py index 37dd59d..5a8120b 100644 --- a/video_thread.py +++ b/video_thread.py @@ -42,8 +42,10 @@ class Worker(QtCore.QObject): '-an', '-i', inputFile, '-acodec', "libmp3lame", # output audio codec - '-vcodec', "h264", - '-pix_fmt', "yuv422p", + '-vcodec', "libx264", + '-pix_fmt', "yuv444p", + '-preset', "medium", + '-f', "matroska", outputFile], stdin=sp.PIPE,stdout=sys.stdout, stderr=sys.stdout) @@ -83,7 +85,7 @@ class Worker(QtCore.QObject): if out_pipe.stderr is not None: print(out_pipe.stderr.read()) out_pipe.stderr.close() - out_pipe.terminate() + # out_pipe.terminate() # don't terminate ffmpeg too early out_pipe.wait() print("Video file created") self.progressBarUpdate.emit(100) -- cgit v1.2.3