Aegisub icon indicating copy to clipboard operation
Aegisub copied to clipboard

Video Framerate drop with NVIDIA 5000 series

Open i-Grey opened this issue 10 months ago • 10 comments

I have a problem when opening videos in Aegisub 3.4.2. The framerate drops in the video. I can't measure it precisely with my eyes, but it seems to drop from the usual 23.976 fps to around 10 fps in some parts.

I have no issues playing videos in VLC or Media Player Classic with the K-Lite Codec Pack.

This problem did not occur on my old PC, but it happens on my new PC with an RTX 5000 series GPU. I've heard that the RTX 5000 series does not support 32-bit applications, so I suspect that might be the cause.

I tried downloading another forked version of Aegisub with a 64-bit build and tested it. While the performance was better, it was still far from the normal framerate.

Do anyone have solution about this issue?

i-Grey avatar Mar 06 '25 07:03 i-Grey

Try this fork, which adds hardware accelerated decoding capabilities https://github.com/mojie126/Aegisub

mojie126 avatar Mar 06 '25 10:03 mojie126

Can you first test whether the problem persist when playing using ffplay? As Aegisub generally use ffmpeg as underlying video provider, It could help us isolate the problem.

EL-File4138 avatar Mar 06 '25 14:03 EL-File4138

I don't see how your new GPU is necessarily related since Aegisub decodes with the CPU. Though it does use OpenGL, so maybe that?

witchymary avatar Mar 06 '25 17:03 witchymary

Yeah, I'd suspect that the slowdown happens on the playback side, rather than the decoding side.

Aegisub's video display uses OpenGL and is, unfortunately, fairly old and therefore probably fairly "bad" (that is, judging by the comments, it had to use some hacks to accommodate the hardware that was available at the time, these hacks are probably no longer necessary, and instead counterproductive.) At the moment, I don't understand it or the relevant technologies well enough to attempt to fix it.

One thing you can check, though, is if Aegisub really does use your main GPU. There have been cases with other users where Aegisub would use some secondary integrated graphics card instead of the main GPU, and that would cause problems.

arch1t3cht avatar Mar 06 '25 17:03 arch1t3cht

I've heard that the RTX 5000 series does not support 32-bit applications, so I suspect that might be the cause. this only applies to the physics engine for older games.

AdventurerRussia avatar Mar 06 '25 20:03 AdventurerRussia

Can you first test whether the problem persist when playing using ffplay? As Aegisub generally use ffmpeg as underlying video provider, It could help us isolate the problem.

Is there an easy way to try this? I googled it but still don't fully understand.

From my perspective, my old PC had no issues at all. I did a clean install of Aegisub, and it worked fine.

On my new PC with an RTX 5070 Ti, videos play smoothly in MPC (included with K-Lite) and VLC, but not in Aegisub.

I downloaded aegisub different fork with a 64-bit version, which improved performance. It’s still not as smooth as it should be, but the frame rate increased from around 10 FPS to 20 FPS.

i-Grey avatar Mar 10 '25 13:03 i-Grey

Playback with a custom demux/decoding solution does not necessarily reflect the correct installation of ffmpeg environment(although VLC does use libavcodec which is used by ffmpeg, the hardware decoding support is somewhat different). As arch said, you could first check whether Aegisub is utilizing the GPU. Make sure no other multimedia app is opened (this may include browsers that are playing videos or just rendering an effect-heavy page), open Task Manager, and switch to the discrete GPU page under the Performance menu (Notice which is your dGPU if you have an iGPU). When playing video through Aegisub, you should see some activities on the Utilization or Video encode/decode utilization graph.

EL-File4138 avatar Mar 10 '25 15:03 EL-File4138

Playback with a custom demux/decoding solution does not necessarily reflect the correct installation of ffmpeg environment(although VLC does use libavcodec which is used by ffmpeg, the hardware decoding support is somewhat different). As arch said, you could first check whether Aegisub is utilizing the GPU. Make sure no other multimedia app is opened (this may include browsers that are playing videos or just rendering an effect-heavy page), open Task Manager, and switch to the discrete GPU page under the Performance menu (Notice which is your dGPU if you have an iGPU). When playing video through Aegisub, you should see some activities on the Utilization or Video encode/decode utilization graph.

I tried as you mentioned. Yes, it uses dGPU while playing video in aegisub. But it use 3D tab, didn't use Video Encode/Decode at all.

i-Grey avatar Mar 11 '25 10:03 i-Grey

Which is expected, since ffms2 does not properly support HWAccel (Specifically the NVDEC silicon/CUDA decoding), and the 3D activity you've reported is from the OpenGL rendering the decoded content on the window. So it seems like your GPU is playing fine now.

To clarify:

  • Does the slowdown happen consistently across all videos, or does it only present for certain video clips/certain parts of videos? As you've mentioned "in some parts", I'm suspecting that. If it's particular to instance, we may require you to submit some video clip instances you can comfortably share for us to analyze before we can debug anything (or just tell you to transcode to an easier-to-decode format).
  • During the performance test, do you notice the CPU activity (You can further confirm this by looking at per app load in the Application tab)? Does it create an abnormally high load or does it not ditch anything? Normal playback should comfortably eat a noticeable percentage, and it should do something without any under- or over-utilization. If it does, it might indicate a software decoding bottleneck.

If both came back negative, it would be mostly convinced to be an implementation issue and will require more eye to review.

EL-File4138 avatar Mar 12 '25 21:03 EL-File4138

I'm experiencing frame drops, too, though I'm unsure if it's because of Aegisub. Only found this issue through Googling "RTX 5070 video decoding framerate drop" And here's the kicker, it's more than a framerate drop of the video. My monitor's refresh rate drops, too lol

Image

7se7en avatar Aug 16 '25 06:08 7se7en