Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th August 2021, 04:56   #241  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
Example: your script
Code:
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=ffms("...")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)
After you put all plugins/scripts in one autoload folder, you only use this script and it will work
Code:
ffms("...")
SMDegrain(tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)
That is what i do with megui
Hmmm,

Not sure that will work for RipBot...

So, I sort of understand the avs to avsi thing, but how to the dll's "auto load" ??

And what if I don't use FFMS ??

RipBot uses L-Smash as it's default decoder, if I'm understanding the ffms reference.
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 06:58   #242  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
SMDegrain3.2.5d & BM3D question

Hello again, Dogway,

With the success I've had (see post #236, if you haven't already), I need a little bit more help with the following :-

And does it matter what order they are called ??

Quote:
#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
This BM3D script works (it's slow), but if I change it to BM3DCPU_AVS.dll, it has a error at Line 159 of SMDegrain. (inputP)

I have an AVX2 CPU...5950X

And now the only pre-filter I'm having a problem with is #3 (prefilter=3)

0, 1, 2, 4 (with KNL in there), & 5 (@ CUDA).

What is missing for #3 ??

Quote:
pref = !GlobalR ? preclip ? prefilter : \
(prefilter==-1) ? inputP : \
(prefilter== 0) ? inputP.ex_MinBlur(0,Chr,fulls=fs) : \
(prefilter== 1) ? inputP.ex_MinBlur(1,Chr,fulls=fs) : \
(prefilter== 2) ? inputP.ex_MinBlur(2,Chr,fulls=fs) : \
(prefilter== 3) ? ex_merge(dfttest(inputP,sstring="0.0:4.0 0.2:9.0 1.0:15.0",tbsize=1,U=chroma,V=chroma,dither=1,threads=1),inputP, \
inputP.ex_lut(Format("x ymin < range_max x {Lthres} > 0 range_max x ymin - range_max {Lthres} ymin - / * - ? ?"),UV=1,fulls=fs), luma=chroma, UV=chr, fulls=fs) : \

(prefilter== 4) ? inputP.ex_KNLMeansCL(device_type="GPU", device_id=device_id, chroma=chroma, a=1,d=1,h=7.0) : \
(prefilter== 5) ? inputP.ex_BM3D(sigma=5,radius=1,UV=Chr) : \
Assert(false, "prefilter must be between -1~5: "+string(prefilter)) : \
inputP
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 07:16   #243  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
SMDegrain only use BM3D_CUDA
https://github.com/Dogway/Avisynth-S...2.5d.avsi#L619

If you want use BM3D_CPU just change line above from BM3D_CUDA(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch, fast=true, extractor_exp=6) to BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)

If you want more speed of BM3D try use prefetch(). More details:
https://forum.doom9.org/showthread.p...20#post1948420
http://avisynth.nl/index.php/SetFilterMTMode

Example:
Code:
#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps
Edit: for prefilter=3 you forgot LoadPlugin(".../DFTTest.dll")

Last edited by kedautinh12; 27th August 2021 at 07:20.
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 07:37   #244  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
SMDegrain only use BM3D_CUDA
https://github.com/Dogway/Avisynth-S...2.5d.avsi#L619

If you want use BM3D_CPU just change line above from BM3D_CUDA(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch, fast=true, extractor_exp=6) to BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)

If you want more speed of BM3D try use prefetch(). More details:
https://forum.doom9.org/showthread.p...20#post1948420
http://avisynth.nl/index.php/SetFilterMTMode

Example:
Code:
#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps
Edit: for prefilter=3 you forgot LoadPlugin(".../DFTTest.dll")
You're a very informative person

Yes, I have that version of Dogway's SMDegrain.

I will add DFTTest, thanks.

dfttest didn't work for pre filter 3, still line 159 error , but it needs these installed http://avisynth.nl/index.php/Dfttest..... http://www.fftw.org/install/windows.html

And I think the MT function is handled differently in RipBot scripts.

Have you ever tried RipBot ???

I had a look at MeGUI, seems very basic, and not that up to date (inside)
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)

Last edited by Pauly Dunne; 27th August 2021 at 07:50.
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 07:45   #245  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Are you try that scripts and check the speed??
Code:
#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps

Last edited by kedautinh12; 27th August 2021 at 07:48.
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 07:46   #246  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
@Pauly Dunne: Can you try this version. I fixed some UHDhalf and interlacing logic. Maybe your clip was different than what I tested on.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 27th August 2021, 07:57   #247  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Download here for new ver fftw 3.3.8
https://forum.doom9.org/showthread.php?t=174470

Benchmark between of fftw3 compilers
https://forum.doom9.org/showthread.p...15#post1911115

For ICL & GCC you need Intel C++ too
https://software.intel.com/content/w...y-version.html

Edit: after downloaded, you can put fftw3.dll or libfftw3f-3.dll in Windows/system32 (for x64 ver) and Windows/sysWOW64 (for x86 ver)

Last edited by kedautinh12; 27th August 2021 at 08:05.
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 08:15   #248  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
Download here for new ver fftw 3.3.8
https://forum.doom9.org/showthread.php?t=174470

