Topic: Optical Flow 5 Settings

Hi Devs,

This year it seems nVidia pushed 5.x.x versions of optical flow and looking at the release notes I think there might be some new values to play around with? But they aren't available in SVP yet.

Right now, the only values we can change are:

nvof
nvof_grid
nvof_quality

I already check and motion vector grid seems to work with 3 now as well, instead of 4 before being the limit.

Not sure if more options have been added to experiment with and add? And if there are other value updates too.

I am more than happy to beta test with content if there's extra stuff.

Re: Optical Flow 5 Settings

Rife kinda killed it (for video interpolation)

3 (edited by Blackfyre 04-04-2023 04:13:49)

Re: Optical Flow 5 Settings

dlr5668 wrote:

Rife kinda killed it (for video interpolation)

I haven't tried it in over a month. If the issue is fixed where it takes so long to open a 4K file, then I would use it without hesitation.

But the loading issues always put me off.

EDIT:

OKAY WOW THE DIFFERENCE IS MASSIVE!

Even at double the FPS (48FPS) it looks better than anything else at 120FPS.

It is worth the loading time and seek loading time when forwarding and moving back. Artifacts are minimal too. And now I wish my RTX 3090 could push 3x or 4x the framerate haha!

Re: Optical Flow 5 Settings

Blackfyre wrote:
dlr5668 wrote:

Rife kinda killed it (for video interpolation)

I haven't tried it in over a month. If the issue is fixed where it takes so long to open a 4K file, then I would use it without hesitation.

But the loading issues always put me off.

EDIT:

OKAY WOW THE DIFFERENCE IS MASSIVE!

Even at double the FPS (48FPS) it looks better than anything else at 120FPS.

It is worth the loading time and seek loading time when forwarding and moving back. Artifacts are minimal too. And now I wish my RTX 3090 could push 3x or 4x the framerate haha!

With Rife v2 I run 2160p movies at 60Hz with the occasional micro lag on my 3080 and I'm happy with that smile

Re: Optical Flow 5 Settings

New dev rife build will also reduce lag on rewind to zero

6 (edited by Blackfyre 05-04-2023 06:28:08)

Re: Optical Flow 5 Settings

dlr5668 wrote:

New dev rife build will also reduce lag on rewind to zero

Nice, can't wait for an update. It feels like I'm watching content in a completely new way now with RIFE.

Doubt we'll see it, but if performance improves to allow me to push 3x the framerate with my RTX 3090 that would be amazing.

Still don't know why Dolby Vision flickers with SVP on, and with RIFE the colours also wash out and blacks become dark grey, here is my current configuration:

ontop
fullscreen=yes

dolbyvision=yes

vo=gpu-next
profile=gpu-hq
fbo-format=rgba16hf
gpu-api=vulkan
gpu-context=winvk

hwdec=nvdec

linear-downscaling=no

spirv-compiler=auto
video-sync=audio
vulkan-swap-mode=fifo
video-sync-max-video-change=5
drm-vrr-enabled=no

tone-mapping=mobius
hdr-compute-peak=yes
tone-mapping-mode=luma
tone-mapping-param=mobius
tone-mapping-max-boost=1.0

dither-depth=auto

scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
sigmoid-upscaling=yes

osd-level=1
osd-bar-align-x=0
osd-bar-align-y=-1
osd-bar-w=25
osd-color=0.5

sub-ass-shaper=complex
sub-font-size=37
sub-scale-by-window=yes
sub-pos=100
sub-align-x=center
sub-align-y=bottom
sub-margin-y=3
sub-color=0.5

volume=100
volume-max=100

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\KrigBilateral.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\SSimDownscaler.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\FSRCNNX_x2_8-0-4-1.glsl"

Re: Optical Flow 5 Settings

Dolby Vision isn't supposed to work with Vapoursynth scripts at all.
https://github.com/mpv-player/mpv/issues/10438
SVP's provided mpv is patched by me, but I've no idea why it blinks sometimes and nobody from mpv's team seems to work on this.

8 (edited by Blackfyre 05-04-2023 12:21:25)

Re: Optical Flow 5 Settings

Chainik wrote:

Dolby Vision isn't supposed to work with Vapoursynth scripts at all.
https://github.com/mpv-player/mpv/issues/10438
SVP's provided mpv is patched by me, but I've no idea why it blinks sometimes and nobody from mpv's team seems to work on this.

Oh fair enough.

I had it for working for like 1 whole day with SVP + Optical Flow, I forgot which configuration I used. But the colours were not washed out, and everything looked fine, except for the flashing (dolby vision flashing was always there).

I think as mentioned above in the github, the flashing probably happens because in the middle-generated frame the brightness/colour data is lost compared to the real frames and it causes a flash.

As for flashing outside Dolby Vision, I fixed all of that by disabling VRR from the LG Game Optimiser Menu (turn off GSync and Freesync), as they both cause flashing in low brightness (dark) scenarios. This has been a problem for years with OLED TV's and VRR.

