Topic: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

AviSynth Filter - a modern ffdshow replacement with support for 10-bit/HDR
sources

Benefits:
- no ffdshow big_smile
- uses modern Avisynth interface -> works correctly with newer Avisynt 3.6+
- supports 10-bit color depth
- supports HDR pass-through (LAV -> madVR)
- won't hang after fast seeking (hopefully big_smile)

Here's a public beta-test!

0. Update SVP!
1. Unpack .zip into SVP 4 installation folder
2. Run SVP 4\avsf\register.bat as admin
3. Go to your video player, remove (or uncheck only) 'ffdshow raw filter' from the external filters, add 'AviSynth Filter', check 'Prefer'.
4. Switch to madVR for maximum compatibility.

10-bit playback is best working with madVR. Other video renderers may not support 10-bit at all, or switching between 8- and 10-bits, etc.
See Application settings -> Additional options -> Allow output in 10-bit color depth. When set to 'Never' - converts everything into 8-bit.

HDR: best working with madVR, however you may also want to try MPC-BE with any other renderer.

>>>> Please leave your comments here! <<<<

Changelog:

since 30/09/2020: update via SVP's updater (SVP 4.5.200+)

Latest build: 0.8.1

06/11/2020: ver. 0.8.1 (?)
- fixed various hangs and crashes (e.g. when starting playback or when changing audio tracks)

29/09/2020: download
- fixed "only a single prefetcher" error with Avisynth 3.5

28/09/2020: download
- fixed 10-bit not working in mpv
- fixed OSD colors in 10-bit mode

22/09/2020: download
- fixed video player hanging in some cases, especially on close
- should now work with Avisynth+ 3.5 provided by SVP install
- fixed AVS script in 10-bit mode

15/09/2020: download
- first public release

2 (edited by Blackfyre 16-09-2020 15:40:36)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

I watch a lot of 4K HDR content.

For those of us on MPV using Vulkan, I believe we use vapoursynth and not AviSynth, is there any benefit to using this? Or does this only apply for those still using madVR?

MPV Settings:

ontop
priority=high

angle-flip=no

cache=yes
demuxer-seekable-cache=yes

ao=wasapi
audio-exclusive=no
audio-samplerate=48000
audio-format=s32
ad-lavc-downmix=yes
audio-channels=stereo

video-sync=display-resample
vulkan-swap-mode=fifo

osd-level=1

video-latency-hacks=no
demuxer-thread=yes

vo=gpu
profile=gpu-hq
fbo-format=rgba16hf
gpu-api=vulkan
gpu-context=winvk
hwdec=nvdec
spirv-compiler=shaderc

vd-lavc-dr=yes
vulkan-async-transfer
vulkan-async-compute

volume-max=100

tone-mapping=hable
tone-mapping-max-boost=1.0
hdr-compute-peak=yes

dither-depth=N
dither=fruit
dither-size-fruit=2

scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes

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

sws-allow-zimg=no
zimg-fast=no

deband=yes
deband-iterations=4
deband-threshold=64
deband-range=16
deband-grain=48

ytdl-format=best

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\noise_static_chroma.hook"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\noise_static_luma.hook"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\antiring.hook"

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\KrigBilateral.glsl"

profile-desc=cond:get('height', 0) < 1440
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\FSRCNNX_x2_8-0-4-1.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\SSimDownscaler.glsl"
dither-size-fruit=6

3 (edited by Whispering_Bamboo 17-09-2020 21:53:30)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Installed Avisynth 3.6+ Downloaded the rar and registered avsf.

The Bad:
Without avsf 10bit ->  P010 10bit
With avsf 10bit -> NV12 8bit

The Good:
No Hangs, no crashes, runs smooth

Tested in MPCHC and Potplayer (Without Pot Native)
is there something i could try?

@Blackfyre: Only for People using MadVr (Projector calibration with 3dlut & lens control)

Edit:
Resolved, With GPU Accel on, 10bit works, with CPU only, not (8bit).

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

seems like "levels.full=false" doesn't work with 10bit

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

kevingwn
SVP 4\script\base.avs

Post's attachments

base.avs 1.22 kb, 582 downloads since 2020-09-19 

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Chainik wrote:

kevingwn
SVP 4\script\base.avs

that fixed the issue, thanks!

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

22/09/2020: download

- fixed video player hanging in some cases, especially on close
- should now work with Avisynth+ 3.5 provided by SVP install (previously only worked with Avisynth+ 3.6 installed)
- fixed AVS script in 10-bit mode

8 (edited by otic 22-09-2020 21:53:39)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Is this going to work with 32 bit MPC-HC?

Asking because I wanted to combined SVP Pro with Reclock to get perfect audio/video synchronization smile

I've tried to do it but got crash:

https://i.imgur.com/xrnEzEZ.jpg

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

> Is this going to work with 32 bit MPC-HC?

works on my rig...
when exactly do you have the crash? right after video opening or after SVP kicked-in or some time after?

---
ah, I see, it crashes with reclock enabled

If you open the AviSynth Filter properties, the "AviSynth script to load" field must be empty. Is it?

10 (edited by otic 24-09-2020 20:20:16)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Chainik wrote:

