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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#42 | Link |
Registered User
Join Date: Aug 2003
Posts: 43
|
i keep on getting washed out color whenever i applied this script:
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_MaskTools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\removegrainsse2.dll") LoadPlugin("C:\Program Files\DGMPGDec\dgdecode.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\UnDot.dll") mpeg2source("e:\dvd\divergence.d2v") Telecide(guide=1).Decimate() crop(4,60,-4,-60) trim(5000,10000) dull = last sharp = dull.LimitedSharpenfaster( smode=4, dest_x=720, dest_y=368 ) Soothe( sharp, dull, 20 ) undot() "dest_x=720, dest_y=368 ", everything's good. can anyone tell me what's wrong with my script? |
![]() |
![]() |
![]() |
#43 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
Heh, I thought it was LSFaster for a few, until I noticed that you never resized dull. Pick a good scene with very sharply defined colors, and you'll notice the chroma will bleed horribly, since it gets copied from the second argument, not the first. Lesson: Always remember to resize both clips.
![]() |
![]() |
![]() |
![]() |
#44 | Link |
Registered User
Join Date: Aug 2003
Posts: 43
|
good man!
here's my new script Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_MaskTools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\removegrainsse2.dll") LoadPlugin("C:\Program Files\DGMPGDec\dgdecode.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\UnDot.dll") mpeg2source("e:\dvd\divergence.d2v") Telecide(guide=1).Decimate() crop(4,60,-4,-60) LanczosResize(720,368) dull = last sharp = dull.LimitedSharpenfaster( smode=4, dest_x=720, dest_y=368 ) Soothe( sharp, dull, 24 ) undot() trim(5000,10000) |
![]() |
![]() |
![]() |
#45 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
try:
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_MaskTools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\removegrainsse2.dll") LoadPlugin("C:\Program Files\DGMPGDec\dgdecode.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\UnDot.dll") mpeg2source("e:\dvd\divergence.d2v") Telecide(guide=1).Decimate() crop(4,60,-4,-60) dull = last.LanczosResize(720,368) sharp = dull.LimitedSharpenfaster( smode=4, dest_x=720, dest_y=368 ) Soothe( sharp, dull, 24 ) undot() trim(5000,10000)
__________________
sucking the life out of your videos since 2004 |
![]() |
![]() |
![]() |
#47 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
In case anyone is feeling the burn and needs for speed, masktools 2:
Code:
function Soothe(clip sharp, clip orig, int "keep") { Assert(sharp.width == orig.width && sharp.height == orig.height, \ "Soothe: clip dimentions must match!") keep = default(keep, 24) keep = (keep>100) ? 100 : (keep<0) ? 0 : keep KP = string(keep) diff = mt_makediff(orig,sharp) diff2 = diff.temporalsoften(1,255,0,32,2) diff3 = mt_lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP \ + " * 128 + x 128 - abs y 128 - abs > x " + KP \ + " * y 100 " + KP + " - * + 100 / x ? ?") return( mt_makediff(orig,diff3,chroma="copy first") ) } ![]() [edit2: Added both to wiki: http://www.avisynth.org/mediawiki/Soothe ] Last edited by foxyshadis; 25th January 2007 at 19:21. |
![]() |
![]() |
![]() |
#48 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,393
|
Even faster:
>> diff2 = diff.temporalsoften(1,255,0,32,2) 'cause here, chroma isn't interesting anyways, and TS runs faster when not having to also process the UV planes ... ![]()
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
![]() |
![]() |
![]() |
#50 | Link |
Registered User
Join Date: Oct 2003
Posts: 2
|
Is it possible to get the soothe function to work, when a frame is being resized by LS? Example, currently have a video that is sized at 352,480, and using LimitedSharpenFaster(ss_x=1.2,ss_y=1.2,dest_x=704,dest_y=480,Smode=4,soft=24) to resize it to 704x480, when soothe runs, it errors with:
YV12LUTxy: Clip size must be the same. Code:
function Soothe(clip sharp, clip orig, int "keep") { keep = default(keep, 24) keep = (keep>100) ? 100 : (keep<0) ? 0 : keep KP = string(keep) diff = yv12lutxy(orig,sharp,"x y - 128 +", U=1,V=1) diff2 = diff.temporalsoften(1,255,255,32,2) diff3 = yv12lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP \ + " * 128 + x 128 - abs y 128 - abs > x " + KP \ + " * y 100 " + KP + " - * + 100 / x ? ?", U=1,V=1) return( yv12lutxy(orig,diff3,"x y 128 - -",U=2,V=2) ) } Laz. |
![]() |
![]() |
![]() |
#52 | Link |
Registered User
Join Date: Nov 2005
Posts: 327
|
The output of this script is awesome, but it is extraordinarily slow. Like running pixiedust on a 4096x1920 image. Huffyuv can encode it at ~1.5 fps. Can anyone recommend a way to speed it up?
Code:
MPEG2Source("VTS_06_1.d2v",cpu2="ooooxx") Telecide(guide=1,post=1,back=1) Decimate() Crop(2,56,716,362) LanczosResize(1280,544) RemoveGrain(mode=1) dull=fft3dfilter(sigma=1.5) sharp=LimitedSharpen(dull, \ ss_x=1.5, ss_y=1.5, \ dest_x=1280, dest_y=544, \ Smode=3, strength=115, \ Lmode=3, edgemode=1) Soothe(sharp,dull) |
![]() |
![]() |
![]() |
#54 | Link |
Registered User
Join Date: Nov 2005
Posts: 327
|
Without fft3dfilter there is no denoising. The output looks horrible because half of what is being sharpened is film grain.
I have tried putting fft3dfilter before the resize, and I think it might just be fast enough that way. Code:
height=1280 width=544 MPEG2Source("VTS_06_1.d2v",cpu2="ooooxx") Telecide(guide=1,post=1,back=1) Decimate() Crop(2,56,716,362) in=fft3dfilter(sigma=1.5) dull=LanczosResize(in,height,width) sharp=LimitedSharpen(in, \ ss_x=1.5, ss_y=1.5, \ dest_x=height, dest_y=width, \ Smode=3, strength=115, \ Lmode=1, edgemode=1) Soothe(sharp,dull,32) |
![]() |
![]() |
![]() |
#56 | Link |
Registered User
Join Date: Nov 2005
Posts: 327
|
DegrainMedian doesn't do all of the things I need. Removing grain is great, but it doesn't clean up the compression artifacts from the DVD like fft3dfilter does. I've got it up to about 2.6 fps for a turbo first pass. That is acceptable. Here is the script:
Code:
SetMemoryMax(768) width=1280 height=544 MPEG2Source("VTS_06_1.d2v",cpu2="ooooxx") Telecide(guide=1,post=1,back=1) Decimate() Crop(2,56,716,362) in=fft3dfilter(sigma=1.5) dull=BicubicResize(in,width,height) sharp=LimitedSharpen(in, \ ss_x=1.5, ss_y=1.5, \ dest_x=width, dest_y=height, \ Smode=3, strength=100, \ Lmode=1, edgemode=1) Soothe(sharp,dull) Last edited by Oline 61; 17th April 2006 at 05:12. |
![]() |
![]() |
![]() |
#57 | Link |
Registered User
Join Date: Apr 2004
Location: Sweden
Posts: 35
|
I'm getting an error when using Soothe(). VDub says:
Script error: There is no function named "yv12lutxy". What am I missing? My script Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll") Import("C:\Program Files\AviSynth 2.5\plugins\LRemoveDust.avsi") Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi") Import("C:\Program Files\AviSynth 2.5\plugins\Soothe.avsi") Mpeg2Source("D:\Hea\Video\DVD\Temp\Temp.d2v") LRemoveDust_YV12(17,2) Crop(6,78,710,420) dull = last.LanczosResize(704,416) sharp = dull.LimitedSharpenFaster(dest_x=704,dest_y=416) Soothe(sharp,dull,20) Addborders(0,80,0,80)
__________________
-AudioSlave |
![]() |
![]() |
![]() |
#59 | Link |
Registered User
Join Date: Dec 2006
Location: Heidelberg (DE), Kraków (PL)
Posts: 519
|
I'm just thinking while writing
![]() dull = last sharp = dull.LimitedSharpenFaster(dest_x=720,dest_y=304) provided we haven't resized (to our destination resolution) before. That's the mistake iceborne made above in his first script. Then the comparison clip /background (dull) would have a different resolution than the sharpened clip, and the whole function didn't make sense. However, if we write ... dull = last.LanczosResize(720,304) than we don't have to specify the resolution arguments in LSF, do we?! I mean sharp = dull + LSF, and dull has already been resized just one line above. So we can write afterwards ... sharp = dull.LimitedSharpenFaster() ? How blind & stupid have I been! (bangs his head against the wall ![]() ![]() If that's true, I've spent all my day just in vain, encoding samples I didn't actually want to encode. ![]()
__________________
"Only two things are infinite: the universe and human stupidity, and I'm not sure about the former."
Last edited by HeadBangeR77; 20th January 2007 at 06:50. |
![]() |
![]() |
![]() |
#60 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,393
|
Code:
# how to soothe LimitedSharpen when LS is set up to change resolution dx = your_target_width dy = your_target_height base = last.LanczosResize( dx, dy ) shrp = last.LimitedSharpen( dest_x = dx, dest_y = dy ) shrp.Soothe(base)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|