Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delayed video/input response on AMD when streaming above 1080p #159

Closed
salty2011 opened this issue Jan 1, 2025 · 3 comments
Closed

Delayed video/input response on AMD when streaming above 1080p #159

salty2011 opened this issue Jan 1, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@salty2011
Copy link
Contributor

On the current stable build of Wolf as of 2/1/2025 there appears be some sort of delay in the video output to the input. In testing navigating the steam interface you can hear the navigational sounds immediately and the video output will then update date several seconds later.

The video feed itself looks perfect and even the stats for the stream show a locked 60fps and not packet loss or jitter. It seems like the video stream is very much several seconds behind the input.

For reference running on

  • AMD Risen 5900x
  • AMD 7900xtx
  • 128GB memory
  • NVME storage
  • UnraidOS 7

Lowering the stream to 1080p it seems to work without issue, going to 1440p@60fps and above present the problem.
See discord thread https://discord.com/channels/856434175455133727/1322977004647088262

Wolf Logs from testing
_wolf-amd-wolf-1_logs.txt
_wolf-amd-wolf-1_logs-2.txt

@salty2011 salty2011 added the bug Something isn't working label Jan 5, 2025
@ABeltramo
Copy link
Member

I've just pushed a fix that could potentially fix (or at least mitigate) this, you can update to the latest with:

docker pull ghcr.io/games-on-whales/wolf:stable

Let me know how it goes!

@salty2011
Copy link
Contributor Author

Just did a round of testing, looks like this has improve significantly audio, controls and video appear to be in sync. and all games playing well.

One thing I did note is that on all resolutions fps appears to be locked to 60fps despite moonlight being set to 120fps. For testing I did lower the resolution to 1080p as I know games can easily hit 80 - 100fps at that resolution, despite moonlight being set with or without vsync being enabled seemed to be locked to 60fps or below.

But no delays in video and controls were observed
_wolf-amd-wolf-1_logs-3.txt

@ABeltramo
Copy link
Member

One thing I did note is that on all resolutions fps appears to be locked to 60fps despite moonlight being set to 120fps

This is to be somewhat expected.
The underlying issue is that the video encoding pipeline can't keep up with the amount of frames that we are outputting.

Before the fix, we were just accumulating the frames in excess, which will cause latency and delays at best and out of memory exceptions at worst.
Now, we are just dropping all the "extra" frames that are generated whilst your GPU is busy encoding so that you always get the latest picture.

So why is the video encoder that slow on AMD specifically? It's a mix of things:

  • The VAAPI encoder in Gstreamer is slower compared to Nvidia and Intel Quicksync. This might get better if and when the Vulkan encoders will be implemented.
  • We don't have a 0 copy pipeline (but I'm working on it Implement zero copy pipeline #156 )

With all that said I think that the original issue is fixed, so I'm going to close this 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants