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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd November 2017, 15:25   #1241  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Thank you both for the fast advice!
Will try 0.6.11 as suggested by Groucho!

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 22nd November 2017, 22:01   #1242  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by videoFred View Post
I realy would like to test this filter. Unfortunately I'm getting the following error message:

My graphics card is Nvidia GeForce GT 420, drivers are updated.
I'm on Win10, opencl.dll is there, both in system32 and in syswow64
.

Any suggestions please?
I had the same problem, but now have everything working on Win7 64-bit, with AVISynth+ (r2504) and the 11/5/2017 version of KNLMeansCL. I went back to my notes to see what changes I made to get it to work, but cannot remember what I did (sorry!). I most definitely could NOT get it to work under XP where, for various reasons, I've been unable to install a later driver for my old nVidia GeForce 9800GT. Under Windows 7 I did not have that problem and have what I think is the last supported driver for that O/S, version 341.44.

My opinion of the filter is quite varied: on some material it performs brilliantly, clearly doing a better job than MDegrain2. This is especially true for "blotchy noise" that results from brightening really dark video. However, on other material, despite several people's claims that it doesn't destroy details, it absolutely ruined the video. This wasn't minor, but was really bad. The problems were most apparent on things like water glasses on a banquet table, where the subtle shadings on the glass disappeared. On another video, the wavy folds on a dress shirt also disappeared. So, take a hard look at any contoured surfaces that have no "high frequency" detail and instead simply have subtle changes in shading.

The filter is also dog slow without any GPU assist, and MT doesn't seem to do much (several people have said in this thread that MT and GPU end up working at odds, although without a GPU, I would think MT could still do something, but what do I know).

For me, any filter that cannot get above 1 fps is a unusable. I simply don't have multiple days to devote to any individual film or video. Life is full of "engineering trade-offs," and performance does matter.

Last edited by johnmeyer; 24th May 2019 at 20:21. Reason: change "about" to "above"
johnmeyer is offline   Reply With Quote
Old 23rd November 2017, 13:54   #1243  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by yup View Post
Hi Khanattila!
Please give me link for original paper. I want understand how work all parameters (mainly a and s) Your plugin.
yup.
B. Goossens, H.Q. Luong, J. Aelterman, A. Pizurica, and W. Philips,
"A GPU-Accelerated Real-Time NLMeans Algorithm for Denoising Color Video Sequences",
in Proc. ACIVS (2), 2010, pp.46-57.
__________________
github.com
Khanattila is offline   Reply With Quote
Old 23rd November 2017, 17:18   #1244  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Quote:
Originally Posted by Khanattila View Post
B. Goossens, H.Q. Luong, J. Aelterman, A. Pizurica, and W. Philips,
"A GPU-Accelerated Real-Time NLMeans Algorithm for Denoising Color Video Sequences",
in Proc. ACIVS (2), 2010, pp.46-57.
You could also find useful the papers referred by Kevin Stone (aka ‘Tritical’) when he released 'TNLMeans' 10 years ago. Those are still available at the AviSynth Wiki

EDIT: A functional snapshot from 2010 of tritical's web page, provided by wayback machine, where you will find the referred papers.

There are some other references at Wikipedia

Last edited by VS_Fan; 23rd November 2017 at 17:47.
VS_Fan is offline   Reply With Quote
Old 24th November 2017, 18:45   #1245  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by johnmeyer View Post
However, on other material, despite several people's claims that it doesn't destroy details, it absolutely ruined the video. This wasn't minor, but was really bad. The problems were most apparent on things like water glasses on a banquet table, where the subtle shadings on the glass disappeared. On another video, the wavy folds on a dress shirt also disappeared.
Could you share the KNLMeansCL settings you used in these cases and possibly a clip to reproduce?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 25th November 2017, 01:17   #1246  |  Link
pcroland
Registered User
 
Join Date: Mar 2014
Location: Hungary
Posts: 115
Hi!

I recently find knlmeanscl and it works pretty great but I have some questions:

Why do I get glitches at the start of the video sometimes? And how should I get rid of them?
Here's an example: https://mega.nz/#F!mUpyTIII!IXp43ePL1PETUGyVMYNUUg (source and encode are both ~1min long)
Code:
DirectShowSource("D:\raccoons\DVD1\VIDEO_TS\VTS_01_1.VOB")
QTGMC(Preset="Fast")
SelectOdd()
Crop(14,2,-16,-0)
FillMargins(1,0,1,1)
bbmod(0,2,4,6)
knlmeanscl(D=2, A=3, h=3, device_type="GPU")
DeHalo_Alpha(rx=2.0, ry=2.0, darkstr=0.4, brightstr=1, lowsens=50, highsens=50, ss=1.5)
GradFun3(thr=0.35, radius=12, elast=3, mask=2, mode=0, smode=0, debug=0, lsb=False, lsb_in=False, staticnoise=False, y=3, u=3, v=3)
Spline36ResizeMod(688,538,1,0,-1,-1)
The other question is how can I speed up the encodeing process? knlmeanscl is the bottleneck right now. I have an i7-4790 but I don't have a dedicated GPU but knlmeanscl still runs faster with device_type="GPU". Should I get a GPU?
Thanks in advance,
pcroland.
pcroland is offline   Reply With Quote
Old 25th November 2017, 18:12   #1247  |  Link
Shirtfull
Registered User
 
