ggarra13 / mrv2

Professional player and review tool for vfx, animation and computer graphics.
https://mrv2.sourceforge.io
BSD 3-Clause "New" or "Revised" License
234 stars 15 forks source link

Playback Performance on Windows 10 and NVIDIA RTX 5000 #207

Closed Rapheus closed 4 months ago

Rapheus commented 8 months ago

Hello!

I'm having issues with playing back a sequence of 2k EXRs (Scanline, ACEScg) from a fast local drive. The playback rate never goes higher than 8FPS (using the HUD) even when the sequence is fully cached. I tried Window, presentation and full modes.

System specs MRV 1.10 Windows 10 AMD Ryzen Threadripper 3955WX 16Cores NVIDIA RTX 5000 128Gb memory

In comparison, cineSyncPlay can playback the same sequence at 24FPS and makes a big use of the GPU. I haven't tried xStudio or OpenRV yet.

I would love to rely on an OpenSource for these features Open Source, OCIO2, Annotations, OTIO support, Python API

Thanks a lot

ggarra13 commented 8 months ago

I'm having issues with playing back a sequence of 2k EXRs (Scanline, ACEScg) from a fast local drive. The playback rate never goes higher than 8FPS (using the HUD) even when the sequence is fully cached. I tried Window, presentation and full modes.

That's really strange, as your machine specs are really good and you said you cached the sequence, which was my first guess.

1) Can you show me the values of your Settings Panel?
2) How long is your sequence?
3) What are your OCIO settings (ie. Input Color Space, Display/View and Look)?
4) Are you using a custom config ocio file? If so, can you post it here?

I would love to rely on an OpenSource for these features Open Source, OCIO2, Annotations, OTIO support, Python API

Most people are already using mrv2 without any issues, so I am puzzled what's wrong with your configuration.

Rapheus commented 8 months ago

Thanks for the quick answer

  1. Find attached a screenshot of my Settings Panel
  2. The sequence has 869 frames, but it also happens with shorter image sequences
  3. OCIO transform : ACEScg -> sRGB Display / ACES 1.0 - SDR Video
  4. I am using a custom OCIO config but the problem persists with the built-in configs

mrv2_7RBAYcHr7a

ggarra13 commented 8 months ago

I apologize for the colors, as this was not ACEScg, just for testing. Here's a sample of 2K EXRs playing at 60FPS with ACEScg on my Windows 11, NVidia 3080 RTX a sequence of about 200 Frames (after caching):

https://github.com/ggarra13/mrv2/assets/6072843/97ba0115-9e48-4b69-99f8-31450ac46128

The movie is no longer at github.com. In case you missed it, here it is:

https://mega.nz/file/aKhzibxA#6vmxg9KXWDwy2frlCOzjNepF5apzIL79GhT08LT8XxI

ggarra13 commented 8 months ago
  • The sequence has 869 frames, but it also happens with shorter image sequences

Would it be possible for you to upload a portion of the sequence that exhibits the issue to some download service (ie. mega.nz, dropbox, etc) as a .zip file? If the project is confidential, send me the link to ggarra13@gmail.com instead of posting the link in public.

Also, I forgot to ask you:

1) Do you have any additional color corrections applied, by any chance, either gamma, gain or those in the Color Panel? 2) What does your Settings->System->Display Settings look like (not sure if this is the same on Windows 10)?

ggarra13 commented 8 months ago

Finally, one more thing:

  1. Can you play 2K movie files at 24fps or do they also play at 8 FPS?
Rapheus commented 8 months ago

No color correction is applied in the Color settings

HfxnTlDV0S

I have a single big monitor and resolution was set to 3840x2160 with a Scale of 150%. I changed it to 1920x1080 at 100%, rebooted the machine and still got the issue

ApplicationFrameHost_AbfpxCDWFk ApplicationFrameHost_dlvpN3S7gY

I also tried to play H264 clips at 1920x1080 and I got the same framerate performance (around 6FPS).

when playing the sequence/clip, both CPU and GPU are really low usage Taskmgr_Mqj8yEN28h

I could share with you the exr sequence but I doubt that the problem comes from it

I do have access to a lot of workstations and have been trying on multiple machines without success. Though I don't think I have tested Windows 11 yet

Thank you

ggarra13 commented 8 months ago

