Hello @nonl4331, please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report. In particular, we want to check if the 32 bit VA-API render path is healthy.
vaEndPicture (va_display, context) failed: invalid VASurfaceID (6) from https://gist.github.com/nonl4331/b0dae7229eebef642ea73d7cf532e621#file-gistfile1-txt-L1288-L1299 looks like something for your video driver vendor to ponder.
Thank you so much for your help. I'll open an issue in the appropriate place.
For the diagnostic tool, fixing check-va-api to use a supported surface format seems plausible as a correct fix, and https://github.com/ValveSoftware/steam-runtime/issues/752 is a good place to track that.
However, for Steam's "real" code paths (the ones that actually export game clips), I would be surprised if fixing the diagnostic tool helps: the diagnostic tool is only a diagnostic tool and is not used in production. If the proprietary code inside Steam itself is making the same assumption as the diagnostic tool (assuming that I420 is supported), or a similar assumption, then that's something that would have to be fixed inside Steam. If that's the case then this issue might need to be reopened.
[deleted previous partial comment: sorry, I pressed Comment too soon]
The fix for the diagnostic tool has hit my local steam install so I've been able to run the diagnostic again. Here is the updated gist https://gist.github.com/nonl4331/adb099e040154696ef1d9d3f64b35dde. It no longer has the vaEndPicture (va_display, context) failed: invalid VASurfaceID (6) and all appears normal. I still cannot export clips but with a slightly different error log in the terminal:
[export] Starting for file: /home/nick/videos/THE FINALS - 2025-02-05 19-50-11.mp4
libav: Cannot load libcuda.so.1
libav: Cannot load libcuda.so.1
libav: Could not dynamically load CUDA
libav: Could not dynamically load CUDA
[export] Failed to make initial encoder
Export failed with error code Failure
I do not have a nvidia gpu nor nvidia specific packages installed. I assume it falls back to va-api when cuda fails (but then va-api silently fails?).
@nonl4331
I met similar issue (Cannot load libcuda.so.1 when I export H265)
do you still can't export even if you explicitly set to H264 on export option?
@Izzur
Thanks for pointing that out. It does seem that exporting H264 works!!! I do still get the exact same warning with regards to Cuda.
[export] Starting for file: /home/nick/videos/THE FINALS - 2025-04-11 19-25-29.mp4
libav: Cannot load libcuda.so.1
libav: Cannot load libcuda.so.1
libav: Could not dynamically load CUDA
libav: Could not dynamically load CUDA
[export] [try_hardware=true][codec=1][bitrate=5625][framerate=60][width=1280][height=720][encoder_hardware=3]
[export] Processing file: /home/nick/.local/share/Steam/userdata/227539446/gamerecordings/clips/clip_2073850_20250411_092530/video/bg_2073850_20250411_075704/session.mpd
BCreateHwDeviceContext AMD Hardware VAAPI ...
... success.
[export] - Decoder: Hardware VAAPI - Video: hevc (Main) (hev1 / 0x31766568), yuvj420p(pc, bt709), 2560x1440, 0 kb/s
[export] - Encoder: Hardware VAAPI - Video: h264 (h264_vaapi) (High), vaapi(pc, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 5625 kb/s
[export] Dropped 2 frames
[export] Completed for file (3911ms): /home/nick/videos/THE FINALS - 2025-04-11 19-25-29.mp4
Export finished
Seems FFMPEG vaapi now needs specific command to use harware encoding.
for example, on my Radeon card,
ffmpeg -vaapi_device /dev/dri/renderD128 -i 剪辑_1,749,482,588,175.mp4 -vf 'format=p010,hwupload' -c:v hevc_vaapi test_output.mp4
works, while simple command ffmpeg -i 剪辑_1,749,482,588,175.mp4 -c:v hevc_vaapi test_output.mp4 will fail.
Same issue here with rx9070xt, system vainfo reports all fine, but the diagnostic tool complains about missing driver in pressure vessel. Even more I can only record games in steam with h265/hvec but can only export clips in steam using h264.
Also a side note, with mesa-25.3 vdpau was removed, so vaapi is the way to go.
For reference system vainfo:
vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 25.3.0 for AMD Radeon RX 9070 XT (radeonsi, gfx1201, LLVM 20.1.8, DRM 3.63, 6.15.11-gentoo-x86_64)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointEncSlice
VAProfileNone : VAEntrypointVideoProc
Same issue here, errors exactly like nonl4331 puts it, trying to load CUDA drivers while I have AMD
Same error,
on Fedora Linux Workstation 43, Radeon RX 9060XT、
h264 work fine in custom tab.
I can reproduce this as well. I'm going to switch to h264 for the time being.
GIST
Can confirm this is still an issue, even with the ZLUDA drop-in replacement installed. Interestingly, this means that libav could not dynamically link libcuda.so.1 despite there being such a library on my system. I'm not sure whether it's looking for a 32-bit library?
I made a small utility.
https://github.com/foriequal0/steam-clip-exporter
It's basically a GTK4 GUI around this command:
cvlc "${MPD}" --play-and-exit --sout-standard-dst "${OUTPUT}.mp4" --sout='#std{access=file,mux=mp4}'
or this command
ffmpeg -y -i "${MPD}" -codec -copy "${OUTPUT}.mp4"
Your system information
Wed, Mar 12 7:39 AM UTC -08:00
Arch Linux, mesa 1:25.0.2-2
No
Yes
steam-logs.tar.gz
AMD ATI Radeon RX 6800 XT
Please describe your issue in as much detail as possible:
See https://steamcommunity.com/groups/SteamClientBeta/discussions/5/600768964570684314/
On attempting to share or save clips I get the following:
I'm not quite sure when this issue began but in the past this did work. I could not figure out how to get more debugging information, I have tried
LIBVA_MESSAGING_LEVEL=2. This issue persists across all games and does not change depending on if the H265 option is enabled or not.EDIT:
Steam Runtime Diagnosticsgist: https://gist.github.com/nonl4331/b0dae7229eebef642ea73d7cf532e621EDIT:
See https://github.com/ValveSoftware/steam-for-linux/issues/11849#issuecomment-2970326740, this seems to only effect H265.
Steps for reproducing this issue: