Bug 500777

Summary: Screen recording quality drops noticeably with fractional scaling, but only with Rectangular Region mode
Product: [Plasma] kwin Reporter: Nate Graham <nate>
Component: screencastingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, kde, noahadvs
Priority: NOR    
Version First Reported In: 6.3.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: Plasma 6.3.4 with plasma-wayland-protocols 1.17.0
Sentry Crash Report:
Attachments: 200% scale
175% scale

Description Nate Graham 2025-02-26 15:38:16 UTC
Created attachment 178899 [details]
200% scale

At integer scale factors, recording quality is fine. But with fractional scalr factors, it drops noticeably, becoming blocky and pixelated. It would be better if it could be smoothed or better snapped to the pixel grid, or something.

This may be a KPipeWire issue, but I'm starting with Spectacle just in case it's not.

Compare the two attached screen recordings of the same thing taken at different scale factors. Here's 200% scale:
Comment 1 Nate Graham 2025-02-26 15:38:40 UTC
Created attachment 178900 [details]
175% scale

And here's 175% scale.
Comment 2 Noah Davis 2025-02-26 16:41:58 UTC
Yep, KPipeWire issue.
Comment 3 Noah Davis 2025-03-13 20:51:28 UTC
Moving to KWin since it's a screencasting plugin issue. It also requires some changes to Spectacle.
Comment 4 Bug Janitor Service 2025-03-13 20:54:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/445
Comment 5 Vlad Zahorodnii 2025-03-18 15:12:13 UTC
Git commit 973a80edee91b8852b616ef3ff3825f4caae289b by Vlad Zahorodnii, on behalf of Noah Davis.
Committed on 18/03/2025 at 15:10.
Pushed by vladz into branch 'master'.

Auto scale region recordings to improve fractional scaling recording quality

A scale of 0 now auto scales. Requires screencasting version 5.

M  +1    -0    src/Platforms/VideoPlatformWayland.cpp
M  +6    -1    src/Platforms/screencasting.cpp
M  +1    -0    src/Platforms/screencasting.h

https://invent.kde.org/graphics/spectacle/-/commit/973a80edee91b8852b616ef3ff3825f4caae289b
Comment 6 Noah Davis 2025-03-21 13:35:13 UTC
Git commit d14a1199082223d75f3064827f01a6c85538329b by Noah Davis, on behalf of Vlad Zahorodnii.
Committed on 21/03/2025 at 12:58.
Pushed by vladz into branch 'Plasma/6.3'.

Auto scale region recordings to improve fractional scaling recording quality

A scale of 0 now auto scales. Requires screencasting version 5.


(cherry picked from commit 973a80edee91b8852b616ef3ff3825f4caae289b)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +1    -0    src/Platforms/VideoPlatformWayland.cpp
M  +6    -1    src/Platforms/screencasting.cpp
M  +1    -0    src/Platforms/screencasting.h

https://invent.kde.org/graphics/spectacle/-/commit/d14a1199082223d75f3064827f01a6c85538329b