I do have access to a lot of workstations and have been trying on multiple machines without success. Though I don't think I have tested Windows 11 yet

Thank you for your patience. I have isolated four things to test:

1) Under Windows 11, the shortcut icon in the Properties section, has a Compatibility section:

image

If Windows 10 has that too (I don't have Win10 to test against), make sure it has not been set to on, as it can have drastic performance issues. mrv2 is compiled to be compatible with Windows 8.1, and perhaps Win10 sets the compatibility mode automatically.

2) Can you play without OCIO at 24 FPS (set ICS to None or Raw) or is that a problem too? If you can't, we can rule out one more thing.

3) Keep the Desktop scale factor at 100% for the time being, as that can potentially decrease performance.

4) You have an 5000 RTX, which I thought had not been released yet. Do you have other (older) graphic cards to test against? I list this one last, as you said Cinesync Pro plays it fine and, AFAIK, it uses the same OpenGL core as mrv2.

Puzzled and without a clue, @ggarra13 .

Rapheus commented 8 months ago

Switching OCIO to None makes the performance jump to 11FPS instead of 6FPS

I could test it under a 3090 Ti, would that help ?

Rapheus commented 8 months ago

explorer_fVPxtQtEIn

About the compatibility settings, Windows 10 is not on the list. I'm not overriding the compatibility but when I run the Compatibility Troubleshooter, it does prompt be with this window.

msdt_KwylLvLvu6

ggarra13 commented 8 months ago

I could test it under a 3090 Ti, would that help ?

It may help. At least we would know it is consistant with Windows 10, as that card is almost like mine.

I'm not overriding the compatibility but when I run the Compatibility Troubleshooter, it does prompt be with this window.

That's BAD!!! You should not run it with Windows 8 compatibility. It will make it really slow. There has to be a way to override it.

ggarra13 commented 8 months ago

About the compatibility settings, Windows 10 is not on the list.

In principle, it should not be on the list. The default should be to be compatible with Win10 without you switching compatibility. At least that's how it works on Win11.

If you get the same results with the 3090 Ti, I am blaming Win10.

I'll compile a version of mrv2 compatible with Win10 for you test then. And I am going to c**rse Microsoft.

Rapheus commented 8 months ago

Weirdly enough, I do have the exact same settings when checking the compatibility troubleshooter for cineSync Play

Thanks a lot for trying to compile on win10 Looking forward to it

ggarra13 commented 8 months ago

Weirdly enough, I do have the exact same settings when checking the compatibility troubleshooter for cineSync Play

Ok. It gets weirder with every message. Before you go, can you try mrv2 with the 3090 TI and see if playback is just as bad?

ggarra13 commented 8 months ago

when playing the sequence/clip, both CPU and GPU are really low usage

One thing I noticed from your picture of monitoring your machine, was that your Ethernet was through the roof. Are you running together with mrv2 some network demanding application like NVidia's Omniverse on the Cloud (ie. a good reason to test the RTX 5000)?

ggarra13 commented 8 months ago

Thanks a lot for trying to compile on win10 Looking forward to it

First, I'll wait for you to tell me if you get the slowdown with the 3090 Ti. The way I see it, we have three probable causes so far:

1) Windows 10 and its older GPU drivers.

2) NVidia RTX 5000 which is still in beta. If the 3090 Ti plays it just as badly, we can rule out 2). If it doesn't we found the culprit.

3) Some OpenGL3 change in tlRender's source code that the RTX 5000 does not like. You can rule out 3) by testing an older version of mrv2 like v0.6.3, which does not use OpenGL for the timeline just like CineSync.

Rapheus commented 8 months ago

I haven't had the chance to test 1/ and 2/ yet but I will soon

but did try mrv2 0.6.0 and still got the issue on Win10 + RTX5000

ggarra13 commented 8 months ago

but did try mrv2 0.6.0 and still got the issue on Win10 + RTX5000

I appreciate your efforts. We ruled out one more thing.

I've been going thru mrv2 code also and thought of two things that may confuse a graphics card (that cineSync does not do), which you might check with NVidia if you are beta-testing the RTX5000 with them:

1) Use of two PBOs to read from while playing. This is a trick that allows you in mrv2 to select a large area of the screen and get the pixel values for the whole area really quickly. This is the info: https://www.songho.ca/opengl/gl_pbo.html

