fullscreen video cropped on high-dpi screen

Bug #1283424 reported by Andreas E.
100
This bug affects 33 people
Affects Status Importance Assigned to Milestone
Kazam Screencaster
Confirmed
Undecided
Unassigned
Ubuntu
Confirmed
Undecided
David Klasinc
kazam (Debian)
Confirmed
Undecided
Unassigned
kazam (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On high-dpi screens when the global scaling factor is set to 2, a fullscreen video is records only a fraction of the screen. Kazam does not read the real screen dimensions in device-pixels (1600×900 instead of 3200×1800), but it sets the coordinates of the recorded area in device pixels (1600×900 = one fourth of the screen).

org.gnome.desktop.interface.scaling-factor = 2
kazam: 1.4.3-0ubuntu1
operating system: Ubuntu 14.04 / Unity

Tags: patch
Revision history for this message
Jose Gómez (adler-dreamcoder) wrote :

As a consequence of this issue, image screenshots are saved in low resolution (1600x900 instead of 3200x1800), so they look blurry.

Revision history for this message
David Klasinc (bigwhale) wrote :

Hi, thanks for your report. Right now I don't have such screen available for testing, so if you could run kazam with --debug switch and attach the output here, I'll greatly appreciate it.

Changed in kazam:
status: New → Confirmed
milestone: none → 1.5.0
assignee: nobody → David Klasinc (bigwhale)
Revision history for this message
Andreas E. (andreas-e) wrote :

Thanks for looking into the issue.
I believe there is nothing special about the display that could not be simulated by setting the UI scale to 2 in Ubuntu control center.

Attached is a log from doing a full screen capture (only the upper left screen quarter was recorded).

Revision history for this message
Andreas E. (andreas-e) wrote :

Indeed, screenshots take the whole screen, but with half resolution (like gnome-screenshot 3.10, but unlike gimp 2.8.10 which takes full resolution).

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

I thought Kazam was really good - until I encountered this problem. It makes the video recording unusuable on HiDPI systems, sadly. I tried Kazam on Linux Mint 19.1.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

So... It doesn't look like this is ever going to be fixed, seeing this bug report is 6 years old now... Anyone aware of an alternative? Simplescreenrecorder has the same issue sadly...

Revision history for this message
Sergio Llorente Romano (sllorente) wrote :

The problem is easily solved by using the function "get_monitor_scale_factor" from Gdk.screen object of the Gtk library.

I have stored the value returned by that function in the elements of hw.screens. Then i have used that value in the funciont "setup_video_source" in gstreamer.py for fix the values of startx, starty, endx and endy.

Please, see the patch attached.

Revision history for this message
Sergio Llorente Romano (sllorente) wrote :
affects: kazam → ubuntu
Changed in ubuntu:
milestone: 1.5.0 → none
Changed in kazam (Ubuntu):
status: New → Confirmed
Changed in kazam:
status: New → Confirmed
Changed in kazam (Debian):
status: New → Confirmed
Revision history for this message
Joseph (joeyave) wrote :

Any updates?

Revision history for this message
nymea (nymea) wrote :

Confirming that the patch by sllorente is working fine. Thanks a lot.

Revision history for this message
Mohan (vivek-mohanraj) wrote :

the patch by sllorente is working and was helpful to me. thanks.

Revision history for this message
Sergio Llorente Romano (sllorente) wrote :

Updated patch (the previous patch caused an error when trying to capture "all screens"). Now it is only necessary to patch the file "backend/prefs.py"

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for taking into account scale factor in HiDPI screens" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Christopher Field (volks73) wrote :

I did not use the patch from sllorente because I found this blog post, https://mlisi.xyz/post/kazam/, before finding this issue, but it appears to do the same fix. I modified both the `gstreamer.py` and `prefs.py` files. This worked for me after experiencing the exact same problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.