Join Date: May 2007
Posts: 53
Quote:
Originally Posted by pcroland View Post
Hi!

Why do I get glitches at the start of the video sometimes? And how should I get rid of them?
Could be your source filter, try dgmpgdec
Shirtfull is offline   Reply With Quote
Old 25th November 2017, 18:43   #1248  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by pcroland View Post
Why do I get glitches at the start of the video sometimes? And how should I get rid of them?
Here's an example: https://mega.nz/#F!mUpyTIII!IXp43ePL1PETUGyVMYNUUg (source and encode are both ~1min long)
Code:
DirectShowSource("D:\raccoons\DVD1\VIDEO_TS\VTS_01_1.VOB")
QTGMC(Preset="Fast")
SelectOdd()
Crop(14,2,-16,-0)
FillMargins(1,0,1,1)
bbmod(0,2,4,6)
knlmeanscl(D=2, A=3, h=3, device_type="GPU")
DeHalo_Alpha(rx=2.0, ry=2.0, darkstr=0.4, brightstr=1, lowsens=50, highsens=50, ss=1.5)
GradFun3(thr=0.35, radius=12, elast=3, mask=2, mode=0, smode=0, debug=0, lsb=False, lsb_in=False, staticnoise=False, y=3, u=3, v=3)
Spline36ResizeMod(688,538,1,0,-1,-1)
There are a bunch of potential culprits for the glitches. First and foremost, DirectShowSource is the worst choice for your source. Use DGIndex/DGDecode for VOB.
If that doesn't solve the glitch problem, test each of the filters/functions separately.

Quote:
Originally Posted by pcroland View Post
The other question is how can I speed up the encodeing process? knlmeanscl is the bottleneck right now. I have an i7-4790 but I don't have a dedicated GPU but knlmeanscl still runs faster with device_type="GPU". Should I get a GPU?
Yes, get a decent card (GTX1060/70/80).
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 25th November 2017, 18:49   #1249  |  Link
pcroland
Registered User
 
Join Date: Mar 2014
Location: Hungary
Posts: 115
Quote:
Originally Posted by Groucho2004 View Post
There are a bunch of potential culprits for the glitches. First and foremost, DirectShowSource is the worst choice for your source. Use DGIndex/DGDecode for VOB.
If that doesn't solve the glitch problem, test each of the filters/functions separately.

Yes, get a decent card (GTX1060/70/80).
I tried DGIndex but there were still some glitches, for example the luma frame changed as it should but the chroma frames remained the same. I got an ASUS 1050 2GB, the encoding time is now 8fps and for some reason the glitches disappeared also
pcroland is offline   Reply With Quote
Old 25th November 2017, 23:34   #1250  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Earlier versions of the nVidia driver had a relevant MPEG2 bug. Maybe when you installed the 1050 you upgraded to the new driver, which has been fixed.

Still, there shouldn't be any problem with DGIndex. I'll have a look with your stream.

Last edited by videoh; 25th November 2017 at 23:43.
videoh is offline   Reply With Quote
Old 26th November 2017, 13:40   #1251  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
The source file you linked is an MKV but your script shows you opening a VOB and you said you get issues with DGIndex but it cannot open MKV. So can't help you with this.
videoh is offline   Reply With Quote
Old 26th November 2017, 15:34   #1252  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by pcroland View Post
I tried DGIndex but there were still some glitches, for example the luma frame changed as it should but the chroma frames remained the same. I got an ASUS 1050 2GB, the encoding time is now 8fps and for some reason the glitches disappeared also
What do you mean by glitches? Your source.mkv has badly blended even and odd fields. I doubt that you can get anything useful out of this ....
Sharc is offline   Reply With Quote
Old 26th November 2017, 20:58   #1253  |  Link
pcroland
Registered User
 
Join Date: Mar 2014
Location: Hungary
Posts: 115
Quote:
Originally Posted by videoh View Post
The source file you linked is an MKV but your script shows you opening a VOB and you said you get issues with DGIndex but it cannot open MKV. So can't help you with this.
I used mkvtoolnix to cut out a 1min sample, sorry

Quote:
Originally Posted by Sharc View Post
What do you mean by glitches? Your source.mkv has badly blended even and odd fields. I doubt that you can get anything useful out of this ....
I know there's a terrible fieldblend, the glitches that I was talking about: in the encode.mkv file you can see frames flipping upside-down randomly in the first 5 sec. But now it's fixed, thanks for the help.
pcroland is offline   Reply With Quote
Old 27th November 2017, 11:00   #1254  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by Groucho2004 View Post
There are a bunch of potential culprits for the glitches. First and foremost, DirectShowSource is the worst choice for your source. Use DGIndex/DGDecode for VOB.
If that doesn't solve the glitch problem, test each of the filters/functions separately.

