1x_BleedOut_Compact_300k_net_g.onnx is placed in folder next to mlrt_ncnn.dll. Not sure if it's not like the placing or the file itself.
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\ffms\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi", fpsnum=30000, fpsden=1001, threads=1, colorspace="YUV420P8") ConvertBits(32) ConvertToPlanarRGB() LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\mlrt_ncnn.dll") mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") # assuming 8bit 4:2:0 output ConvertBits(8) ConverttoYv12()
[Attachment 81984 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 31 to 60 of 142
Thread
-
-
Have you tried using an absolute path?
Or create a 'models' folder next to the dll and put the model in it?users currently on my ignore list: deadrats, Stears555 -
If you specify a path that is not in the same location as the plugin , use builtin=False
Code:- builtin\ Whether the models are in the same location with the plugin.\ Default: True.
-
It's loading with 'models' folder next to the dll BIG thanks, Selur!
Now will try it out.
And one more question about this "model" thing - is there any parameters can be adjusted, or it only works as is? -
You cannot change the output of a specific model directly. You can only change the model (or train a different one)
Indirectly, you can composite versions (eg. overlay with opacity %, perhaps with original, or different versions) , and or use pre/post filtering to modulate the outcome -
Also be aware that most of these models are spatial only filters (no temporal influence), so depending on input and the model used you can get temporal instabilities.
users currently on my ignore list: deadrats, Stears555 -
Did someone run in this behaviour of MeGui(x64) - that it don't show in the preview window actual colors from the script? In MeGui(x32) I was able to see picture that correspond to the output file, but in MeGui(x64) preview and output don't match anymore
[Attachment 81989 - Click to enlarge]
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.2, startHue=325, endHue=15) # "blue" pixels (boost up) ConvertBits(8) ConvertToYV12()
In AviSynth2.5.8(x32) I runned script like this:
Code:LoadPlugin("M:\edit\MeGUI-2944-32\tools\ffms\ffms2.dll") FFVideoSource("M:\edit\SAMPLE\video\05-5D[JP]+.avi") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.2, startHue=325, endHue=15) # "blue" pixels (boost up)
But with MeGUI-6666.2308_x64 and AviSynthPlus 20230715 3.7.3 if I run internal FFMS2 from AVS script creator, then I getting this in the script:
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\ffms\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi", fpsnum=30000, fpsden=1001, threads=1, colorspace="YUV420P8")
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi")
[Attachment 81990 - Click to enlarge]
But niether way preview don't match end result. -
The difference between the two images is a matter of luma levels: full vs. limited. Check to see if the videos have the levels flagged. Check to see if the encoders are flagging the levels. And whether the players/editors are following the levels flag.
-
It seems like nowhere, not in the video, not in the encoder or player is not set(or forced) levels flag.
--------------
But anyway I was able to make some test with BleedOut_Compact_300k and MergeChroma/aWarpSharp2.
MergeChroma/aWarpSharp2 - works fast and result looks good.
Code:AddAutoloadDir("M:\edit\MeGUI-2944-32\tools\avs\plugins") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.2, startHue=325, endHue=15) # "blue" pixels (boost up) ConvertToYV12() FFT3DFilter(sigma=0.3, plane=0, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.6, interlaced=true) # Y - noise reduction+sharp FFT3DFilter(sigma=0.7, plane=3, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.9, interlaced=true) #UV - noise reduction+sharp SeparateFields() MergeChroma(last, Spline36Resize(width/2, height).aWarpSharp2(depth=30).nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=width, fheight=height)) Weave()
[Attachment 82043 - Click to enlarge]
[Attachment 82044 - Click to enlarge]
[Attachment 82045 - Click to enlarge]
BleedOut_Compact_300k - works slow (like 3 times slower), but result looks better. Although the picture has some tint (bluish?) on it (especially noticeable in the end titles).
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi") LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\fft3dfilter.dll") FFT3DFilter(sigma=0.3, plane=0, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.6, interlaced=true) # Y - noise reduction+sharp FFT3DFilter(sigma=0.7, plane=3, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.9, interlaced=true) #UV - noise reduction+sharp ConvertBits(32) ConvertToPlanarRGB() LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\mlrt_ncnn.dll") mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") ConvertBits(8) # assuming 8bit 4:2:0 output ConverttoYv12() # assuming 8bit 4:2:0 output ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.1, startHue=325, endHue=15) # "blue" pixels (boost up)
[Attachment 82047 - Click to enlarge]
[Attachment 82046 - Click to enlarge]
[Attachment 82048 - Click to enlarge]
There is still some ghosts left. But fighting with them - guess I will lose more picture details than gain.
----------------------
And more to the colors -> Is it typical that Histogram looks like this after YUV->RGB->YUV conversion? Don't I lose too much information?
YUV (after MergeChroma/aWarpSharp2 script)
[Attachment 82050 - Click to enlarge]
YUV->RGB->YUV (after BleedOut_Compact_300k script)
[Attachment 82051 - Click to enlarge]Last edited by cinephil; 8th Sep 2024 at 13:06.
-
It's quite common for some models to sometimes shift the colors slightly. You can make small adjustment
And more to the colors -> Is it typical that Histogram looks like this after YUV->RGB->YUV conversion? Don't I lose too much information?
Banding in histogram (y waveform) is from manipulation of levels in 8bit . The 1st mergechroma script has banding too after only coloryuv/tweak are used and there are breaks in the histogram. The difference is because FFT3DFilter is applied afterwards and smooths the result (if you comment out the FFT3DFilter(s) , you will see similar banding result in the waveform in the mergechroma script)
What some some people do are color correct/manipulate a higher bit depths , dither on the down conversion
Also, I would IVTC beforehand for progressive filters like avs-mlrt. You can re-interlace later if you need to . The quality difference might be minimal on this type of lower quality source but there would be significant differences visible on higher quality sources. Similarly, the YUV/RGB conversions are mixed up between progressive and interlaced. e.g. ConvertToYV12 should be interlaced=true , if interlaced. Same with RGB conversions with interlaced=true vs. false. Or else you will be prone to chroma artifact errors, including chroma ghosting, notching artifacts (less visible on low quality sources) -
e.g.
No IVTC , progressive RGB conversion + Bleedout, (IVTC after for display screenshot). Notice the chroma notched ghosting artifacts on the dropped cup. Basically anything with motion will have these type of issues because the chroma is treated as progressive, when it's actually still in organized in fields (interlaced)
[Attachment 82053 - Click to enlarge]
IVTC + Bleedout
[Attachment 82054 - Click to enlarge] -
I kinda suck with colors... I manage the picture look somewhat good with ColorYUV/Tweak. But how to get rid of that tint and don't ruin everything that was in good balance?
I see...
The problem is - if I make ColorYUV/Tweak before convert to RGB, then the result looks like as if I didn't do it at all.
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi") LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\fft3dfilter.dll") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.1, startHue=325, endHue=15) # "blue" pixels (boost up) ConvertBits(32) ConvertToPlanarRGB(interlaced=true) SeparateFields() LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\mlrt_ncnn.dll") mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") Weave() ConvertBits(8) # assuming 8bit 4:2:0 output ConverttoYv12(interlaced=true) # assuming 8bit 4:2:0 output FFT3DFilter(sigma=0.3, plane=0, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.6, interlaced=true) # Y - noise reduction+sharp FFT3DFilter(sigma=0.7, plane=3, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.9, interlaced=true) #UV - noise reduction+sharp
[Attachment 82086 - Click to enlarge]
I didn't pay attention to it. Thanks!
Video had some parts with true 29.97fps (without 3:2 pull down). In this example - the first part (with computer generated images) without pull down, and the second part is with pull down. Don't know if I managed to save it correctly with all this conversions and SeparateFields/Weave process.
[Attachment 82087 - Click to enlarge]
[Attachment 82088 - Click to enlarge] -
"Good balance" is debatable, even among colorists. Often scenes are graded a certain way, purposely "unbalanced" - and there is a lot of subjectivity...
The problem is if you were happy with the color of main content with the current filters - if you shift something one way, the other scenes will also be affected (eg. if it was only the text/credits) . You can divide up the scenes and apply different filters if you need to . Some would question why are using that model for black and white titles in the first place? Divide it up and use appropriate filters. e.g. Greyscale() . You don't need all those filters or slow processing - and rainbows are perfectly taken care of
Personally I would do the color work in resolve - you have far more control. But for a not too close approximation for some of the other scenes in avs, try smoothtweak(hue1=-1)
The problem is - if I make ColorYUV/Tweak before convert to RGB, then the result looks like as if I didn't do it at all.
Again, any time you adjust levels in 8bit, you're prone to banding and waveform breaks . The only reason the other mergechroma script looks "clean" on the waveform is the denoising. For the mlrt script, you can move the filters after mlrt_ncnn , FFT3DFilter too , but it will probably be too blurry - you'd probably have to adjust the settings . Another option is to add noise /grain to cover up the gaps (probably not what you want to do)
The reason people make color adjustments at higher bit depth isn't just because of higher precision and more accuracy - the down conversion and dithering "fills" the gaps in the waveform
Video had some parts with true 29.97fps (without 3:2 pull down). In this example - the first part (with computer generated images) without pull down, and the second part is with pull down. Don't know if I managed to save it correctly with all this conversions and SeparateFields/Weave process.
FFT3DFilter with your settings has a default of bt=3 - so it's using temporal mode 1 before, 1 current, 1 after
The problem with separatefields processing is you get contamination of even and odd fields. Even/odd scanlines are vertically displaced and not spatially aligned - so you will get less ideal results (probably less important with low quality blurry sources, but definitely worse results on higher quality content)
If you use separatefields with grouped even vs. group odd fields processing, you don't get consecutive temporal filtering - this can cause a type of flicker because you don't get filtering between even and odd scanlines
Also with "23.976p" content telecined to 59.94 fields/sec , there are repeated fields. Temporal filters are less effective with repeats
For mlrt - you will get better results on a full progressive frame, than a half frame (field) using separatefields, because you're giving the model only half the data. For this type of model operation like color bleeding, the full picture as input is better - it's easy to test this and demonstrate. This is why you should IVTC the film content.
You can divide up the script into segments to use different filters . You can re-interlace or add back hard pulldown to those sections you IVTCed later if you need to, or keep it VFR with timecodes
Some of the aformentioned problems not not be that visible on low quality sources (some of them will be , such as the interlaced vs. progressive chroma errors, and this type of model processing with fields instead of full progressive frames), you decide what tradeoffs you want to make -
I trying to make some adjustments using SmoothAdjust instead of ColorYUV/Tweak, and when adding brigthness parameter - MeGUI crashes when loading the script. But the script loaded just fine with gamma and contrast parameters.
Does anyone know what is the problem here?
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+X.avi") LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\fft3dfilter.dll") FFT3DFilter(sigma=0.3, plane=0, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.6, interlaced=true) FFT3DFilter(sigma=0.7, plane=3, bw=16, bh=16, ow=8, oh=8, ncpu=4, sharpen=0.9, interlaced=true) ConvertBits(32) ConvertToPlanarRGB(matrix="PC.709", interlaced=true) SeparateFields() LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\mlrt_ncnn.dll") mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") Weave() ConvertBits(8) ConverttoYv12(matrix="PC.709", interlaced=true) LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\SmoothAdjust.dll") SmoothLevels(gamma=0.6) Smoothtweak(contrast=1.8) Smoothtweak(brigthness=-5)
-
-
Indeed! But that way it was in the wiki and readme -
Code:SmoothTweak - General Settings brigthness [default: 0] ----------------------- -255...0 = decrease the brigthness 0...+255 = increase the brigthness
For some reason MeGUI-6666.2308_x64 usually don't do error messages, it just crashed (at least in my Win10x64). -
RgTools should replace all RemoveGrain versions . "or up" means "or newer"
https://github.com/pinterf/RgTools/releases
Note that the original LSFMod only supported YV12 (8bit 4:2:0) . There are updated LSFMod versions that support other pixel formats, higher bit depths, such as this one from realfinder
https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/LSFmod.avsi
or Dogway' s LSFPlus
https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/LSFplus.avsi
LSFMod or any derivative should be used on progressive input. -
OK. Maybe my problem with the LSFmod (v2.193) itself. When I try to load it - MeGUI-6666.2308_x64 crashes. I have RgTools-v1.2.7(x64) and masktools2_v2.2.30 (x64).
Code:LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]-01.avi") ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.2, startHue=325, endHue=15) # "blue" pixels (boost up) ConvertBits(32) ConvertToPlanarRGB(matrix="Rec709", interlaced=true) SeparateFields() LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\RgTools.dll") LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\masktools2.dll") LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\LSFmod.avsi") #LSFmod(defaults="slow", ss_x=1, ss_y=1) #LoadPlugin("M:\edit\MeGUI-6666.2308_x64\tools\avs\plugins64\mlrt_ncnn.dll") #mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") Weave() ConvertBits(8) ConverttoYv12(matrix="Rec709", interlaced=true)
-
Not sure if I done it correctly, but here is how it looks in vdub2 x64 (without any error messages):
[Attachment 82226 - Click to enlarge] -
Do not use LoadPlugin for .avsi files ; LoadPlugin is only for .dll files
For LSFmod.avsi, it should autoload if placed in the plugins directory, or use Import() for .avs (or .avsi files) -
-
make sure you save the script with the changes ( comment out line 15, save it with a new name) then re-open the resaved script
-
Open LSFMod.avsi in notepad / or a text editor - does it look like a script or HTML web page ? ie. did you save it correctly or download a webpage ? This is a common mistake when downloading scripts from github
-
This MeGUI-6666.2308_x64 is too glitchy
I tried older version and it gives me more info:
Code:LoadPlugin("M:\edit\MeGUI.x64-6666.1405\tools\avs\plugins64\ffms2.dll") FFVideoSource("E:\VR.5\SAMPLE\video\05-5D[JP]+.avi") #FFVideoSource("E:\VR.5\SAMPLE\video\video-film.avi") #FFVideoSource("E:\VR.5\SAMPLE\video\03-Sisters[JP].avi") #crop(6, 0, -8, 0) ColorYUV(gamma_y=-35, cont_y=48, gain_y=-10, off_y=0) #adjust gamma and contrast Tweak(bright=16, coring=false) #adjust brightness Tweak(Sat=1.2, startHue=80, endHue=135) # "red" pixels (boost up) Tweak(Sat=1.2, startHue=325, endHue=15) # "blue" pixels (boost up) ConvertBits(32) ConvertToPlanarRGB(matrix="Rec709", interlaced=true) SeparateFields() LoadPlugin("M:\edit\MeGUI.x64-6666.1405\tools\avs\plugins64\RgTools.dll") LoadPlugin("M:\edit\MeGUI.x64-6666.1405\tools\avs\plugins64\masktools2.dll") Import("M:\edit\MeGUI.x64-6666.1405\tools\avs\plugins64\LSFmod.avsi") LSFmod(defaults="slow", ss_x=1, ss_y=1) #LoadPlugin("M:\edit\MeGUI.x64-6666.1405\tools\avs\plugins64\mlrt_ncnn.dll") #mlrt_ncnn(network_path="1x_BleedOut_Compact_300k_net_g.onnx") Weave() ConvertBits(8) ConverttoYv12(matrix="Rec709", interlaced=true)
[Attachment 82228 - Click to enlarge]
I guess it looks like script:
[Attachment 82229 - Click to enlarge] -
Do you have avs+ installed, or is it a "portable" version with megui ? That might be why vdub2 doesn't work for you
For AvsPlusVersionNumber, download Zs_RF_Shared
https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi
Similar Threads
-
AVISynth AddBorders chroma issue?
By killerteengohan in forum RestorationReplies: 8Last Post: 6th Apr 2024, 06:25 -
Strategies for movement shift
By Bencuri in forum EditingReplies: 4Last Post: 9th Aug 2023, 11:40 -
Chroma Shift creates artefacts
By phelissimo_ in forum RestorationReplies: 0Last Post: 19th Sep 2021, 07:49 -
How to properly fix this chroma abberation issue?
By elektro in forum Newbie / General discussionsReplies: 4Last Post: 10th Aug 2021, 15:39 -
Shift Filter for VirtualDub?
By anachronon in forum EditingReplies: 2Last Post: 17th Mar 2021, 18:14