protonscr

Cannot export game clips (H265)

steamopen AMD driversStreamingDistro Family: Arch
ValveSoftware/steam-for-linux#11849 · opened 2025-03-26 by nonl4331 · updated 2026-04-20 · 15 comments · github
Nnonl4331 2025-03-26 github

Your system information

  • Steam client version (build number or date):
    Wed, Mar 12 7:39 AM UTC -08:00
  • Distribution (e.g. Ubuntu):
    Arch Linux, mesa 1:25.0.2-2
  • Opted into Steam client beta?: [Yes/No]
    No
  • Have you checked for system updates?: [Yes/No]
    Yes
  • Steam Logs:
    steam-logs.tar.gz
  • GPU: Nvidia/Intel/AMD
    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:

[export] Starting for file: /tmp/steam/52F3521369AD36D8.mp4
[export] Failed to make initial encoder
Export failed with error code Failure

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 Diagnostics gist: https://gist.github.com/nonl4331/b0dae7229eebef642ea73d7cf532e621

EDIT:
See https://github.com/ValveSoftware/steam-for-linux/issues/11849#issuecomment-2970326740, this seems to only effect H265.

Steps for reproducing this issue:

  1. Open up a game recording clip
  2. Share
  3. Click any of the options
Kkisak-valve maintainer 2025-03-26 github

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.

Kkisak-valve maintainer 2025-03-26 github

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.

Nnonl4331 2025-03-26 github

Thank you so much for your help. I'll open an issue in the appropriate place.

Ssmcv 2025-03-31 github

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]

Nnonl4331 2025-06-08 github

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?).

IIzzur 2025-06-13 github

@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?

Nnonl4331 2025-06-13 github

@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
Wwrb2012 2025-09-20 github

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.

Mmanschwetus 2025-12-02 github

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
Llamenore 2025-12-03 github

Same issue here, errors exactly like nonl4331 puts it, trying to load CUDA drivers while I have AMD

Kkenkenspin 2026-01-05 github

Same error,
on Fedora Linux Workstation 43, Radeon RX 9060XT、

h264 work fine in custom tab.

NNaltarunir 2026-01-06 github

I can reproduce this as well. I'm going to switch to h264 for the time being.
GIST

MMadeOfMagicAndWires 2026-03-01 github

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?

Fforiequal0 2026-04-15 github

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"