Open Piglerr opened 2 weeks ago
That's strange. I'll have a look tomorrow and try to reproduce it.
I haven't seen anything strange in my computer, it's using the GPU as expected. Let's see if we can find something on the logs. Please follow these steps:
So I have done all of that.
When I set the capture method to Windows 10, the CPU dropped to around 15% and the GPU was at 4%. But it still stutters.
Should i try to wipe the gpu drivers with DDU (DisplayDriverUninstaller) and install the latest one?
I see no errors in the log, and the fact that the CPU usage drops when changing to Windows 10 seems to indicate that the GPU acceleration is also working.
You say that the error started randomly without making any change to DiscordAudioStream, so something external must have caused it. As you said, you could try reinstalling the drivers, maybe it somehow fixes the issue.
This part of your original message seems very strange:
Even if i drag the window the window itself lags behind.
Can you try the following?
To clarify whats happening i recorded it heres a link to the video:
And the log file:
I will now completely wipe the video drivers. I will update you on how that turns out.
I now wiped and reinstalled the video drivers but the issue is still there.
I see I misunderstood what you meant. The issue you are seeing can be caused when the UI thread has too much work and can't keep up. Usually, the heaviest task in the UI thread is drawing the captured image. Can you check if capturing a smaller area (for example, a small window) also causes this stuttering?
The ways to mitigate this performance issue are:
Still, what seems really strange to me is that it just started happening randomly. Do you remember doing any change on your system that could have caused it? (like a Windows or driver update, connecting a 4k monitor, etc.)
Im not shure but there could have been a Windows update before this happened.
BUT i just found something weird as i tried to capture a small window. Here is a video again:
https://youtu.be/mj6DRScGW44?si=a2I4xOSReNh3oQ8_
And the log file again:
Okay so before i press the start stream button the window itself is what feels like 60 ish fps. Or at least choppier than everything else (i use a 144hz monitor). It's hard to see, but if you compare the cursor and the window with each other, you can see even in the video that the cursor is smoother than the window. If the scale setting is not at 100%, the window and the capture stutter. At 100% it no longer stutters. But it doesn't stutter no matter what scale setting I have set if I select a very small window for Area.
Oh! That's a great find! I forgot that rescaling the image is done on the CPU, so maybe that has somehow become very slow on your PC. Rescaling the image on the GPU should be possible, but it's been a long time since I wrote this program, so it will take some time to find out how. Also, I don't have nearly as much free time as I did back then.
For now you can keep using the 100% scale as a workaround.
Will do. Thank you for your time.
I managed to free up some time and I think I got it working. Thank you for your patience.
The latest build scales down the image using the GPU, please try it and let me know if it fixes your performance issue (also tell me if you find any bugs).
Make sure to use the Windows 10
capture method for the best results
I'm still not 100% happy with the image quality, sometimes it has a bit of aliasing. I might try to implement a better sampling algorithm before publishing the release version, if I find the time.
I use Discord Audio stream since version 1.2.3 but for some reason it stopped working a few days ago. I now updated to the latest version and the issue is still there.
The video (and the preview) are very laggy all of a sudden. Even if i drag the window the window itself lags behind.
I dont know if the app did use my gpu or cpu before this issue happened but it does use my cpu now (at 20%ish utilization) which doesnt have integrated graphics.
I have already set my 2070s as a rendering device in the Windows and Nvidia settings but that didnt help either.
Any ideas how to resolve this?