ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

Playback of recordings presents a very low framerate and choppy playback. Exported clips have the correct framerate, but also severe visual artifacting. #11425

Open mattipulkkinen opened 2 weeks ago

mattipulkkinen commented 2 weeks ago

Your system information

Please describe your issue in as much detail as possible:

When attempting to play back a recording in the Steam client, the playback appears to have a much lower framerate than the game had, or what the recording should have. Even that low framerate does not appear to be steady, because the playback looks somewhat choppy. A clip exported from this recording has a higher framerate, but also suffers from serious visual artifacting which looks like sections of the image being displaced for a short period.

I have videos demonstrating both problems but they are too big to upload to Github.

This problem is present in recordings of Tekken 8 and Monster Hunter Rise, and possibly other games as well.

Steps for reproducing this issue:

  1. Play a game with Steam Recording enabled
  2. Play the recording back after quitting the game
  3. Export a clip from the recording and then view it with a video player
System info ``` System: Kernel: 6.11.6-350.vanilla.fc40.x86_64 arch: x86_64 bits: 64 Desktop: GNOME v: 46.6 Distro: Fedora Linux 40 (Workstation Edition) Machine: Type: Desktop Mobo: ASRock model: X570 Taichi serial: UEFI: American Megatrends v: P5.63 date: 08/22/2024 CPU: Info: 8-core model: AMD Ryzen 7 5800X3D bits: 64 type: MT MCP cache: L2: 4 MiB Speed (MHz): avg: 3896 min/max: 550/4550 cores: 1: 3896 2: 3896 3: 3896 4: 3896 5: 3896 6: 3896 7: 3896 8: 3896 9: 3896 10: 3896 11: 3896 12: 3896 13: 3896 14: 3896 15: 3896 16: 3896 Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M] driver: amdgpu v: kernel Device-2: Realtek Streamplify CAM driver: snd-usb-audio,uvcvideo type: USB Display: wayland server: X.Org v: 24.1.4 with: Xwayland v: 24.1.4 compositor: gnome-shell driver: dri: radeonsi gpu: amdgpu resolution: 1: 2560x1440~240Hz 2: 2560x1440~60Hz API: OpenGL v: 4.6 vendor: amd mesa v: 24.1.7 renderer: AMD Radeon RX 7900 XT (radeonsi navi31 LLVM 18.1.6 DRM 3.59 6.11.6-350.vanilla.fc40.x86_64) API: EGL Message: EGL data requires eglinfo. Check --recommends. Audio: Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 HDMI/DP Audio driver: snd_hda_intel Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel Device-3: Focusrite-Novation Scarlett Solo 4th Gen driver: snd-usb-audio type: USB Device-4: HP HyperX Cloud Alpha Wireless driver: cdc_acm,hid-generic,snd-usb-audio,usbhid type: USB Device-5: Realtek Streamplify CAM driver: snd-usb-audio,uvcvideo type: USB API: ALSA v: k6.11.6-350.vanilla.fc40.x86_64 status: kernel-api Server-1: PipeWire v: 1.0.9 status: active Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi IF: wlp5s0 state: down mac: Device-2: Intel I211 Gigabit Network driver: igb IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: Bluetooth: Device-1: Intel AX200 Bluetooth driver: btusb type: USB Report: btmgmt ID: hci0 state: up address: bt-v: 5.2 Drives: Local Storage: total: 3.64 TiB used: 588.41 GiB (15.8%) ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 990 PRO 4TB size: 3.64 TiB Partition: ID-1: / size: 3.64 TiB used: 587.99 GiB (15.8%) fs: btrfs dev: /dev/dm-0 ID-2: /boot size: 973.4 MiB used: 413 MiB (42.4%) fs: ext4 dev: /dev/nvme0n1p2 ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat dev: /dev/nvme0n1p1 ID-4: /home size: 3.64 TiB used: 587.99 GiB (15.8%) fs: btrfs dev: /dev/dm-0 Swap: ID-1: swap-1 type: zram size: 8 GiB used: 1.19 GiB (14.9%) dev: /dev/zram0 Sensors: System Temperatures: cpu: 37.5 C mobo: 39.0 C gpu: amdgpu temp: 63.0 C Fan Speeds (rpm): fan-1: 628 fan-2: 0 fan-3: 1341 fan-4: 592 fan-5: 584 fan-6: 3268 fan-7: 589 gpu: amdgpu fan: 111 Info: Memory: total: 32 GiB available: 31.26 GiB used: 8.55 GiB (27.3%) Processes: 488 Uptime: 8h 38m Shell: Zsh inxi: 3.3.36 ```
mattipulkkinen commented 2 weeks ago

Now with Recording available in Stable (1730843162) I tried again, and the issue persists.

This time I also tried "Create a Share Link" for a clip I made, and I got this: https://steamusercontent-a.akamaihd.net/ugc/2403326468924845222/1D48E87EAEECE57134780B93F9C4515C643E94BF/

It plays back even worse in the browser, but if I download that file to my PC and play it back in a video player, it plays better than it does in the browser, but with a lower framerate than it should have. It also displayes the same distortions I mentioned earlier.

echolessowl commented 2 weeks ago

I've been getting this too on Arch Linux with a 7700XT. Hoping we get a response, steam game recording could be a game changer if it worked right

urbenlegend commented 2 weeks ago

This issue isn't just on AMD. It is present on Nvidia as well. Both the playback preview and the final export have very choppy framerates. This along with https://github.com/ValveSoftware/steam-for-linux/issues/11166 make Steam Recording basically unusable in Linux.

Ovyerus commented 6 days ago

Happening here on NixOS w/ 7900 XT on KDE Wayland, however playback in Steam's clip viewer is smooth as I'd expect the output to be. It is possible to find the clip's folder on disk and combine the .m4s chunks together with ffmpeg and get a usable file, but it's less than ideal.

cat init-stream1.m4s chunk-stream1* > tmp_audio.mp4
cat init-stream0.m4s chunk-stream0* > tmp_video.mp4
ffmpeg -i tmp_video.mp4  -i tmp_audio.mp4 -c copy merged.mp4
# Re-encode to whatever format you need
ffmpeg -i merged.mp4 -c:v libvpx-vp9 -b:v 10M -filter:v scale=1920:-1 -r 60 encoded.webm
rm tmp_*