ggarra13 / mrv2

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

Playback performance in 4K (and Full HD?) #286

Closed Thane5 closed 3 months ago

Thane5 commented 3 months ago

I recorded some test clips today, and noticed that mrv2 has oddly bad playback performance with these.

Here are two clips: https://mega.nz/folder/RjB3QZIL#wcW7e5lgAHU17ZaHcXy0SQ

Hardware: NVME SSD, Intel 6-core from 2018 (i7 8700), and an Nvidia RTX 3070.

AltaArts commented 3 months ago

Hum, that is odd. I downloaded your clips and can confirm what you are seeing. It looks like it is buffering very little, even though there is plenty of RAM left on my machine.

But oddly all the footage I have buffers and plays fine. Even a 6k ProRes422HQ camera log using an OCIO transform and LUT file in MRV2 plays back perfectly fine for me.

Maybe there is an issue with that specific codec - where was it encoded from? Or maybe MRV2 needs to allocate more memory for the buffer?

Thane5 commented 3 months ago

It's straight from a Fujifilm X-T30 with the default 4K settings.

ggarra13 commented 3 months ago

You probably should stop using that Fujifilm X-T30 camera as it is saving movies with a deprecated yuv420jp format which was causing the issue. Anyway, here's a patch in v1.2.4 to work around it.

.exe: https://mega.nz/file/qXpwDZpL#FRqlTGwooMz4e7iXOy8Wzhn9r4-16ixNY1-x8W4Fb74

.zip: https://mega.nz/file/mfAEBLDD#dXl-MeBZWEOwJKm5oFEcWdxHlRYXyyPlY9Yp-FaTwTQ

Thane5 commented 3 months ago

I just ran into this clip that i recorded with the windows game bar. It has a very similar buffering issue, even with the latest beta.

https://mega.nz/file/Q6ImnLqA#TsdCvHe2X7UyvbA7YhCplYHQa13MCaJwhnnLUAzJCrE

Thane5 commented 3 months ago

But thanks for the fix in the Fuji files, they play nicely now.

ggarra13 commented 3 months ago

I just ran into this clip that i recorded with the windows game bar. It has a very similar buffering issue, even with the latest beta.

That clip incorrectly does not set up a color space (if you go to F5 Media Information - Color Space you will see it is unknown) for YUV420P_U8 movies.
In that case, mrv2 tries to color correct it so it behaves like Blender does for the best color transformation (see your issue #235). Unfortunately, that takes a hit in performance. If you don't care about the color issues and want fast performance, you can toggle of Settings->FFmpeg Color Accuracy off BEFORE you load the clip. For future references, the suggestion is to do any of the following: 1) Use color tools that set the color space correctly for YUV420P_U8. 2) Use another color space other than YUV420P_U8.

Thane5 commented 3 months ago

In that case, wouldn't it make sense to turn off the color accuracy setting for clips that have no defined color space?

ggarra13 commented 3 months ago

In that case, wouldn't it make sense to turn off the color accuracy setting for clips that have no defined color space?

If we do that, then we won't match the color transformation with a .png as seen in issue #235. mrv2 is supposed to be a professional tool so it chooses accuracy over performance if push comes to shove. And since, according to you, blender also saves with unknown color space, I think the accuracy should be kept. What I can try to do is make it work so that when you turn on or off the setting the movie is automatically reloaded, instead of forcing you to toggle it on or off before you load the movie.

Thane5 commented 3 months ago

I don't actually have to reload the file to change the accuracy. I can just close the preferences and suddenly it will play smoothly.

Oh wait, maybe it just buffered in the background and that why it suddenly is smooth.

ggarra13 commented 3 months ago

Oh wait, maybe it just buffered in the background and that why it suddenly is smooth.

Yep. That's more likely.