From 4d520671a2e9f17a6a173d5bf71a0060a1d818ea Mon Sep 17 00:00:00 2001 From: mmenanno Date: Tue, 14 May 2024 18:11:55 -0400 Subject: [PATCH] use height for proportionate scaling instead of width --- lib/plugin_stream_mapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugin_stream_mapper.py b/lib/plugin_stream_mapper.py index 4f0feed..904202a 100644 --- a/lib/plugin_stream_mapper.py +++ b/lib/plugin_stream_mapper.py @@ -159,14 +159,14 @@ def build_filter_chain(self, stream_info, stream_id): software_filters.append('crop={}'.format(self.crop_value)) if self.settings.get_setting('target_resolution') not in ['source']: vid_width, vid_height = self.scale_resolution(stream_info) - if vid_width: - # Apply scale with only width to keep aspect ratio + if vid_height: + # Apply scale with only height to keep aspect ratio if self.settings.get_setting('video_encoder') in qsv_encoder.provides(): required_hw_smart_filters.append({'scale': [vid_width, vid_height]}) elif self.settings.get_setting('video_encoder') in nvenc_encoder.provides(): required_hw_smart_filters.append({'scale': [vid_width, vid_height]}) else: - software_filters.append('scale={}:-1'.format(vid_width)) + software_filters.append('scale=-1:{}'.format(vid_height)) # Apply custom software filters if self.settings.get_setting('apply_custom_filters'):