I would try change the order of the filters. You want to remove the DCT ringing before the other other filters have a chance to make them worse.
And if the other filters are causing similar artifacts you want to adjust them.Code:LoadPlugin("C:\Program Files\AviSynth+\plugins64\TNLMeans.dll") LWLibavVideoSource("U:\( Folder ) External\-----------Simpsons @@@@ (4 x 3 versions)\The Simpsons S01E01 - Simpsons Roasting on an Open Fire.mkv", format="YUV420P8") RemoveGrain(mode=1, planar=true) TNLmeans(Ax=3, Ay=3, Az=1) FastLineDarkenMOD() FFT3Dfilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.4, plane=4) Hysteria(strength=50, usemask=true, lowthresh=20, highthresh=50, luma_cap=250, maxchg=255, minchg=0, showmask=false) Santiag(3,3)
I haven't been able to get KNLMeansCL working. I'm only using the onboard graphics of my i5 2500K. And I've only recently started using 64 bit AviSynth so I have't tried again.
Just tried and I get "OpenCL.dll is missing...".
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 61 to 90 of 111
Thread
-
Last edited by jagabo; 1st May 2018 at 18:55.
-
There it is -- it was RgTools.dll, that is what's making RemoveGrain work. And that in was the hidden jewel that "completely" remove those DCT ringing artifacts.
You weren't kidding about NLmeans. About 1 FPS with means vs around 10 FPS without.
Looks like the ability to remove those pesky DCT ringing artifacts was already present with RemoveGain. Internet research, experience from some users say to not fiddle with the default values much, thus I left RemoveGain's setting on default. Amazingly enough changing the "mode" to either 3 or 4 almost almost "completely" remove them. Not really completely, but much much better.
Code:RemoveGrain(mode=4, planar=false)
All four images have filters applied. The only difference is changing RemoveGain's from mode=1 to mode=4
-
That .dll ships with the windows intel gpu drivers ; maybe you are using an older driver ?
https://software.intel.com/en-us/articles/opencl-drivers
GPU/CPU Driver Packages
(Also automatically shipped with Windows graphics drivers) -
I might be (not sure yet) using this eventually. Mode=3, and RemoveGrain twice, once at the beginning, once at the end (mode=2) with multiple stacks of FastLineDarkenMod in between. Not sure if it's overkill but there are visible changes when I do change.
Code:if not exist FLOWERPOWERremoveGrainMode4TNLmeans_____ md FLOWERPOWERremoveGrainMode4TNLmeans_____ for %%A in ("*.mkv") do ( echo Import("C:\Program Files\AviSynth+\plugins64\FastLineDarkenMOD.avsi"^) >> "%%~A.avs" echo LWLibavVideoSource("%%A",format="YUV420P8"^) > "%%~A.avs" echo RemoveGrain(mode=3, planar=false^) >> "%%~A.avs" echo FastLineDarkenMOD(strength=50^) >> "%%~A.avs" echo FastLineDarkenMOD(strength=50^) >> "%%~A.avs" echo FFT3Dfilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.4, plane=4^) >> "%%~A.avs" echo Hysteria(strength=50, usemask=true, lowthresh=20, highthresh=50, luma_cap=250, maxchg=255, minchg=0, showmask=false^) >> "%%~A.avs" echo RemoveGrain(mode=2, planar=false^) >> "%%~A.avs" echo FastLineDarkenMOD(^) >> "%%~A.avs" echo Santiag(3,3^) >> "%%~A.avs" "C:\Program Files\ImageMagick-7.0.2-Q16\ffmpeg2.exe" -i "%%A.AVS" -i "%%A" -map 0:0 -map 1:a:0 -y -c:v libx264 -preset veryslow -tune animation -crf 24 -vf hqdn3d,setsar=sar=8/9 -c:a ac3 -ac 2 -b:a 128k "FLOWERPOWERremoveGrainMode4TNLmeans_____\%%~nA.mp4" del "%%A.AVS" del "%%~nA*.LWI" ) pause
-
Thanks. Yes, after my last post I went looking and updated the driver but now there is a different error:
Code:The procedure entry point clEnqueueFillBuffer could not be located in the dynamic link library OpenCL.dll.
From what I've read Sandy Bridge only has OpenCL 1.1 support, and the aforementioned function starts at 1.2.Last edited by jagabo; 1st May 2018 at 21:52.
-
Well you would expect visible changes. If there were no changes the filter would not be working
But a lot of it is subjective or personal taste.
But I'm not sure I understand the reasoning behind it , or multiple FastLineDarkenMod calls
Officially it's supported, as is Intel HD2500
https://github.com/Khanattila/KNLMeansCL/wiki/Requirements
But I think it's because of OpenCL 1.2. SB doesn't support it
KNLMeansCL 0.6.11 is the last version that supported OpenCL 1.1 and 1.0 -
-
You can play with the settings on some of these
http://avisynth.nl/index.php/Category:Line_darkeners
Or , another approach would be to thin the line mask with something like awarpsharp2 if the applied lines are too thick -
EDIT: Just tested out awarpsharp and I kind of like that. It does thin the line, now time to take a look at it's settings. Still need to understand how to fiddle with the code below though. Changing values doesn't do anything in the preview (F5, mouse click) screen.
So I found this code and I'm at a lost. I'm not exactly sure what digits to change. Change digits to 800 doesn't do anything. F5 on the keyboard and there are no errors. Not sure how to use "these" types of scripts/codes.
https://forum.doom9.org/showpost.php?p=993939&postcount=2
Code:function Linedarken_toon(clip orig, float "sstrengtha", "sdboost", int "srange", "warpdepth", bool "fast") { ###### parameters ###### sstr = string(default(sstrength, 180)/255.0) srange = default(srange, 0) sdboost = default(sdboost, 1.0) wdepth = default(warpdepth, 8) fast = default(fast, false) ###### filtering ###### sharp = orig.Unsharpmask(00, 4, 0) orig.mt_edge(thy1=3,thy2=255,mode="prewitt",Y=3,V=1,U=1) mt_lut("x "+string(srange)+" + 195 / 1.0 "+string(sdboost)+" / ^ 255 *",U=1,V=1).mt_inflate().mt_inflate().mt_inflate() linemask = mt_lutxy(orig, last, yexpr="300 1 x 255 / - 255 y - * x 1.14 ^ + - "+sstr+" *", uexpr="x", vexpr="x") fast==false ? mt_merge(orig, sharp, linemask, Y=3, U=2, V=2) : \ mt_lutxy(orig,sharp,"x y < 40 y < | x y x - 1 x 255 / - 2 ^ * 1 y 128 / - 4 ^ * "+sstr+" * x + ?",U=2,V=2) final = wdepth<=0 ? last : awarpsharp(last,cm=1,depth=wdepth,blurlevel=1) return final }
Last edited by strawberryshortcake; 2nd May 2018 at 00:58.
-
Just call the function. Either Import("whatever.avs") , or copy function to the script
eg.
WhateverSource()
Linedarken_toon(sstrength=180)
A good way is to compare different scripts in different tabs. Hit the number keys to swap. E.g. tab 1 might have strenght of 10, tab 2 might have strength of 200, etc... in avspmod , the frames are aligned if you have to same dimensions, same framecount so the images are superimposed and aligned. You can seek to different times and they will keep alignment
There are some spelling errors/typos in that script, there should be errors.
float "sstrengtha" shouldn't have an "a" at the end ; or sstr = string(default(sstrength, 180)/255.0) should have an "a" at the end of strength
If you look at the parameters, the strength range is only up to 255 (which is expected for 8bit) , but it does not have error logic to spit out a warning or error
This looks like a line thinner mostly, but if your lines are from HD source you might not notice as much of a difference . -
-
Different error with that version:
Code:KNLMeansCL: AviSynthCreate error (cBuildProgram)!
Code:--------------------------------- *** Error in OpenCL compiler *** --------------------------------- # Build Options -cl-single-precision-constant -cl-denorms-are-zero -cl-fast-relaxed-math -Werror -D H_BLOCK_X=32 -D H_BLOCK_Y=4 -D V_BLOCK_X=32 -D V_BLOCK_Y=4 -D NLMK_TCLIP=73 -D NLMK_S=4 -D NLMK_WMODE=1 -D NLMK_TEMPORAL=0 -D NLMK_H2_INV_NORM=185.828175 -D NLMK_BIT_SHIFT=0 # Build Log :119:47: error: double precision constant requires cl_khr_fp64, casting to single precision :122:40: error: double precision constant requires cl_khr_fp64, casting to single precision :125:43: error: double precision constant requires cl_khr_fp64, casting to single precision
Code:KNLMeansCL: no opencl device available of type devcie_type!
-
Not sure about those errors ; you can post in the doom9 thread or github issues (doom9 thread is probably better place because this is probably system specific issue)
You can use GPU Caps Viewer to help diagnose OpenCL issues
If you have 1 opencl device, it should default to that one being used. Otherwise you have to use the device_id. But maybe try 0,1 values
eg. device_type = "GPU", device_id = 1 -
Thanks pdr. device_id=x doesn't help (both 32 bit and 64 bit give the same errors). Actually, I think the Sandy Bridge GPU doesn't support OpenCL -- it's all done by the CPU.
I think I'll just give up on this for now. I don't use these noise reduction filters much. I can just use TNLMeans when I need such a filter. I'll probably upgrade to a newer CPU/motherboard/memory next year. I'll try again then.
By the way, have you ever seen a 64 bit version of Donald Graft's dup()? That's one of the last filters that's holding me back from full time 64 bit AviSynth. Also, did I see you mention a filter that would let you use 32 bit AviSynth filters in 64 bit AviSynth? -
TNLMeans is better for fine tuning IMO . KNLMeans tends to reduce too much detail , even with spatial mode only using weak settings. Personally, I like TNLMeans better from pure quality standpoint. But KNLMeans supports more options, more pixel formats
There is a TNLMeans ICL version that is slightly faster (intel compiler) , at least on Intel chips
http://www.iol.ie/~schubert/gas/TNLMeans103_ICL.7z
By the way, have you ever seen a 64 bit version of Donald Graft's dup()? That's one of the last filters that's holding me back from full time 64 bit AviSynth. Also, did I see you mention a filter that would let you use 32 bit AviSynth filters in 64 bit AviSynth?
The ability to run x86 filters in x64 avisynth is done through mp_pipeline . But native is always faster/better if possible.
https://forum.doom9.org/showthread.php?t=163281 -
Code:### ### function Ultimate Super Sample : USS() ### by LaTo INV. ### ### Need : nnedi, limitedsharpenfaster, gradfunkmirror, addgrain ### ### USS(input, ox, oy, PP1, PP2, PP3) ### ox = destination width ### oy = destination height ### PP1 = "Limited Sharpen Faster" post-processing ### PP2 = "GradFun2DB" post-processing ### PP3 = "Add Grain" post-processing ### ### Default : USS(last, 1280, 720, 100, 1.2, 5) ### function USS(clip input, int "ox", int "oy", int "PP1", float "PP2", int "PP3") { ox = default(ox, 1280) oy = default(oy, 720) PP1 = default(PP1, 100) PP2 = default(PP2, 1.2) PP3 = default(PP3, 5) ix = input.width iy = input.height scaleX = ceil(float(ox)/float(2 * ix))*2 scaleY = ceil(float(oy)/float(2 * iy))*2 scale = scaleX > scaleY ? scaleX : scaleY upscale2 = scale > 1 ? input \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright(do I put anything in here?) \ : input upscale4 = scale > 2 ? upscale2 \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright() \ : upscale2 upscale8 = scale > 4 ? upscale4 \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright() \ : upscale4 upscale16 = scale > 8 ? upscale8 \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright() \ : upscale8 process = upscale16 \ .limitedsharpenfaster(ss_x=1.0,ss_y=1.0,strength=PP1) \ .gradfunkmirror(PP2) \ .addgrain(PP3,0,0) output = process.spline36resize(ox,oy) return output } ###
So I'm still kind of confused with these "function" scripts. What I see is this in my brain. I see multiple variables (notice all the color locations) that I can change. My brain is basically all over the place, not sure where to start and end.
In the following thread, a person mentioned, "Addborders" and where would I "addborders".
USS(1232,688)
Addborders(24,16,24,16)
https://forum.doom9.org/showthread.php?t=138285
Do I even touch anything in the bright green color?
Do I change the blue "?" to a number, a word?
Do I change the red numbers next to the blue "?" to a different number?
Do I just everything inside the "function" parenthesis ( ) and leave everything inside the { } alone.
function USS(clip input, int "ox", int "oy", int "PP1", float "PP2", int "PP3")
Do I change the above string of function code to something with numbers
function USS(clip input, 5 "ox", 6 "oy", 44 "PP1", 8 "PP2", 12 "PP3")
Or Do I delete the "ox" "oy" "PP1" "PP2" "PP3" and go with something like this:
USS(clip input, 5,6,44,8,12)
And then with the word "clip," do I go about it this way:
function USS(MPEG2Source("T:\Sitcom - Will & Grace DVD\Will & Grace S1 D1 Ep2 - A New Lease on Life TEST.d2v", cpu=0), int "ox", int "oy", int "PP1", float "PP2", int "PP3")
Then with this section of the code:
ox = default(ox, 1280)
oy = default(oy, 720)
PP1 = default(PP1, 100)
PP2 = default(PP2, 1.2)
PP3 = default(PP3, 5)
Do I change them to something like so where I'm basically changing the numbers)?
ox = default(ox, 9999)
oy = default(oy, 888)
PP1 = default(PP1, 700)
PP2 = default(PP2, 600)
PP3 = default(PP3, 500)
Then there's this section of the code,
ix = input.width
iy = input.height
scaleX = ceil(float(ox)/float(2 * ix))*2
scaleY = ceil(float(oy)/float(2 * iy))*2
scale = scaleX > scaleY ? scaleX : scaleY
Do I change it like so ...
1920 = input.width
1080 = input.height
scaleX = ceil(float(ox)/float(15 * ix))*60
scaleY = ceil(float(oy)/float(25 * iy))*75
scale = scaleX > scaleY 4 scaleX : scaleY
Do I do anything with the nnedi location:
Code:.nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright
Code:.nnedi(dh=false,Y=false,U=true,V=true,field=15).turnright
Code:upscale2 = scale > 1 ? input \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright(do I put anything in here?) \ : input
Code:upscale2 = scale > 10 50 input \ .nnedi(dh=true,Y=true,U=true,V=true,field=1).turnleft() \ .nnedi(dh=true,Y=true,U=true,V=true,field=0).turnright(do I put anything in here?) \ : input
Here's an example where everything above the orange rectangular box no longer applies to the imported video Will & Grace. TFM() and Tdecimate which is further up no long inverse telecines the Will and Grace. When I finally moved TFM() and Tdecimate below a=MPEGSource but above "function," then TFM() and Tdecimate would work. Do that mean this the following Import("C:\.......\UltimateSuperSample.avsi") must be on line 1 at the very top of the script? What if I have two types of these function scripts? Do I then have to put both MUST be at the top lines
Line 1 MPEG2Source("T:\Sitcom - Will & Grace DVD\Will & Grace S1 D1 Ep2 - A New Lease on Life TEST.d2v", cpu=0)
Line 2 Import("C\...\UltimateSuperScript.avsi")
Line 3 Import("C\...\PerfectDENOIERScript.avsi")
Line 4 TFM()
Line 5 Tdecimate()
Code:Import("C:\Users\Johnny\Desktop\New folder\UltimateSuperSample.avsi") a=MPEG2Source("T:\Sitcom - Will & Grace DVD\Will & Grace S1 D1 Ep2 - A New Lease on Life TEST.d2v", cpu=0) a
And that is my brain all over the place with these "function" scripts. Not exactly sure where to start.Last edited by strawberryshortcake; 2nd May 2018 at 22:47.
-
And with all the stuff above, I need to somehow "port" it or include it into my .bat batch script that jagabo essentially.
Code:if not exist GREENFLOWER md GREENFLOWER for %%A in ("*.VOB") do ( "C:\Program Files (x86)\AMVpack\DGMPGDec\DGIndex.exe" -i "%%~A" -o "%%~dpnA" -fo 0 -om 2 -exit echo Mpeg2Source("%%~dpnA.d2v", CPU2="ooooxx", Info=3^) > "%%~A.avs" echo TFM(d2v="%%~dpnA.d2v"^) >> "%%~A.avs" echo TDecimate(^) >> "%%~A.avs" "C:\Program Files\ImageMagick-7.0.2-Q16\ffmpeg2.exe" -i "%%A.AVS" -i "%%A" -map 0:0 -map 1:a:0 -y -c:v libx264 -preset veryslow -tune film -crf 22 -vf hqdn3d,setsar=sar=8/9 -c:a copy "GREENFLOWER\%%~nA.mp4" del "%%~nA*.AC3" del "%%A.AVS" del "%%~nA.d2v" del "%%~nA.d2v.bad" del "%%~nA.fix.txt" ) pause
-
You don't want to change function at all. You just include it within the body of your script. Then you call it from the main flow of your script:
Code:# this creates a function called USS function USS(blah...) { blah... } # You then call it just like any other function (filter): Mpeg2Source(blah...) TFM() TDecimate() USS(whatever options you want)
Code:Import("\path\to\USS.avs") # You then call it just like any other function (filter): Mpeg2Source(blah...) TFM() TDecimate() USS(whatever options you want)
Last edited by jagabo; 2nd May 2018 at 23:10.
-
-
-
Appreciate the tip on hysteria. I'll run a comparison test.
As far as the "function" script goes, I think I may have entered it correctly, but then plugin requirements are throwing me off. I may just have to revisit this over the weekend or something. But the general gist of the problem is, I have both the Walker Dependancies 32bit and 64bit. What I think I'm suppose to do is just drag the .dll file extension onto either the 32bit or 64bit Walker Dependancy. 32bit .dll onto 32bit Walker; 64bit .dll onto 64bit Walker. If it prompts a red warning message, then it's probably not going to work unless I have some other "stuff" to make it compatible.
Do you personally (or anyone else wants to chime in) try to upscale your SD DVD into a crisper ("HD-ish") effect? And what are the scripts that you use? I'm thinking about trying to do that with Seinfeld, Will and Grace, Frasier, Friends, Everybody Loves Raymond, etc. etc. I thought maybe getting the Ultimate Super Sample Function script could help, but can't get it to work because of the missing plugins or .dll or system requirements, etc.
As far as this "folder" is concerned, it's more of a temporary reminder of sort. I'm just keeping those in there so I remember which ones I copied and pasted into the 32bit Avisynth folder. If it doesn't work, I'll just delete them from the 32 bit folder plugin Avisynth program folder.
-
I've done similar before, upscaling VCDs to 480p for upload to YouTube and for DVD. But if this is for your own television viewing, then it's pretty much a waste of time as your television will have its own upscaler to go from DVD resolution to 1080p or whatever the native resolution of your television is. However, in general, the best AviSynth upscaler is Nnedi3_RPow2 and a sample script might go (from a 4:3 DVD to 1080p):
Code:nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=1440,fheight=1080)
Use whatever resizer you like and I usually follow it with a little sharpening. I usually use LimitedSharpenFaster. -
Thanks, I'll definitely look into that code and see if it works.
EDIT: Now, I've been kind of confused (through internet research) about the whole resolution/size/upscale terminology.
Fraiser mediainfo 720 x480 pixels, and 4:3 display aspect ratio.
If I wanted to increase the "details" in the picture (i.e. make them sharper, crispier), will increasing the pixels to 1920x1080 pixels, also increase the file size. Asking because when I was still using Vidcoder, changing the size of the output video didn't affect the file size at all (100mb was still 100mb) when the video size was increased 720x480 ===> 1920x1080 .. if my recollection was correct.
People kept saying the only way to affect file size was bitrate x duration =file size.
If I do it like so, does it have any affect on the file size and what I'm trying to accomplish, increase sharpness? (Note, I have read that in order to properly upscale it, one needs to "change the resolution" from 720x480 to 1920x1080, then apply the appropriate filters, and down it back to 720x480 or something like.
Frasier VOB 720x480
Code:nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=720,fheight=480)
Code:nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=1920,fheight=1080)
Code:nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=1440,fheight=1080)
All of this is strictly for my personal viewing on my ipad 12.9 (512GB), but also to learn something about video encoding, scripting, and stuff.
Frasier can be a bit on the "blurry" side so to speak on my ipad. I certainly understand one can't take an SD source and magically turn it HD, but if I could give it that little push, a bit sharper, a bit more detailed (even if it may be artificial created details, or however one wants to put it), it can make the viewing sessions a bit better.
Space/Capacity is also an issue as well on the 512GB ipad.
The filters already made the Simpsons a bit more bearable. However, I'm discovering a "shimmering" effect if I push Hysteria too hard. I'm thinking I might need to drop Hysteria, or use it at a strength 1 or 2, and push FasterLineDarkenMOD a bit more, or some other solution to thicken the lines and ultimately a "sharper" picture.Last edited by strawberryshortcake; 3rd May 2018 at 04:06.
-
What do you mean, "see if it works"? Of course it works.
If I wanted to increase the "details" in the picture (i.e. make them sharper, crispier), will increasing the pixels to 1920x1080 pixels...
...changing the size of the output video didn't affect the file size at all (100mb was still 100mb)
If I do it like so, does it have any affect on the file size and what I'm trying to accomplish, increase sharpness?
nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwi dth=1920,fheight=1080)
And if the goal is to watch these on an iPad, I'd just keep the original resolution. Or resize to 640x480, -
Noted. I'll play around with that this weekend. Thanks.
Oh I don't doubt that the size dimension and code will work. I know it will work.
But by "will it work," I meant if the addition of any filters and sharpeners (or minus any other filters or sharpeners) or various combination plus the nnedi code, if those miscellaneous filters/sharpeners/denoiser will produce the "picture" that is pleasing to my eyes, with respect to the distance I hold the tablet.
Scratching off the 1920x1080 off my list. Don't want anyone fat.
I'll go with either 1440x1080, 720x480 or 640x480. I'll see how it goes. I personally don't mind the black bars.
Thanks. Appreciative.
EDIT: Oh yeah, as far as changing the size and keeping the same 100mb size or whatever it was ... i would have to redo a test to see the results. I don't recall if the quality degraded much. I think ffmpeg can also change the width height immediately or something.
EDIT: Yep, I use to encode using a target size, or a specific bitrate (i.e. 600kb) but decided to jump on the CRF wagon. Would rather have consistent quality over a set bitrate.Last edited by strawberryshortcake; 3rd May 2018 at 05:11.
-
You want to clean up the video before you upscale.
Upscaling won't create detail that isn't in the original video. What you can do is keep sharp edges sharp without introducing aliasing and oversharpening halos. This can work pretty well for cartoons. But not as good for real world video. -
My brains waves were kicking and got me thinking. If my VOB is already 720x480, the following would be pointless right? Nnedi3_rpow2 is only useful if I wanted to upscale it to 1440x1080 right? Nnedi_rpow2 is also not useful if I wanted to decrease the size right?
Code:nnedi3_rpow2(rfactor=2,cshift="spline36resize",fwidth=720,fheight=480)
So, nnedi3_rpow2 is pointless in the following .bat batch script?
Code:if not exist WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2 md WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2 for %%A in ("*.VOB") do ( "C:\Program Files (x86)\AMVpack\DGMPGDec\DGIndex.exe" -i "%%~A" -o "%%~dpnA" -fo 0 -om 2 -exit echo Mpeg2Source("%%~dpnA.d2v", CPU2="ooooxx", Info=3^) > "%%~A.avs" echo TFM(d2v="%%~dpnA.d2v"^) >> "%%~A.avs" echo TDecimate(^) >> "%%~A.avs" echo Import("C:\Program Files\AviSynth+\plugins64\LimitedSharpenFaster.avsi"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\aWarpSharp.dll"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\SangNom2.dll"^) >> "%%~A.avs" echo Import ("C:\Program Files\AviSynth+\plugins64\FastLineDarkenMOD.avsi"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\nnedi3.dll"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64+\AddGrainC.dll"^) >> "%%~A.avs" echo FFT3DFilter(sigma=1.5, plane=0, bw=16, bh=16, ow=8, oh=8, sharpen=0.4^) >> "%%~A.avs" echo FFT3DFilter(sigma=3, plane=3, bw=16, bh=16, ow=8, oh=8, sharpen=0.4^) >> "%%~A.avs" echo LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, edgemode=1, strength=255^) >> "%%~A.avs" echo awarpsharp(5^) >> "%%~A.avs" echo Santiag(1,1^) >> "%%~A.avs" echo FastlineDarkenMOD(strength=50^) >> "%%~A.avs" echo AddGrainC(var=1.0, uvar=0.0, hcorr=0.0, vcorr=0.0, seed=-1, constant=false, sse2=true^) >> "%%~A.avs" echo Tweak(hue=-3^) >> "%%~A.avs" echo nnedi3_rpow2(rfactor=2,nsize=4,cshift="spline36resize",fwidth=720,fheight=480^) >> "%%~A.avs" "C:\Program Files\ImageMagick-7.0.2-Q16\ffmpeg2.exe" -i "%%A.AVS" -i "%%A" -map 0:0 -map 1:a:0 -y -c:v libx264 -preset veryslow -tune film -crf 23 -vf setsar=sar=8/9 -acodec copy "WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2\%%~nA.mp4" del "%%~nA*.AC3" del "%%A.AVS" del "%%~nA.d2v" del "%%~nA.d2v.bad" del "%%~nA.fix.txt" ) pause
I realized people look kind of plastic with complete grain removal. I will need to start encoding with AddGrain after processing the video. The following doesn't have AddGrain yet.
VOB original (DVD source)
[Attachment 45513 - Click to enlarge]
Avisynth
[Attachment 45514 - Click to enlarge]
VOB original (DVD Source)
[Attachment 45516 - Click to enlarge]
Avisynth
[Attachment 45515 - Click to enlarge] -
Yes. It might smooth out some edges and sharpen a bit.
For example, after your processing the guy's hair in the first pair shots looks like painted plastic, not hair. It's also over-sharpened with halos around all sharp edges. -
Appreciative the input. It helps. The above set of images were processed using the same script.
I'm still fiddling with the different filters, but how would one go about selectively sharpening the eyes and facial features. That's the reason I was pushing heavy on the sharp filters. That was my primary focus when I'm trying make things look better. It's all about the face. What's your current approach?
Any particular filter plugins or script that's your "go-to" for content with real people? I know it's all subjective but it would be nice to get steered down the "correct" path.
I know it's all about balance, and for my purposes, it's also about file size. The addition of AddGrain (if pushed too hard) severely increases file size.
Initially I was amazed by the results in the following thread ((https://forum.doom9.org/showthread.php?t=174249)). I know it was an experiment, and I understand why all grain was removed; it was to showcase the power of KNLmeans (which I still can't get to run at all). Would be too slow for system anyway. The more I look at the photo in the following link, the more plastic it kind of looks. But Fesity2 definitely seems to have a solid handled on different plugin effects.
The following is my current updated script using AddGrain. I'm guessing filter do affect file size. Trying to figure out what I could take out and what I may need to push.
Code:if not exist WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2 md WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2 for %%A in ("*.VOB") do ( "C:\Program Files (x86)\AMVpack\DGMPGDec\DGIndex.exe" -i "%%~A" -o "%%~dpnA" -fo 0 -om 2 -exit echo Mpeg2Source("%%~dpnA.d2v", CPU2="ooooxx", Info=3^) > "%%~A.avs" echo TFM(d2v="%%~dpnA.d2v"^) >> "%%~A.avs" echo TDecimate(^) >> "%%~A.avs" echo Import("C:\Program Files\AviSynth+\plugins64\LimitedSharpenFaster.avsi"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\aWarpSharp.dll"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\SangNom2.dll"^) >> "%%~A.avs" echo Import ("C:\Program Files\AviSynth+\plugins64\FastLineDarkenMOD.avsi"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64\nnedi3.dll"^) >> "%%~A.avs" echo LoadPlugin("C:\Program Files\AviSynth+\plugins64+\AddGrainC.dll"^) >> "%%~A.avs" echo FFT3DFilter(sigma=1.5, plane=0, bw=16, bh=16, ow=8, oh=8, sharpen=0.4^) >> "%%~A.avs" echo FFT3DFilter(sigma=3, plane=3, bw=16, bh=16, ow=8, oh=8, sharpen=0.4^) >> "%%~A.avs" echo LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, edgemode=1, strength=255^) >> "%%~A.avs" echo awarpsharp(5^) >> "%%~A.avs" echo Santiag(1,1^) >> "%%~A.avs" echo FastlineDarkenMOD(strength=50^) >> "%%~A.avs" echo AddGrainC(var=1.0, uvar=0.0, hcorr=0.0, vcorr=0.0, seed=-1, constant=false, sse2=true^) >> "%%~A.avs" echo Tweak(hue=-3^) >> "%%~A.avs" echo nnedi3_rpow2(rfactor=2,nsize=4,cshift="spline36resize",fwidth=720,fheight=480^) >> "%%~A.avs" "C:\Program Files\ImageMagick-7.0.2-Q16\ffmpeg2.exe" -i "%%A.AVS" -i "%%A" -map 0:0 -map 1:a:0 -y -c:v libx264 -preset veryslow -tune film -crf 23 -vf setsar=sar=8/9 -acodec copy "WithGrain__________23copyaudioMINIMIZEplusTTF3Dfilterx2\%%~nA.mp4" del "%%~nA*.AC3" del "%%A.AVS" del "%%~nA.d2v" del "%%~nA.d2v.bad" del "%%~nA.fix.txt" ) pause
Last edited by strawberryshortcake; 5th May 2018 at 12:57.
Similar Threads
-
Which Nnedi3.dll do I need for Avisynth?
By VideoFanatic in forum Video ConversionReplies: 16Last Post: 17th Apr 2018, 14:55 -
who use AVFS.dll/avisynth?
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 9th Mar 2017, 09:44 -
MSVCP60.dll MSVCRT.dll MFC42.dll: wich of this dll's do video deinterlace?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 25th Sep 2016, 11:40 -
Problems loading plugins into AVISynth
By bvdd in forum Video ConversionReplies: 51Last Post: 20th Nov 2015, 07:15 -
HELP! MeGUI can't load certain avisynth plugins
By Throw_Hammer in forum Newbie / General discussionsReplies: 3Last Post: 22nd Feb 2014, 17:19