From a7955fb69a1642b397a63ba3e37451e027ada1dc Mon Sep 17 00:00:00 2001 From: suvari Date: Tue, 5 Jul 2022 15:42:04 +0300 Subject: [PATCH] openshot, libopenshot, libopenshot-audio: rebuild for imagemagick --- multimedia/editor/libopenshot-audio/pspec.xml | 7 ++ multimedia/editor/libopenshot/pspec.xml | 10 +++ .../editor/openshot/files/video_widget.patch | 74 +++++++++++++++++++ multimedia/editor/openshot/pspec.xml | 12 +++ 4 files changed, 103 insertions(+) create mode 100644 multimedia/editor/openshot/files/video_widget.patch diff --git a/multimedia/editor/libopenshot-audio/pspec.xml b/multimedia/editor/libopenshot-audio/pspec.xml index 7909d2d93b..6634c80c20 100644 --- a/multimedia/editor/libopenshot-audio/pspec.xml +++ b/multimedia/editor/libopenshot-audio/pspec.xml @@ -52,6 +52,13 @@ + + 2022-07-05 + 0.2.2 + Rebuild + Kamil Atlı + suvari@pisilinux.org + 2021-12-07 0.2.2 diff --git a/multimedia/editor/libopenshot/pspec.xml b/multimedia/editor/libopenshot/pspec.xml index 8ad623b606..4c1ab6a3a5 100644 --- a/multimedia/editor/libopenshot/pspec.xml +++ b/multimedia/editor/libopenshot/pspec.xml @@ -9,6 +9,7 @@ suvari@pisilinux.org GPL + libopenshot library A free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world. OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world. @@ -46,9 +47,11 @@ ffmpeg libgcc zeromq + opencv jsoncpp libgomp python3 + protobuf qt5-base imagemagick libopenshot-audio @@ -75,6 +78,13 @@ + + 2022-07-05 + 0.2.7 + Rebuild for imagemagick + Kamil Atlı + suvari@pisilinux.org + 2021-12-09 0.2.7 diff --git a/multimedia/editor/openshot/files/video_widget.patch b/multimedia/editor/openshot/files/video_widget.patch new file mode 100644 index 0000000000..57b4412005 --- /dev/null +++ b/multimedia/editor/openshot/files/video_widget.patch @@ -0,0 +1,74 @@ +From 9748a13268d66a5949aebc970637b5903756d018 Mon Sep 17 00:00:00 2001 +From: Jonathan Thomas +Date: Thu, 7 Oct 2021 13:53:09 -0500 +Subject: [PATCH] Support for previewing anamorphic video profiles, including a + few code clean-ups. + +--- + src/windows/video_widget.py | 22 +++++++--------------- + 1 file changed, 7 insertions(+), 15 deletions(-) + +diff --git a/src/windows/video_widget.py b/src/windows/video_widget.py +index 7326598d34..842deb3ba0 100644 +--- a/src/windows/video_widget.py ++++ b/src/windows/video_widget.py +@@ -77,28 +77,20 @@ def changed(self, action): + if action.type == "load" and action.values.get("pixel_ratio"): + pixel_ratio_changed = True + self.pixel_ratio = openshot.Fraction( +- action.values.get("pixel_ratio").get("num", 16), +- action.values.get("pixel_ratio").get("den", 9)) ++ action.values.get("pixel_ratio").get("num", 1), ++ action.values.get("pixel_ratio").get("den", 1)) + log.info( + "Set video widget pixel aspect ratio to: %s", + self.pixel_ratio.ToFloat()) + elif action.key and action.key[0] == "pixel_ratio": + pixel_ratio_changed = True + self.pixel_ratio = openshot.Fraction( +- action.values.get("num", 16), +- action.values.get("den", 9)) ++ action.values.get("num", 1), ++ action.values.get("den", 1)) + log.info( + "Update: Set video widget pixel aspect ratio to: %s", + self.pixel_ratio.ToFloat()) + +- # Update max size (to size of video preview viewport) +- if display_ratio_changed or pixel_ratio_changed: +- timeline = get_app().window.timeline_sync.timeline +- timeline.SetMaxSize( +- round(self.width() * self.pixel_ratio.ToFloat()), +- round(self.height() * self.pixel_ratio.ToFloat()) +- ) +- + + def drawTransformHandler(self, painter, sx, sy, source_width, source_height, origin_x, origin_y, + x1=None, y1=None, x2=None, y2=None, rotation = None): +@@ -236,7 +228,7 @@ def paintEvent(self, event, *args): + # Determine original size of clip's reader + source_width = self.transforming_clip.data['reader']['width'] + source_height = self.transforming_clip.data['reader']['height'] +- source_size = QSize(source_width, source_height) ++ source_size = QSize(source_width, source_height * self.pixel_ratio.Reciprocal().ToDouble()) + + # Determine scale of clip + scale = self.transforming_clip.data['scale'] +@@ -405,7 +397,7 @@ def paintEvent(self, event, *args): + self.mutex.unlock() + + def centeredViewport(self, width, height): +- """ Calculate size of viewport to maintain apsect ratio """ ++ """ Calculate size of viewport to maintain aspect ratio """ + + # Calculate padding + top_padding = (height - (height * self.zoom)) / 2.0 +@@ -416,7 +408,7 @@ def centeredViewport(self, width, height): + height = height * self.zoom + + # Calculate which direction to scale (for perfect centering) +- aspectRatio = self.aspect_ratio.ToFloat() * self.pixel_ratio.ToFloat() ++ aspectRatio = self.aspect_ratio.ToFloat() + heightFromWidth = width / aspectRatio + widthFromHeight = height * aspectRatio + diff --git a/multimedia/editor/openshot/pspec.xml b/multimedia/editor/openshot/pspec.xml index be5dd74170..c799a08d10 100644 --- a/multimedia/editor/openshot/pspec.xml +++ b/multimedia/editor/openshot/pspec.xml @@ -16,6 +16,7 @@ https://github.com/OpenShot/openshot-qt/archive/refs/tags/v2.6.1.tar.gz cmake + faac-devel ffmpeg-devel python3-devel python3-pyzmq @@ -26,8 +27,10 @@ python3-qt5-devel python3-setuptools libopenshot-audio-devel + python3-importlib_metadata + video_widget.patch openshot-2.6.1-no_metric_default.patch @@ -35,6 +38,7 @@ openshot + faac ffmpeg python3 qt5-base @@ -44,6 +48,7 @@ python3-qt5 python3-pyzmq libopenshot-audio + python3-importlib_metadata /usr/bin @@ -60,6 +65,13 @@ + + 2022-07-05 + 2.6.1 + Rebuild for imagemagick + Kamil Atlı + suvari@pisilinux.org + 2021-12-07 2.6.1