dec05eba / gpu-screen-recorder-issues

GPU Screen Recorder issue tracker
15 stars 0 forks source link

[BUG] Monitor orientations are applied to the incorrect monitor. #24

Closed ZereoX closed 3 months ago

ZereoX commented 3 months ago

Describe the bug Attempting to record my primary monitor ("DP-1" / 3440 x 1440 in Landscape) results in a hardware encoding error due to it not respecting the width and height constraints:

Hardware does not support encoding at size 1472x3440 (constraints: width 256-4096 height 128-2304).

Recording my secondary monitor ("DP-2" / 2560 x 1440 in Portrait Left) results in a Landscape recording (see attachment).

To Reproduce

gpu-screen-recorder -w "DP-1" -f 60 -a "$(pactl get-default-sink).monitor" -o ~/Videos/test_video.mp4 gpu-screen-recorder -w "DP-2" -f 60 -a "$(pactl get-default-sink).monitor" -o ~/Videos/test_video.mp4

Screenshots Display Layout Xrandr Output Secondary Monitor Recording
image xrandr.log https://github.com/dec05eba/gpu-screen-recorder-issues/assets/761853/732066f6-c72a-4e51-8a2f-26f44c452a2a

Desktop (please complete the following information):

Additional context

dec05eba commented 3 months ago

Can you include drm_info output as mentioned in the report template? sudo drm_info > log.txt and upload the log file. You can install drm_info from aur. Also run gpu-screen-recorder -w invalid -f 60 -o video.mp4 and copy the terminal output. Wayland doesn't give the information needed to make matching monitors work 100% so I need full info to see what the structure looks like on your computer (with that drm_info output).

ZereoX commented 3 months ago

Can you include drm_info output as mentioned in the report template? sudo drm_info > log.txt and upload the log file. You can install drm_info from aur. Also run gpu-screen-recorder -w invalid -f 60 -o video.mp4 and copy the terminal output. Wayland doesn't give the information needed to make matching monitors work 100% so I need full info to see what the structure looks like on your computer (with that drm_info output).

Here is the drm_info log: log.log

and terminal ouput of the above:

[hevc_vaapi @ 0x55e0a9d09e00] ignoring invalid SAR: 0/0 [hevc_vaapi @ 0x55e0a9d09e00] Driver does not support some wanted packed headers (wanted 0xd, found 0x1). Info: using hevc encoder because a codec was not specified gsr error: display "invalid" not found, expected one of: "screen" "DP-1" (3440x1440+0+0) "DP-2" (2560x1440+0+0)

dec05eba commented 3 months ago

For some reason gnome for you put the monitors in a weird order (DP-2 is before DP-1) (as you can see in the xrandr output). I pushed a change to aur that might fix it, can you try updating gpu screen recorder from aur and try recording again? I dont know if this fix might make rotation break in some other wayland compositors, there isn't a good way to do it. Recording both of your monitors should work now and with correct rotation.

ZereoX commented 3 months ago

For some reason gnome for you put the monitors in a weird order (DP-2 is before DP-1) (as you can see in the xrandr output). I pushed a change to aur that might fix it, can you try updating gpu screen recorder from aur and try recording again? I dont know if this fix might make rotation break in some other wayland compositors, there isn't a good way to do it. Recording both of your monitors should work now and with correct rotation.

I can confirm that on r611.55266f2 the recording functions on my primary monitor.

The recording on the second monitor is broke, but the encoding resolution appears correct given "Portrait Left" orientation so I'm presuming this is just a hardware limitation.

[hevc_vaapi @ 0x559991bdb6c0] Hardware does not support encoding at size 1472x2560 (constraints: width 256-4096 height 128-2304).

Thank you.

dec05eba commented 3 months ago

Oh right, yeah thats correct. Thanks for testing!