mrv2 icon indicating copy to clipboard operation
mrv2 copied to clipboard

Playback performance in 4K (and Full HD?)

Open Thane5 opened this issue 1 year ago • 2 comments

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

  • It is most apparent in the 4K clips (4K as in 3840*2160). Here, mrv2 plays about half a second, then buffers half a second and so on.
  • In the 1920*1080 the buffering is a bit shorter, but still visible. Other video players can play these clips smoothly

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

Thane5 avatar Aug 16 '24 17:08 Thane5

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?

AltaArts avatar Aug 16 '24 17:08 AltaArts

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

Thane5 avatar Aug 16 '24 17:08 Thane5

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

ggarra13 avatar Aug 16 '24 20:08 ggarra13

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 avatar Aug 17 '24 10:08 Thane5

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

Thane5 avatar Aug 17 '24 10:08 Thane5

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.

ggarra13 avatar Aug 17 '24 10:08 ggarra13

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

Thane5 avatar Aug 17 '24 11:08 Thane5

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.

ggarra13 avatar Aug 17 '24 11:08 ggarra13

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.

Thane5 avatar Aug 17 '24 11:08 Thane5

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

Yep. That's more likely.

ggarra13 avatar Aug 17 '24 11:08 ggarra13