>
If you open the AviSynth Filter properties, the "AviSynth script to load" field must be empty. Is it?

yeah- it's empty, still crushing tho....any ideas?

Well, with 64 bit MPC-HC+madVR it's OK, ofcourse madVR stats are showing some reapted frames but I personally didn't noticed that smile

Oh! One more thing when do all files modification about adding 10 bit support with DirectShow, MPV player do not playback in 10 bit mode then (?!)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

> any ideas?

Nope. The "avisynth filter" author can't replicate the crash on his rig... and it actually ReClock who crashes, so .... dunno what we could do about it.

> One more thing when do all files modification about adding 10 bit support with DirectShow, MPV player do not playback in 10 bit mode then (?!)

are you sure? hmm mpv must work the same way it used to.

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

28/09/2020: download
UPDATE SVP FIRST VIA MAINTENANCE TOOL!!!
- fixed 10-bit not working in mpv
- fixed OSD colors in 10-bit mode

+++ also fixed +++
- partially not working profile conditions --> https://www.svp-team.com/forum/viewtopic.php?pid=76714
- audio only playback via mpv --> https://www.svp-team.com/forum/viewtopic.php?id=5888

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

after update i am getting this error when i seek.

https://imgur.com/5QQGzZY

any solution for this issue, thanks.
Player: potplayer.

thanks

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

xarunx
for now installing Avisynth+ 3.6 may help

15 (edited by otic 28-09-2020 20:46:11)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Chainik wrote:

Nope. The "avisynth filter" author can't replicate the crash on his rig... and it actually ReClock who crashes, so .... dunno what we could do about it.

> One more thing when do all files modification about adding 10 bit support with DirectShow, MPV player do not playback in 10 bit mode then (?!)

are you sure? hmm mpv must work the same way it used to.


Now, mpv does work in 10 bit mode, after update smile

... just want to add one thing about Reclock crushing- noticed that it does work with 1080p movies but crashing with with 4K HDR. Is this can be some hint fory you,maybe?

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

playing 4k in a 32-bit video player is not a very good idea by itself.... especially in 10-bit mode.
look at the memory consumption.

17 (edited by dunk1452 29-09-2020 10:50:48)

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Thanks for fixing the profile conditions from this post smile: https://www.svp-team.com/forum/viewtopic.php?id=5798

There seems to be another bug I've found, in the last stable release I was able to use expressions to define multiple conditions for the "Full file path' like this: \H:/Movies|H:/TV Shows|E:/Videos/Movies|E:/Videos/TV Shows\
In the last update on this beta (28/09/2020), using the expression above doesn't save to the profile, as in it disappears when u view another profile/exit program. Inputting a single file path seems to work just fine though like: H:/Movies

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

dunk1452

yep, thanks for noticing. quick fixes usually introduce more bugs big_smile

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

29/09/2020: download
- fixed "only a single prefetcher" error with Avisynth 3.5

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

30/09/2020: update to SVP 4.5.200 using normal update process

... since those "conditions" nasty bug pushed a release anyway

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Before the update, I was using PotPlayer + madVR with potplayer.native = true and potplayer.prefer_avisynth = true. Do I need to change any of those settings to make use of the new avisynth filter?

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

> Do I need to change any of those settings to make use of the new avisynth filter?

think about it as a drop-in replacement for the ffdshow

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Blackfyre wrote:

I watch a lot of 4K HDR content.

For those of us on MPV using Vulkan, I believe we use vapoursynth and not AviSynth, is there any benefit to using this? Or does this only apply for those still using madVR?

MPV Settings:

ontop
priority=high

angle-flip=no

cache=yes
demuxer-seekable-cache=yes

ao=wasapi
audio-exclusive=no
audio-samplerate=48000
audio-format=s32
ad-lavc-downmix=yes
audio-channels=stereo

video-sync=display-resample
vulkan-swap-mode=fifo

osd-level=1

video-latency-hacks=no
demuxer-thread=yes

vo=gpu
profile=gpu-hq
fbo-format=rgba16hf
gpu-api=vulkan
gpu-context=winvk
hwdec=nvdec
spirv-compiler=shaderc

vd-lavc-dr=yes
vulkan-async-transfer
vulkan-async-compute

volume-max=100

tone-mapping=hable
tone-mapping-max-boost=1.0
hdr-compute-peak=yes

dither-depth=N
dither=fruit
dither-size-fruit=2

scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes

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

sws-allow-zimg=no
zimg-fast=no

deband=yes
deband-iterations=4
deband-threshold=64
deband-range=16
deband-grain=48

ytdl-format=best

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\noise_static_chroma.hook"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\noise_static_luma.hook"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\antiring.hook"

glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\KrigBilateral.glsl"

profile-desc=cond:get('height', 0) < 1440
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\FSRCNNX_x2_8-0-4-1.glsl"
glsl-shader="C:\Users\musta\AppData\Roaming\mpv\Shaders\SSimDownscaler.glsl"
dither-size-fruit=6

Hi SVP!

Can we get an answer on this? I'm in the same boat and would like to know smile

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

Its sad that paying customers cant get a simple yes or no on a question sad

Re: PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow

please be patient. Chainik is absent in other treads too, so i think he has day off or out of town Let him rest )))