Log in

View Full Version : MP_pipeline - Help with filters


thescrapyard
27th September 2020, 10:47
I use AVStoDVD, that supports ONLY 32-bit AviSynth/AviSynth+. This isn't a big problem, but I want to try 64-bit filters as some are only available for 64-bit to see if I can squeeze a bit more speed out of some encodes that are slow when denoising. Still not an issue as quality is better than time, but will speed my process up when left running overnight and doing a batch run

MP_pipeline supports 32bit/64bit filters in one script, but can't get my head around how to put it into the avisynth scripts and split them up to switch from 32bit to 64bit and back again

A simple example might be for The Girl-Getters with Oliver Reed and B&W grain with noise and too dark for me


convertToYV12()
greyscale()
lremovedust_yv12()
removedirtmc(125,false)
BlackmanResize(720,480)
autoadjust(auto_gain=true,auto_balance=true,dark_limit=1.2,bright_limit=1.25,gain_mode=0)
lsfmod(strength=125)


This cleans it up and brightens it up quite a bit for my eyes without overkill but runs about 5 FPS. Things needs tweaking, I know, but its a start

6 hours for full encode on AMD FX8350 16GB DDR3 at stock as the motherboard is not ideal for overclocking with just 4 power MOSFETs. I have an Intel i7 4790k from a previous build where the motherboard went faulty but need to get another motherboard and 32GB of DDR3 to set that one up. CPU is OK as I used it in an arcade bartop build until I found an i5 I forgot I had that now runs the bartop arcade with GTX1050ti with no issues


I'm asking to try out MP-Pipeline on some filters and aware that not all are 64-bit but its a start, to point me in the right direction to tweak filters and push the FPS up, even if slightly. This method can then be applied to other projects that are even slower

gispos
28th September 2020, 21:31
MP_pipeline supports 32bit/64bit filters in one script, but can't get my head around how to put it into the avisynth scripts and split them up to switch from 32bit to 64bit and back again

a small example

MP_Pipeline("""
### inherit start ###
SourceFile = String(ScriptDir()) + "test.mkv"
SourceFile = Exist(SourceFile) ? SourceFile : "G:\Media\test.mkv"
### inherit end ###

LWLibavVideoSource(SourceFile, cache=False)
# ### prefetch: 32, 16 # must disabled with script prefetch below
### ###
### platform: Win32
HDRAGC(coef_gain=1.0, max_gain=3.0,min_gain=1.0,coef_sat=1.0,max_sat=9.0,min_sat=0.0,avg_lum=128,avg_window=24,corrector=1.0,
\reducer=0.0,response=100,protect=2,mode=2,passes=4,black_clip=0.0,shift=0,shift_u=0,shift_v=0,freezer=-1,shadows=true,debug=0)

### platform: Win64
# put 64bit plugins here

### ###
audio=LWLibavAudioSource(SourceFile, cache=False)
audioDub(last, audio)
return last
""")

sharpen(0.4)
prefetch(4) # prefetch with mp_pipeline works for me, but mp_pipeline prefetch must be disabled


Edit:
Since my plugins are all loaded automatically via a script, I forgot to include a 'LoadPlugin'
So you have to add the call in the win32 process before HDRAGC

thescrapyard
6th October 2020, 19:04
Thanks

I'll give it a go once I get a bit more time and not working