Yes, get a decent card (GTX1060/70/80).
Or a Vega card, when I can buy one.
__________________
github.com
Khanattila is offline   Reply With Quote
Old 7th December 2017, 12:28   #1255  |  Link
lordsmurf
Registered User
 
lordsmurf's Avatar
 
Join Date: Jan 2003
Posts: 124
Quote:
Originally Posted by johnmeyer View Post
For me, any filter that cannot get about 1 fps is a unusable. I simply don't have multiple days to devote to any individual film or video. Life is full of "engineering trade-offs," and performance does matter.
This was my same conclusion. It has a lot of potential -- but in the next decade sometime, when CPU and/or GPU is faster. I've already been through this -- 90s filtering not usable until 2000s, 00s filter not until 10s. Right now, it's little more than a tease.

Goodbye KNLmeansCL, may we meet again!
__________________
Back in town.
If you want my advice, then find me at the DigitalFAQ forum. Glad to assist.
lordsmurf is offline   Reply With Quote
Old 7th December 2017, 12:35   #1256  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
it was a while since I used knlmeanscl but I believe last time I tried it, it was pushing somewhere around 25 fps, and that was on a computer that is now five years old (i5-3570k, gtx... 670? I think?)

you can be in the next decade right now if you want to, is what I'm sayin'
TheFluff is offline   Reply With Quote
Old 7th December 2017, 12:46   #1257  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by TheFluff View Post
it was a while since I used knlmeanscl but I believe last time I tried it, it was pushing somewhere around 25 fps, and that was on a computer that is now five years old (i5-3570k, gtx... 670? I think?)

you can be in the next decade right now if you want to, is what I'm sayin'
Talking about decades - Even my old GT240 which I bought almost a decade ago delivers reasonable speed with KNLMeansCL if the parameters are set to sane values.
If you're getting < 5fps you're either using unreasonable settings or you should consider updating your hardware. Otherwise just forget about GPU filters.

By the way - Intel integrated graphics are utterly useless for OpenCL.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 7th December 2017 at 12:48.
Groucho2004 is offline   Reply With Quote
Old 7th December 2017, 13:22   #1258  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Those with a NVIDIA GPU may also want to try DGDenoise(), as an alternative to KNLmeansCL
Sharc is offline   Reply With Quote
Old 7th December 2017, 15:17   #1259  |  Link
lordsmurf
Registered User
 
lordsmurf's Avatar
 
Join Date: Jan 2003
Posts: 124
Quote:
Originally Posted by TheFluff View Post
it was a while since I used knlmeanscl but I believe last time I tried it, it was pushing somewhere around 25 fps, and that was on a computer that is now five years old (i5-3570k, gtx... 670? I think?)
you can be in the next decade right now if you want to, is what I'm sayin'
You're not going to get 25fps from this:

Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2)
AVISource("BadToonSample.avi")
ConvertToYV16(interlaced=true)
orig=last
ev=orig.assumetff().separatefields().selecteven()
od=orig.assumetff().separatefields().selectodd()
ev
ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=3, 
\ a=8, h=6, device_type = "GPU", device_id = 1, channels="Y")
ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=3, 
\ a=8, h=6, device_type = "GPU", device_id = 1, channels="Y")
YToUV(ue_chroma, ve_chroma)
MergeLuma(ev)
ev_filtered=last
od
uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=3, 
\ a=8, h=6, device_type = "GPU", device_id = 1, channels="Y")
vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=3, 
\ a=8, h=6, device_type = "GPU", device_id = 1, channels="Y")
YToUV(uo_chroma, vo_chroma)
MergeLuma(od)
od_filtered=last
interleave(ev_filtered,od_filtered)
assumefieldbased().assumetff().weave()
Prefetch(6)
KNLMeansCL will make the script crawl at about 1fps.

It's an ugly nth gen video with horrible chroma errors. I wrote a script that will suffice, with about 10fps, but the above is better -- but only in quality, not speed. The 1-hour video would take 165+ hours to process, which is not reasonable.

Quote:
Originally Posted by Groucho2004 View Post
you should consider updating your hardware. Otherwise just forget about GPU filters.
My i7-6700K with 16gb RAM doesn't need updating. I'm not a gamer, and have no need for expensive graphics cards. Furthermore, all those cards do is add room heat, as well as fan noise.

I can borrow a card, but I don't think it's going to give a usable performance boost. This is just a slow filter, GPU or not.

Feel free to test the above script, share your fps results.

Can anything replace KNLmeansCL for the sake of speed?
__________________
Back in town.
If you want my advice, then find me at the DigitalFAQ forum. Glad to assist.

Last edited by lordsmurf; 7th December 2017 at 15:33.
lordsmurf is offline   Reply With Quote
Old 7th December 2017, 16:03   #1260  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by lordsmurf View Post
KNLMeansCL will make the script crawl at about 1fps.
Hardly surprising with 4 calls to the filter and d=3, a=8. Even a GTX1080 would struggle.
Not to mention that you're running it in 6 threads which just consumes GPU memory and probably slows it down even further.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Reply

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 14:04.


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