From 9ade42e13e8e59405cb9c1a0686bb6b0b0dfe6a0 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sat, 1 Oct 2016 18:24:54 +0200 Subject: fix non-vaapi-pipeline --- voctocore/lib/avpreviewoutput.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/voctocore/lib/avpreviewoutput.py b/voctocore/lib/avpreviewoutput.py index 05f1ceb..2be4a52 100644 --- a/voctocore/lib/avpreviewoutput.py +++ b/voctocore/lib/avpreviewoutput.py @@ -124,12 +124,22 @@ class AVPreviewOutput(TCPMultiConnection): def construct_native_video_pipeline(self, target_caps): do_deinterlace = Config.getboolean('previews', 'deinterlace') - return ''' + if do_deinterlace: + pipeline = ''' + deinterlace mode={imode} ! + videorate ! + ''' + else: + pipeline = '' + + + pipeline += ''' videoscale ! {target_caps} ! - deinterlace mode={imode} ! jpegenc quality=90 - '''.format( + ''' + + return pipeline.format( imode='interlaced' if do_deinterlace else 'disabled', target_caps=target_caps, ) -- cgit v1.2.3