Benchmark between of fftw3 compilers
https://forum.doom9.org/showthread.p...15#post1911115

For ICL & GCC you need Intel C++ too
https://software.intel.com/content/w...y-version.html

Edit: after downloaded, you can put fftw3.dll or libfftw3f-3.dll in Windows/system32 (for x64 ver) and Windows/sysWOW64 (for x86 ver)
Yes, I do have them, and I got it to work, so I will check version numbers, thanks
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 08:17   #249  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by Dogway View Post
@Pauly Dunne: Can you try this version. I fixed some UHDhalf and interlacing logic. Maybe your clip was different than what I tested on.
I'm now getting a Line 160 error, when I change BM3D, CUDA to CPU, when using prefilter=5.

But 3.2.6d works on the other scripts / filters.
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 08:20   #250  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Megui tools up to date if you change sever to development
https://forum.doom9.org/showthread.p...68#post1946568
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 08:23   #251  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
Megui tools up to date if you change sever to development
https://forum.doom9.org/showthread.p...68#post1946568
Fair enough, but I don't think I need to learn how to use another app.

But have you had any experience with RipBot ??
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 08:24   #252  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Quote:
Originally Posted by Pauly Dunne View Post
I'm now getting a Line 160 error, when I change BM3D, CUDA to CPU, when using prefilter=5.

But 3.2.6d works on the other scripts / filters.
You changed command in this line or just change LoadPlugin??
https://github.com/Dogway/Avisynth-S...2.6d.avsi#L617
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 08:27   #253  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Quote:
Originally Posted by Pauly Dunne View Post
Fair enough, but I don't think I need to learn how to use another app.

But have you had any experience with RipBot ??
No, i'm just experience with use scripts in avs+ and i think 2 app (ripbot & megui) work same scripts structure with avs+
kedautinh12 is offline   Reply With Quote
Old 27th August 2021, 08:39   #254  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
You changed command in this line or just change LoadPlugin??
https://github.com/Dogway/Avisynth-S...2.6d.avsi#L617
I just changed the whole thing !!!
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 27th August 2021, 08:42   #255  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post
No, i'm just experience with use scripts in avs+ and i think 2 app (ripbot & megui) work same scripts structure with avs+
Well, I only use RipBot, and I have only just recently started to figure out how scripts work...a LOT of trial & error, and help from guy's like you, & Dogway, etc.

The main reason I started was RipBot wasn't getting any regular updates, like it use to get, not sure why, maybe the dev "Atak" has lost interest.

It's rather out of date, now ...still works well, especially the Distributed Encoding function.

Cheers
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)

Last edited by Pauly Dunne; 27th August 2021 at 08:45.
Pauly Dunne is offline   Reply With Quote
Old 28th August 2021, 02:00   #256  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 693
Quote:
Originally Posted by kedautinh12 View Post

If you want use BM3D_CPU just change line above from BM3D_CUDA(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch, fast=true, extractor_exp=6) to BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)
Hi, I read somewhere that if you want to use the BM3D_CPU option, you don't need BM3D_VAggregate, is that correct ??? (haven't had a chance to test it for myself)
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 28th August 2021, 02:41   #257  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Quote:
Originally Posted by Pauly Dunne View Post
Hi, I read somewhere that if you want to use the BM3D_CPU option, you don't need BM3D_VAggregate, is that correct ??? (haven't had a chance to test it for myself)
No, bm3d.VAggregate should be called after temporal filtering
https://github.com/WolframRhodium/Va...BM3DCUDA#notes
kedautinh12 is offline   Reply With Quote
Old 28th August 2021, 22:32   #258  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Very good news, advancements in ex_luts(), finally managed to port "*.mp4 guy" DeStripe() filter, I post the benchmarks.
Normally with plain pixel fetching Prefetch(4) (cores in my case) is faster, when expressions are involved I get more speed with Prefetch(6)

Code:
# P(4) 29 P(6) 36.5 (8-bit)
# P(4) 244 P(6) 271 (8-bit)
# P(4) 179 P(6) 184 (16-bit)
Original DeStripe() in 16-bits doesn't even start at all. With this I finally can port more filters that make use of ex_luts() like some other sharpeners. Will upload ExTools on Monday most likely. Just sharing the excitement : P


By the way, is there any way to retrieve Cores/Threads so I can automatically set correct Prefetch() for some functions/modes?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 28th August 2021 at 22:56.
Dogway is offline   Reply With Quote
Old 29th August 2021, 02:33   #259  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,168
Your destripe() ported need cullresize.dll same destripe in vs (.py), avs (.avsi) or don't need anymore??
https://github.com/YomikoR/VapourSynth-Destripe#related
kedautinh12 is offline   Reply With Quote
Old 29th August 2021, 03:45   #260  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,669
Quote:
Originally Posted by kedautinh12 View Post
Your destripe() ported need cullresize.dll same destripe in vs (.py), avs (.avsi) or don't need anymore??
https://github.com/YomikoR/VapourSynth-Destripe#related
*.mp4 guy's DeStripe has never required CullResize. The other Destripe script is a scaling script that uses CullResize and is used for fixing cross-conversion.

PS: there's an edit button that helps avoid posting back to back
Reel.Deel is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.