So when you can load the 2.0x filters into avisynth 2.5x with that loadpluginex.dll , how come Sampler.dll doesn't work with AviSynth2.5x ?
:roll: |
Sampler does work in AVS2.5.1 and should work since v0.2. I use it all the time, just remember to use sampler-2.5.dll instead of sampler.dll . They're both in the same package.
|
Well, after spending an entire Saturday trying to modify this script I have accomplished precisely nothing, except learning a whole lot about how NOT to write a script. :roll: Not being a programmer type, I'm afraid my scripting skills just aren't up to the task. So I will throw a few random brain droppings out for you all, and maybe somebody with more scripting ability can make some of it work.
The first thing I noticed when I added the subtitle function in Sagittaire's latest script that he posted was how very little of the movie was being classified as high motion. I'm using a James Bond movie as my sample, and there were ski chases, car chases, fistfights, and a climactic shootout that never really got above medium. That led me to believe the threshold values need to be tweaked a little. I reduced threshold_hm to 10, and that bought me about 100k off my file size. But then I started noticing some scenes where there was a sharp threshold cutoff and there was a noticeable shift in the luma blurring. So then I started thinking along the lines of what kwag mentioned that maybe we need more than 3 brackets to give a better range of values that will both compress better and make the threshold transitions smoother. Like maybe 5 brackets. I spent most of the day today trying to add two new brackets for "VERY LOW" and "VERY HIGH" and set the thresholds at 3, 6, 9, 12 and 15. But somehow I just can't get both the logic and the syntax right. Along the way, my Detect_Motion function got quite long and cumbersome, so I started trying to find a way to simplify it. As I said, I'm not a programmer type, so this may be totally off the wall, but..... I started trying to create a function that would perform the operation Code:
output1 = Conditionalfilter( Courant_fr, Low, Medium, "YDifferenceFromPrevious() + UDifferenceFromPrevious() + VDifferenceFromPrevious()", "<", "threshold_sm", false) But studying up on that led me to the ConditionalFilter docs at AVISynth.org: http://www.avisynth.org/index.php?pa...ditionalFilter I discovered that if you add the line Code:
ScriptClip(clip, "Subtitle(String(YDifferenceFromPrevious() + UDifferenceFromPrevious() + VDifferenceFromPrevious()))") So here's where my thought is right now: Can we use FrameEvaluate to simply analyze the frame for motion without doing anything to it, and then put that result into a variable? I'm wondering if that could be the first step toward creating kwag's dynamic range of values..... Ideas? Or do I need to go back to my day job? :lol: |
Quote:
That's why I suggested the filter to be linear, instead of being in three ranges, where a sharp cut-off/turn-on WILL happen the way the script is currently set. 8) Quote:
Quote:
Quote:
Quote:
Quote:
Stick along, I'm pretty sure that in the next ~30 days, this will convert to a whole new monster :mrgreen: -kwag |
Quote:
|
Quote:
-kwag |
Quote:
Code:
function Detect_Motion( clip detect, clip Slow, clip Medium, clip Hight, float threshold_sm, float threshold_hm) |
Quote:
|
What happened to this one? Is anyone still working on it? it sounds so good, that I'm thinking about trying it out...
How come nobody seems to care about this thread anymore? |
Here you go Kwag. This is a new script that does linear filtering.
Code:
Version().ConvertToYV12().FadeIn(150).FadeOut(30) Regards, Tenra |
Hi Tenra,
Thanks for the script :) After looking at AviSynth's reference manual and your script, I've come up with a single line solution to the problem :!: ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))") So now a script will look something like this: Code:
LoadPlugin("C:\Filters25\MPEG2Dec3.dll") Now we have a linear value applied to mergeluma, depending on activity from the previous frame. It works FLAWLESSLY :mrgreen: Because we now have a dynamic range, we can use a value from 0 to 1.58 and the file size difference is HUGE, compared to using a static 0.2 value for luma. I've set the function so that it also protects the value not going above the max value allowed. ( I just love the "?" C's conditional operator :wink: ) -kwag |
That sounds GREAT!! I'll try the script out tomorrow... FANTASTIC!!
How would you limit the max value to let's say 0.8... I wouldn't go any further than that on the LumaBlur... :wink: So this is only for AviSynth 2.51 right? :? By the way, TemporalSmoother is not available for AviSynth 2.51... So we gotta find something different there! |
Quote:
So we can take advantage of this. If you still want to limit, just change the line "MaxThreshold=1.58" to 0.8 :wink: Quote:
Quote:
-kwag |
If you want to see the value being applied dynamically to mergeluma, add the line in bold:
ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))") ScriptClip("Subtitle(String(val))") Of course, the max value will be 1.58, even if it shows spikes above that value!. Now open your .avs in VirtualDub and have some fun :) -kwag |
Is file prediction posible with this new script :?: :?
|
Quote:
Add these lines to the bottom of your script: interval = round((FrameCount/24)/60) # Interval spacing nFrames = 24 # Frames per sample SelectRangeEvery( (round(framecount/interval)),nFrames) That's for the full sampler, and for NTSC FILM. PAL people, change the (24) to (25). If encoding a 29.97fps NTSC movie, change it to (30) -kwag |
Then i guess is back to work for Hedix & Muaddib. :D
|
Here's the fixed prediction lines for 10% : 100%:
Code:
interval = round((FrameCount/24)/60) # Full sample. |
Quote:
|
Here's a small clip, showing (as a numeric subtitle) the value being applied dynamically to each frame by the function :wink:
www.kvcd.net/dynamic-adapt.mpg -kwag |
Quote:
It has to be tried 8) Right now, I'm having a ball with this new dynamic filter, just as it is :!: I've been able to increase the CQ by 3 to 4 values higher that previous encodes :mrgreen: -kwag |
If you stop the Cam when is moving you can see all Blur witch is the Idea here because the eye is just to slow to see that, so i gather that will benefit from this with a high action movie.
|
Bourne identity man i had a headache with that movie i wasnt able to get a good encode out of that one. Specially with the begining of the movie. :BangHead:
|
Quote:
You can't see details anyway on high speed pannings, and this way we achieve maximum compression :mrgreen: The way I see it, is that this can be wrapped up in a function with "Selectors", so we can "plug" different filters at different thresholds. For example, we could have "blockbuster noise" ONLY when there's no action AND the scene is dark :idea: So we can use static filters and mold them for use in dynamic scenes :idea: Now this is really fun :mrgreen: -kwag |
Quote:
-kwag |
Just when.......
Brilliant development. Loved the clip. Kwag what file size difference are you getting for same CQ? Can't wait to try. ozjeff99 |
Quote:
mergeluma(blur(0.2)) is ~100KB+ larger than the same clip with: ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))") :mrgreen: So you figure what the gain will be on a complete movie 8) Edit: Current script thread updated :!: -kwag |
Wow.....10% right there on that clip.
Extraordinary !!! |
============
KWAG : "The way I see it, is that this can be wrapped up in a function with "Selectors", so we can "plug" different filters at different tresholds. For example, we could have "blockbuster noise" ONLY when there's no action AND the scene is dark :idea: So we can use static filters and mold them for use in dynamic scenes :idea: " ============ @ Kwag !!! Brilliant , Just BRILLIANT !!! I love this script and clip is something too!!!! I would love very much to get Blockbuster work dinamically cos it's dropping down CQ about 3-5 units and with this script maybe we could return to CQ without BlockBuster ??!!! Excellent work , man !!! I feel it's going to be hot in here , hu-u-u-h :!: :wink: What about encoding speed ??? Does this script affect encoding speed anyway ??? bman |
Hi bman,
First, let's thank the people who made this possible, in the correct order :D (1) sbin, for starting this thread, and pointing us to "another" link 8) (2) sagittaire, for the original idea and original script. (3) Tenra, for shrinking the complete idea way down to a very simpler script :mrgreen: (4) Everyone here that has made comments and has interest in this stuff :) And now the script is even smaller, and with a "cap" condition, not to go over the MAX value allowed, still in a single line :wink: So it fits nicely in the "current script", it just simply substituted the old "mergeluma" line :!: I haven't done any speed benchmark, but actually the speed is faster with AviSynth 2.5x than with 2.0x. I will do a full encode today to see the stability of AviSynth 2.51. And yes, I think this will become a VERY hot thread. And I LOVE the results just as they are right now :mrgreen: -kwag |
First , I agree with u KWAG and THANX to ALL those wonderful ppl who takes this tread and forum forward in right order as KWAG wrote :D :D :D
Second , I already sead once - In this FORUM we get excitement almoast every week and cos of that we are here :wink: :wink: :wink: Every time different tread with original ideas and tweacks :wink: I just love this ! NOW back To the business ! @ KWAG ! Any thoughts how exectly can BlockBuster work In similar conditional Script ? It have to be operated by brightness value , Right ??? :? :? If brightness<val then Blockbuster("noise") something like that ??? bman |
Oh, man! I really wanted to try out this new exciting script. But when I'm trying to load the script into TMPGEnc I get the following error:
Script error: there is no function named "ScriptClip" :cry: Has anybody else got this error? What am I doing wrong? This is what my script looks like: LoadPlugin("C:\Program\AviSynth 2.5\plugins\MPEG2Dec3.dll") LoadPlugin("C:\Program\AviSynth 2.5\plugins\Decomb.dll") LoadPlugin("C:\Program\AviSynth 2.5\plugins\UnFilter.dll") LoadPlugin("C:\Program\AviSynth 2.5\plugins\STMedianFilter.dll") LoadPlugin("C:\Program\AviSynth 2.5\plugins\TemporalCleaner.dll") MPEG2Source("D:\DVD Rips\The Score\The Score.d2v") MaxThreshold=1.58 FieldDeinterlace() # Telecide() # Decimate() UnFilter(50, 50) BilinearResize(480, 576) STMedianFilter(8, 32, 0, 0) TemporalSoften(2, 7, 7, 3, 2) MergeChroma(blur(1.5)) ## Dynamic linear adaptive filtering ## ScriptClip("val=YDifferenceFromPrevious()/14.55" + "val > MaxThreshold ? MergeLuma(blur(MaxThreshold)) : MergeLuma(blur( val ))") ## Limiter() ConvertToRGB() Please help me out here guys! |
Quote:
Maybe you have an older version of AviSynth 2.5x :idea: Get the latest here: http://cultact-server.novi.dk/kpo/avisynth/avs_cvs.html -kwag |
Got a :?: can I install avisynth 2.51 and still have 2.0 install :?: will there be any conflict by having the two install at the same time? I know there is a way but don't know how, andale Kwag. :)
BTW these thread is hotter then todays DAY in the Island. :mrgreen: |
Damn Kwag, that was fast! :lol: I'll try the version you linked to. If I'm still having problems I'll let you know... :wink: Hold on a minute... Downloading...
Okay, Kwag, you were absolutely right! The new version worked! Thanks alot! BTW what exactly are the resize parameters and what do they do? Another question: To use "TemporalSoften" I need to load "TemporalCleaner.dll" for AviSynth, don't I? |
Quote:
Code:
LoadPlugin("C:\Filters25\MPEG2Dec3.dll") I've over enhanced the "noise" so that the results are obvious, but I assume you get the idea of what can be accomplished now ;) Enjoy the show :mrgreen: -kwag |
Quote:
use AvisynthSwitcher :!: http://www.kvcd.net/forum/viewtopic.php?p=20939#20939 :) |
Cool Kwag!
What parameters do you have to change (for BlockBuster) to get rid of the text in the top of the picture and to get a "normal" amount of noise? Sorry if I'm asking stupid questions, but I have no idea on how these new scripts work... :oops: @Kwag Does your latest posted script include the linear "MergeLuma" function for low/medium/high action scenes as included in the Optimal Script? I also need to get help with the resize issue. 1) How does "BicubicResize" work, and what does the parameters stand for? 2) Is it possible to use "BilinearResize" instead? I'm normally coding PAL movies so I need help with the resize parameters for PAL movies (usually 16:9). Preferably for both Bilinear and Bicubic resizing... 3) How do I set up TMPGEnc to get the correct aspect ratio? A lot of questions, I know.... :wink: |
I'm trying to encode AVS2.51 but can't find unfilter() function and can't get vsfilter() working :( :( :(
Any help where to get right versions of those 2 :?: :?: :?: bman |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
-kwag |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.