digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Mipsmooth adjustments? (http://www.digitalfaq.com/archives/avisynth/6724-avisynth-mipsmooth-adjustments.html)

rendalunit 11-15-2003 07:37 PM

Avisynth: Mipsmooth adjustments?
 
Code:

DirectShowSource("C:\My Documents\video.asf",fps=29.97)
ConvertToYV12()

mipsmooth( Spatial= 50,
\          Temporal= 50,
\          Spatial_Chroma= 50,
\          Temporal_Chroma= 50,
\          Scenechange= 0,
\          Method="Soft",
\          Downsizer="Bicubic",
\          Upsizer="Bicubic",
\          Scalefactor= 0.55,
\          show=false)

BicubicResize(528,480)
Unfilter(75,75)

I tried this on an asf video clip that was completely blocky and mipsmooth performed miracles on it :D It seems difficult to fine tune the parameters though because there's hardly any noticeable difference between for example spatial=50 and spatial=55. The scalefactor however seems to be very sensitive. Also when the sizers where set to "Bilinear" there where strange 'patches'.

I wish that I could make the adjustments with a preview window like with vdub filters

ren

Dialhot 11-15-2003 07:49 PM

You can test an avisynth script and see immediatly the results on the movie while it is playing by installing "ffdshow" and configure it to handle "raw video" for all suported format.

There is an "avisynth" tab, you will see. I always use it to test new filters !

Note: I dropped Mipsmooth because of what you mentioned :-). So if you can find good settings, tell us :-D

rendalunit 11-16-2003 01:12 PM

I installed the latest ffdshow I could find (20021213) but I didn't see an aviysnth tab. Changing a filters parameters while the clip is playing is what I'd like to do.

Thnx,
ren

Dialhot 11-16-2003 01:56 PM

You have a version that is one year older than the real last one (20031028) :-)
Go there :

http://www.codec-download.com/module...ownload&cid=32

Note: I foudn postprocessing bugged in the two last versions so I'm currently using 20030523

sh0dan 11-16-2003 04:04 PM

Sorry I forgot to tell y'all

Hi!

Another goodie for you. This one gives a significant quality boost IMO.

MipSmooth 1.1:

* Added weigh = true / false. This offers a softer blurring, like soft matrix in C3D or weighed average in SmoothHiQ.
* Scenechange was only half of what it was supposed to be. All presets adjusted.
* Presets adjust - generally doing less blurring.
* Custom presets should be recreated

Note: To recreate previous smooth mode, use "weigh=false", if you use supersoft or superstrong.

Download from: http://cultact-server.novi.dk/kpo/av...mipsmooth.html

Regarding thresholds, finding chroma differences that are greater than 50 is quite rare. Try out the new 'Histogram(mode="levels")'. The two lower graphs are chroma levels.

Dialhot 11-16-2003 04:33 PM

Quote:

Originally Posted by sh0dan
Sorry I forgot to tell y'all

Shame on you ! :lol:

Just kidding... Thank you Sh0dan.

rendalunit 11-16-2003 11:17 PM

Quote:

Originally Posted by DialHot
You have a version that is one year older than the real last one (20031028)

:lol: :lol: Doom9's link is a little out of date I guess!

thnx,
ren

rendalunit 11-24-2003 09:39 PM

I'm having lots o fun with this filter :!:

Encoding lots of streaming video content which is very blocky and noisy:

Code:

mipsmooth( Spatial= 100,
\          Temporal= 200,
\          Spatial_Chroma= 100,
\          Temporal_Chroma= 200,
\          Scenechange= 5,
\          Method="Soft",
\          Downsizer="Bicubic",
\          Upsizer="Bicubic",
\          Scalefactor= 0.90,
\          show=false)

BicubicResize(528,480)
msharpen().asharp()

It seems that if I set the temporal and spatial values too low then there are solid patches (is there a term for this?). In killing the blocks and noise, the picture gets pretty soft and msharpen().asharp() works great to sharpen it up. The scalefactor param seems to be sort of like a "strength" setting where the lower the number, the stronger the effect. Scalefactor=0.55 is much stronger than 0.90.

Is anyone else using this and can share your script? This is very much trial and error for me to find good settings. Also I'm not very happy with the presets and would like to make my own.

Thanks,
ren

digitall.doc 11-26-2003 11:38 AM