9 (edited by dawkinscm 05-04-2023 14:03:59)

Re: Optical Flow 5 Settings

Blackfyre wrote:
dlr5668 wrote:

New dev rife build will also reduce lag on rewind to zero

Nice, can't wait for an update. It feels like I'm watching content in a completely new way now with RIFE.

Doubt we'll see it, but if performance improves to allow me to push 3x the framerate with my RTX 3090 that would be amazing.

Still don't know why Dolby Vision flickers with SVP on, and with RIFE the colours also wash out and blacks become dark grey, here is my current configuration:

vo=gpu-next

fbo-format=rgba16hf

gpu-api=vulkan
gpu-context=winvk

hwdec=nvdec

FBO doesn't work with gpu-next according to the gpu-next errata. It looks like you are using Windows and if so then there's no need for Vulkan and no need to set context either.

SVP says you are supposed to use a copy-back decoder but I've tried a non copy-back decoder and I'm not sure it's necessary now. But I leave it in because it is not affecting performance. Hopefully one of the devs like Chainik can clarify.

10 (edited by Blackfyre 05-04-2023 18:37:56)

Re: Optical Flow 5 Settings

dawkinscm wrote:

FBO doesn't work with gpu-next according to the gpu-next errata. It looks like you are using Windows and if so then there's no need for Vulkan and no need to set context either.

SVP says you are supposed to use a copy-back decoder but I've tried a non copy-back decoder and I'm not sure it's necessary now. But I leave it in because it is not affecting performance. Hopefully one of the devs like Chainik can clarify.

Thanks, I didn't have any stability issues or performance issues. But I switched to DX11 and cleaned up my configuration. No difference in performance or stability. Still running exactly the same. Dolby Vision washed out colours are still present (only with SVP enabled), Dolby Vision works fine without SVP.

Any other recommendations to this:

ontop
volume=100
volume-max=100
fullscreen=yes

vo=gpu-next
gpu-api=d3d11
profile=gpu-hq
dolbyvision=yes
hwdec=nvdec-copy
gpu-context=d3d11
drm-vrr-enabled=no

video-sync=audio
dither-depth=auto
spirv-compiler=auto
linear-downscaling=no

tone-mapping=mobius
hdr-compute-peak=yes
tone-mapping-mode=luma
tone-mapping-max-boost=4
tone-mapping-param=mobius

sigmoid-upscaling=yes
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp

osd-level=1
osd-bar-w=25
osd-color=0.5
osd-bar-align-x=0
osd-bar-align-y=-1

sub-pos=100
sub-color=0.5
sub-margin-y=3
sub-font-size=37
sub-align-x=center
sub-align-y=bottom
sub-ass-shaper=complex
sub-scale-by-window=yes

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\KrigBilateral.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\SSimDownscaler.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\FSRCNNX_x2_8-0-4-1.glsl"

11 (edited by Blackfyre 05-04-2023 23:12:54)

Re: Optical Flow 5 Settings

Cleaned further (removed redundant settings for gpu-next), changed tone-mapping options to auto for better accuracy, removed all ewa_lanczossharp and changed them with ewa_lanczos as gpu-next makes the former useless and waste more energy for no reason.

Below configuration now runs better (performance improved compared to previous configurations):

ontop
volume=100
volume-max=100
fullscreen=yes

vo=gpu-next
gpu-api=d3d11
hwdec=nvdec-copy
gpu-context=d3d11
drm-vrr-enabled=no

dither=no
dither-depth=no
video-sync=audio
spirv-compiler=auto

dolbyvision=yes
tone-mapping=auto
hdr-compute-peak=yes
target-colorspace-hint
tone-mapping-mode=auto
tone-mapping-param=auto

scale=ewa_lanczos
cscale=ewa_lanczos
dscale=ewa_lanczos
tscale=ewa_lanczos

osd-level=1
osd-bar-w=25
osd-color=0.5
osd-bar-align-x=0
osd-bar-align-y=-1

sub-pos=100
sub-color=0.5
sub-margin-y=3
sub-font-size=37
sub-align-x=center
sub-align-y=bottom
sub-ass-shaper=complex
sub-scale-by-window=yes

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\KrigBilateral.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\SSimDownscaler.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\FSRCNNX_x2_8-0-4-1.glsl"

12 (edited by dawkinscm 06-04-2023 04:22:03)

Re: Optical Flow 5 Settings

Blackfyre wrote:

Cleaned further (removed redundant settings for gpu-next), changed tone-mapping options to auto for better accuracy, removed all ewa_lanczossharp and changed them with ewa_lanczos as gpu-next makes the former useless and waste more energy for no reason.

Below configuration now runs better (performance improved compared to previous configurations):

In gpu-next, lanczos is basially the same as lanczossharp in GPU.