dec05eba / gpu-screen-recorder-issues

GPU Screen Recorder issue tracker
20 stars 0 forks source link

[BUG] GPU codecs unsupported #52

Closed DatCaptainHorse closed 1 month ago

DatCaptainHorse commented 1 month ago

Describe the bug For any tried GPU encoding codec, Error: your gpu does not support 'CODEC' video codec error is returned.

To Reproduce WAYLAND_DISPLAY=wayland-1 gpu-screen-recorder -k h264 -w screen -f 60 -o test.mp4

Desktop (please complete the following information):

Additional context Back at it again, though this time using Arch, vainfo lists encoders just fine so not sure what's going on 😅

vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.3.3 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

Also DRM info this time from beginning, physical display connected this time so no odd hackery going on :) drminfo.txt

dec05eba commented 1 month ago

VAEntrypointEncSliceLP

Seems like your gpu only supports low power encoding mode which gpu screen recorder doesn't support. I haven't seen any other gpu that only supports low power encoding mode (not even other intel arc gpus) and I dont have any gpu that supports low power encoding mode so I cant test it myself. I can try adding support for it if you can test it. (since you know how to build gpu screen recorder from source).

dec05eba commented 1 month ago

I pushed changes to allow low power mode now, can you do git pull in the gpu screen recorder repository and run sudo ./install.sh and then:

gpu-screen-recorder --info

and post the terminal output here. If it output includes "h264" in that terminal output can you then run these commands after each other and let it record for 1 second and check that the video looks fine (with mpv) after each command:

gpu-screen-recorder -w screen -f 60 -k h264 -o video.mp4
gpu-screen-recorder -w screen -f 60 -k hevc -o video.mp4
gpu-screen-recorder -w screen -f 60 -k av1 -o video.mp4
gpu-screen-recorder -w screen -f 60 -k vp9 -o video.mp4
gpu-screen-recorder -w screen -f 60 -k hevc_10bit -o video.mp4
gpu-screen-recorder -w screen -f 60 -k av1_10bit -o video.mp4
gpu-screen-recorder -w screen -f 60 -k h264 -cr full -o video.mp4

and also this command:

gpu-screen-recorder -w screen -f 60 -k hevc_hdr -o video.mp4

but upload the video.mp4 file here, thanks!

DatCaptainHorse commented 1 month ago

Hm, I'll look at your commit changes to see if I spot something myself in the source I can quickly edit to test, so far no luck:

gpu-screen-recorder --info
Warning: failed to connect to the X server. Assuming wayland is running without Xwayland
section=system_info
display_server|wayland
is_steam_deck|no
section=gpu_info
vendor|intel
section=video_codecs
h264_software
section=capture_options
DP-2|1920x1080
gsr error: gsr_dbus_call_screencast_method: failed with error: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
gsr error: gsr_dbus_screencast_create_session: failed to setup ScreenCast session. Make sure you have a desktop portal running with support for the ScreenCast interface and that the desktop portal matches the Wayland compositor you are running.

UPDATE: False alarm, looks like the install.sh doesn't install in right location for Arch? I ran the binary from build directory to get this:

./build/gpu-screen-recorder --info
Warning: failed to connect to the X server. Assuming wayland is running without Xwayland
section=system_info
display_server|wayland
is_steam_deck|no
section=gpu_info
vendor|intel
section=video_codecs
gsr info: gsr_get_supported_video_codecs_vaapi: render_path: /dev/dri/renderD128
gsr info: gsr_get_supported_video_codecs_vaapi: VA version: 1.22
gsr info: gsr_get_supported_video_codecs_vaapi: num_profiles: 31
h264
h264_software
hevc
hevc_hdr
hevc_10bit
av1
av1_hdr
av1_10bit
vp9
section=capture_options
DP-2|1920x1080
gsr error: gsr_dbus_call_screencast_method: failed with error: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
gsr error: gsr_dbus_screencast_create_session: failed to setup ScreenCast session. Make sure you have a desktop portal running with support for the ScreenCast interface and that the desktop portal matches the Wayland compositor you are running.

Here are the videos!

gsrcapture_lowpower.zip

DatCaptainHorse commented 1 month ago

The changes work from my quick testing, feel free to close if you deem the videos worthy of it :)

Massive thanks for quick for once again as well 🙏

The gsr binaries that yay installed went into /usr/local/bin/ while the build installed them into /usr/bin/, just replaced the local ones with built ones - reminder for myself and anyone who may happen to stumble here.

dec05eba commented 1 month ago

Thanks! i'll push the change to aur now. The videos had the correct data.