Hi rendalunit:
I've done several tests with this filter, and I'm happy with its performance in general. Sorry, I cannot post now my scripts, but if you're interested in any of them, make me know and I'll post as soon as I can.
I work always on captures, usually good quality sources, but captured. I first tried mipsmooth in the MA, instead of STMedianFilter(8,32,0,0,8,32), and with VagueDenoiser after TemporalSoften in the adaptive part of the script. It worked very well, very clean films. But I had to leave it due to veeeery looong encoding times. :cry:
I recently begun to use it again, version 1.1, in a modification of the MA script: intead of using the adptive part, I substituted it with FMF filtering. And I tried MipSmooth in the FMF filter part.... buf, don't find words to explain. Lots of problems. The parameters that I made to change according to motion level were spatial, temporal, spatial_chroma, temporal_chroma and scalefactor. But I got lots of "Avisynth caught a violation error at xxxx trying to read data from xxxx", or a error message like this :x . I explain the changes I tested:
First downsizer and upsizer changed to "bicubic".
Second, avoid using value 0.6 (source YV12).
And I think that third, I made scalefactor a constant value (0.85 in low motion, 0.75 in medium motion, and 0.55 in high motion). And after that worked. Still didn't see the test on screen, just encoded it.

Then I tried TemporalSoften and Unfilter in FMF, and MipSmooth instead STMedianFilter(3,3,1,1). Setting: preset="movieHQ". And also "Avisynth caught...bla, bla, bla". I tried the same as in my FMF test, and at last it worked putting the filter after undot and before resizing !!??. Didn't see also the test, loked nice in mediaplayer.

My settings in FMF:
Spatial from 0 to 11
Temporal from 10 to 0
Spatial_chroma from 3 to 12
Temporal_chroma from from 12 to 5
Scale factor from 0.99 to 0.5 (but then I had to change it as I said before)
Upsizer and Downsizer: "bicubic"
Method: "supersoft"
Weigh=true

As you see very low parameters comparing to yours, but I think better source, and more filters in the script. Have you tried values for scalefactorabove 1, as sh0dan proposed in the documentation?. And what do you think of the problems I had, are they due to FMF filtering, or does it depend on the location of MipSmooth in the script?. I'll post later how the tests look (I made use of stackhorizontal to compare with MA).

Jellygoose 11-26-2003 11:42 AM

I'm testing this filter too, and I'm having good results.
I kicked the STMedianFilter out of the MA script, and instead put MipSmooth(preset="MovieHQ") before the resizing.

Helps a lot killing mosquitos and makes the picture looks more stable. Great filter! :wink:

digitall.doc 11-26-2003 11:58 AM

Hi Jellygoose:
you say to put it before resize.. for better quality?, or did you have the problems I described before for putting it after resizing?.
And yes, I like it's quality, just needs to be faster, and will be 8) .

Jellygoose 11-26-2003 01:33 PM

I put it before resizing for quality reasons... Never had problems with that filter (this version...) :roll:

digitall.doc 11-26-2003 02:23 PM

So, all problems I had, are maybe due to the employ of FMF filtering. Do you think so?. And I'm thinking about making MipSmooth also motion adaptive, like TemporalSoften and Unfilter in the MA script. Don't you think it will allow to filter more spatially in fast scenes and more temporally in quiet scenes?. As we are filtering later in the adaptive part, will it be useful?. Could we replace TemporalSoften and Unfilter with just this filter, adapting parameters to motion?. Just thinking in loud voice (direct traslation from spanish, I don't know if it's correctly said). :wink: :lol:

Jellygoose 11-26-2003 04:15 PM

Hi digitall.doc...

I gotta admit I had no time to take a closer look at FMF yet, but I'm almost certain that any AviSynth errors you got by using MipSmooth are due to FMF filtering.
If you ask me, MipSmooth is not a substitute for TemporalSoften and Unfilter. Although the Temporal part of MipSmooth might be very similar to the TemporalSoften command, it uses a whole different approach in Spatial Smoothing than Unfilter does. Just read the docs, you'll be amazed how simple Unfilter is in comparison to MipSmooth!
Right now I'm at the state of going back to more static scripts since I can clearly see some advantages here. It's a good idea to do blurring on very high action scenes, but there are also many problems that arise... When movement is only in the background the foreground will be blurred too and so on... It's a matter of taste, you just have to know what you like! :wink:

BtW: Valencia is a beautiful city, visited it once a couple of years ago!

digitall.doc 11-26-2003 06:55 PM