2) FLTK's unique use of OpenGL1 contexts even while OpenGL3 context is setup and drawing widgets on top of GL (working on all platforms, incredibly). I am not too familiar on the details, but mrv2 uses this to render out fonts of all kinds, including Pango and International text. For more info, have someone at NVidia talk to: manolo.gouy@gmail.com

For testing 2) if the OpenGL1 context is the culprit, here's two versions:

This one draws no text nor FLTK widgets on top of OpenGL. If this does not work, don't bother with the next one. .exe: https://mega.nz/file/SC5iDR6I#ZEN6DWMXCVJQNhfTzxRD2filnjZT-vB4fUACh3vegKU

This one uses OpenGL3 to draw the text (only two fonts available) but it also draws FLTK widgets on top of it. .exe: https://mega.nz/file/GTp1CDaK#mLUV02EsmZf7vG8kf7vApau6WhMzck9KlNFb_zVY-xM

Rapheus commented 7 months ago

Hey @ggarra13

Still got the same results with mrv2-v1.1.1-Windows-amd64-NOTEXT.exe You can rule that out

Rapheus commented 7 months ago

Finally making progress

GeForce 3090 Ti on Win10 > doesn't work, but slightly better than the RTX5000 (H264 is at 19fps) (EXRs are still at 7-8fps) RTX5000 on Win11 > works at 24fps !!

It has to be something to do with Win10 Nvidia drivers are 528.24 on all my tests

ggarra13 commented 7 months ago

It has to be something to do with Win10 Nvidia drivers are 528.24 on all my tests

Just FYI, my NVidia drivers on Win11 are 551.61. They are not the latest ones, but close to.

It would suck if you could not upgrade your Win10 drivers without having to upgrade the OS itself.

Rapheus commented 7 months ago

Tried updating the nvidia drivers to 551.86 on Win10 does not fix the issue

ggarra13 commented 7 months ago

Tried updating the nvidia drivers to 551.86 on Win10 does not fix the issue

Ok. I'll compile an executable compiled with MSVC 2022 (I was using MSVC2019) targetting Win8.1 and if that does not work, I'll set one to target Win10.

ggarra13 commented 7 months ago

Ok. Here's a version of mrv2 v1.1.1 compiled under MSVC 2022 with the latest Win10 SDK:

https://mega.nz/file/XeBU0bgC#RD32_e87algOejym8eNVDEOAt-TN4XA-reVDpQztqs8

Rapheus commented 7 months ago

That build doesn't fix it for me on Win10 Thanks for going through the effort

ggarra13 commented 7 months ago

That build doesn't fix it for me on Win10 Thanks for going through the effort

Oh well. I'll see on the FLTK mailing list if some kind soul can do some testing on Windows 10 with NVidia or other graphic card. If it does not work for them either, I'll see to try to reach out to someone at Microsoft, as this one goes beyond my knowledge.

ggarra13 commented 7 months ago

I'll see on the FLTK mailing list if some kind soul can do some testing on Windows 10 with NVidia or other graphic card.

I got two people testing mrv2 on the FLTK mailing list. I had them test on Windows 10 a 30 FPS movie at 4K instead of 2K OCIO, as that would have been somewhat technical and harder to explain. One reported 10 FPS, but with a graphics card from 2014. The other reported 28 FPS with a GeForce GTX 1080 Ti, whose performance, albeit a tad bad, is normal due to the bandwidth of that card. So, the results under Windows 10 are still inconclusive. I also contacted Microsoft, who gave me the cold shoulder saying they don't deal with neither OpenGL nor NVidia issues.

I'll leave this thread open just in case someone else runs into the issue or wants to do some testing.

ggarra13 commented 7 months ago

You will be glad to know I improved playback performance on v1.1.4 by about 120%. It is mostly noticeable on macOS (which went from 15fps on 4K movies to 60fps without OCIO), but you should also see the benefits on Windows and Linux. OCIO playback will not benefit as much, but should still see some benefits.

Rapheus commented 7 months ago

Great news, i'll make sure to try 1.14

ggarra13 commented 6 months ago

v1.1.4 has just been released. Please report if the performance has indeed improved for you.

Rapheus commented 4 months ago

Hello

tried v1.2.0 on Win 10 and a A5000RTX on an EXR sequence as well as an H264 clip and the FPS is now 24

Thanks a lot @ggarra13!!! this issue is now resolved