Hi Jellygoose:
yes, I'm concerned with too much blurring in high action scenes, and I even modified in some cases the MA to get less blur (unfilter with -nf*1.5 instead -nf*2). The file grows in size but better looking (but the basics of KVCD is getting the better quality in low sized files).
If MipSmooth does a more complex spatial filtering, I suppose it can be better tweaked to do unfilter job, isn't it?. We have spatial and spatial_chroma. But we can also play with up and downsizers, scalefactor, method,... We have the rendalunit experience, for instance.

I'm glad you enjoyed Valencia. And I have a couple of friends from Germany (came to Valencia with Erasmus project), very nice people.

sh0dan 11-27-2003 04:02 PM

Cr*p - I just realized that weighing is always disabled!

I'll post a new version ASAP!

digitall.doc 11-28-2003 04:53 PM

Hello sh0dan:
I'm testing a "motion adaptive MipSmooth", to substitute in some cases the motion adaptive part of the MA script. Right now, I'm testing this:
Code:

ScriptClip(" nf = YDifferenceToNext()"+chr(13)+ "sfc=(nf<6)?0.9:(nf>15)?0.5:0.7"+chr(13)+ "MipSmooth(spatial=fmin(round(nf*2),80),temporal=fmax(round(80-(nf*2)),0),spatial_chroma=fmin(round(nf*2),80),temporal_chroma=fmax(round(80-(nf*2)),0),scalefactor=sfc,scenechange=3) ")
I still have to see the test on TV, in the monitor looks a little blurred, similar to MA (and that's what I want to avoid). Any suggestions to my ScriptClip?.
And I have another problem: I cannot change method, downsizer, nor upsizer, because when I put a text between "", I get an error: "expected , or )". I tried giving a variable the value (i.e. "bicubic"), but as I give the value in the ScriptClip function, I get the same error. Can I set these parameters with numbers instead of a string?.

rendalunit 11-29-2003 04:59 PM

sh0dan,

I'm looking forward to the corrected MipSmooth in which Weigh can be activated, thanks :D

digitall.doc,

What range of values do you get with Spatial, Spatial_Chroma in your motion adaptive script? I'm finding there is still weirdness around edges at times- this is much worse with lower Spatial and Spatial_Chroma values though. Have you seen this weirdness that I'm talking about? I could post a screenshot.

Another observation was that if upsizer and downsizer are both set to "point" then there is a black line down the middle of the film.

In one film there was very bad "ghosting" and by lowering the scene change from 10 to about 3 fixed the problem.

I tried scalefactor values above 1 but it was extremely slow. I'm having good luck with values between 0.50 and 0.99

For some big time smoothing I like mipsmooth the best for that- so far.

ren

digitall.doc 11-29-2003 05:55 PM

ren,

spatial and spatial_chroma get the same values, between 0.00... in low action scenes, and 80 in high action. But with this values I get a blurring like in MA, so I'm testing lower max values. I think I understand what you mean with weirdness around edges... do you think it's due to mipsmooth?. I donīt think so. I'm comparing with MA, and I see the weirdness also there, even less with mipsmooth. Have you tried vaguedenoiser before mipsmooth?. Hmm, yes, slooower. But much cleaner surfaces.
I always set scenechange to 3.
And, as you can see from my code, I use three scale factor values: 0.9 in low action, 0.7 in medium and 0.5 in high, something like you.
Do you know if I can set method, up and downsizer with numbers, instead of a string?, or even better, how can I put a string value in mipsmooth in the scriptclip function without getting an error?
Sorry, always making questions. :oops:

rendalunit 11-29-2003 06:34 PM

Quote:

Originally Posted by digitall.doc
how can I put a string value in mipsmooth in the scriptclip function without getting an error?

Yeah I see what you mean. I think I got a fix:

Code:

AviSource("C:\My Documents\movie.avi",false)

UpSizer_Type="bicubic"
DownSizer_Type="lanczos"

undot()
Limiter()
asharp(1, 4)

LanczosResize(352, 480, 6, 0, 499, 384)

STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "MipSmooth(upsizer=UpSizer_Type, downsizer=DownSizer_Type).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1)  ")

Limiter()


function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

I replaced UnFilter with MipSmooth on the scriptclip line and I specified the upsizer and downsizer parameters to the variables that I declared at the beginning of the script (UpSizer_Type and DownSizer_Type). I didn't get an error so I think it works

I haven't tried VagueDenoiser with Mipsmooth yet :!: Good idea- trying it now :D

ren


All times are GMT -5. The time now is 04:37 PM  —  vBulletin Đ Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.