View Full Version : Does the order of avisynth filters matter?
videocheez
3rd May 2003, 09:23
I'm new to using avisynth for frame seving to CCE. Each time I try encoding AVI to DVD, I haven't satisfied with the quality. I have had better quality when using TMPGE to encode. I believe that the reason i haven't seen great quality with CCE is because I don't know how to order or correctly apply the avisynth filters and plugins. Below is my little script that I going to attempt. I would like to know if I have ordered the filters and plugins correctly. Also I would like to receive a suggestion about what is a good filter or plugin for smoothing out blocky backgrounds. Usually the results of my CCE encodes show the main actor with nice clarity but the "sky" or the "wall" or the "dirt" behind the guy looks blocky. I can see the pixels. Is there a filter or plugin that is able to fix the quality problem thatI have described?
LoadPlugin("C:\avs plugins\Gripfit_preview.dll")
aviSource("C:\cce encoding\analyze\analyze.avi")
ConvertToYUY2()
GripCrop(720,480)
GripSize(resizer="BiCubicResize")
LoadPlugin("C:\avs plugins\DustV5.dll")
LoadPlugin("C:\avs plugins\MSharpen.dll")
LoadPlugin("C:\avs plugins\Convolution3D.dll")
GripBorders()
ResampleAudio(48000)
Thanks in advance,
VC
lamer_de
3rd May 2003, 11:55
What are these weird Grip... filters? I've never seen them and they aren't part of avisynth (at least they aren't listed on avisynth.org)
And you're loading only the filters with LoadPlugin, but you still have to use them ^_^
I don't encode to MPG2, but I think your problem in the background can be fixed with Lumafilter() or the Blockbuster filter. Alternatively try some smoothing filters like convolution3D or deen.
And your resize lacks the parameters aswell ;-)
CU,
lamer_de
let's state the obvious and say, well, then, use tmpgenc :rolleyes:
videocheez
3rd May 2003, 19:12
Thanks lamer_de. I will try your suggestion. Gripfit is a filter that is used for resizing an avi with no worries about cropping or adding borders. It will resize an avi and maintain the aspect ratio. I have tried it a few times and it seems to work out nicely.
You can get it at http://www.jungleweb.net/~sansgrip/GripFit_preview_0.0c.zip
What do you mean by "And you're loading only the filters with LoadPlugin, but you still have to use them ^_^? Am I not using them correctly?
What do you mean that my resize lacks parameters?
Thanks in advance,
Wotef I'm trying to learn CCE because I like the speed. If I wanted to continue usine TMPGE I wouldn't be asking the question. Why even bother responding to a post if you're only going to offer rude arrogant comments? Isn't the purpose of the forum for sharing knowledge between those who have a common interest? When you become a senior member,does that give you the right to insult newbs?
VC
hey man, sorry if you thought it was arrogant - wasn't meant to be
and cause it says "senior" next to my name that don't mean nothing much at all so you really have no need to feel so persecuted :(
and i was serious actually, i prefer tmpgenc to cce, despite the infernal overhead in terms of processing time
see, if you only get this crappy result with cce, then my point is why bother trying to ameliorate things in avisynth? why waste your time with filters counteracting what is_an_encoding_problem_in_cce? when you already have an acceptable and good quality result with tmpgenc?
that's all i'm saying - feel free to disagree and continue to pursue your issue, but nowadays i tend to think "well, i already have a good solution, i'll just go with what bloody well works", e.g. like the story of alexander and the gordian knot (not the wef) :p
lamer_de
4th May 2003, 09:10
Didn't know about GripFit (well, mainly beacuse it's useless to me as I don't do SVCD ;) )
Am I not using them correctly?
I assume you want to use Dust, Msharpen and con3d, but you are only loading them to avisynth. you have to use them aswell.
Example:
LoadPlugin("C:\avs plugins\Convolution3D.dll")
Convolution3D(preset="movieLQ")
You can find the exact parameters in the readme provided with the filters.
AFAIK CCE is only usefull if you use more than one pass VBR. But of course I could be wrong here.
CU,
lamer_de
scmccarthy
4th May 2003, 13:55
@videocheezWotef I'm trying to learn CCE because I like the speed. If I wanted to continue usine TMPGE I wouldn't be asking the question. Why even bother responding to a post if you're only going to offer rude arrogant comments? I think your being over-sensitive. Granted it is stupid to try to promote TMPG over CCE, they wouldn't both be so popular if they didn't both have their strong points.
But if you wanted to give wotef the benefit of the doubt, you could assume he's suggesting an option he thinks you might not have considered. Then you could say thanks but I already know how to use TMPG and I'm trying to learn a new application to see if it works for me.
I don't see what's so insulting about having an opinion that TMPG is better than CCE.
Stephen
PS I assume you never meant to use dust and your just loading it because it is part of a pre-existing template that you edit every time you switch avi files.
Wilbert
5th May 2003, 13:55
What are these weird Grip... filters? I've never seen them and they aren't part of avisynth (at least they aren't listed on avisynth.org)
It's one of Sansgrip's filters (more info at http://www.kvcd.net/forum/viewtopic.php?t=2292). Now that I'm reading that thread more closely, it is actually a nice (v2.0x) filter if you don't use GKnot/DVD2SVCD.
videocheez
7th May 2003, 07:38
You guyz are right I was being too sensitive. I gotta lighten up. Anyways, I like TMPGE for it's ease but obviously the speed is not too good.
Lamer wrote that I am not even using the filters in the little script.
LoadPlugin("C:\avs plugins\Gripfit_preview.dll")
aviSource("C:\cce encoding\analyze\analyze.avi")
ConvertToYUY2()
GripCrop(720,480)
GripSize(resizer="BiCubicResize")
LoadPlugin("C:\avs plugins\DustV5.dll")
LoadPlugin("C:\avs plugins\MSharpen.dll")
LoadPlugin("C:\avs plugins\Convolution3D.dll")
GripBorders()
ResampleAudio(48000)
He then gave the following example of the correct application convolution script:
LoadPlugin("C:\avs plugins\Convolution3D.dll")
Convolution3D(preset="movieLQ")
I tried it and when I viewed the avs on media player, the movie looked very black. The opening portion with all of the Warner Bros. stuff was clear but the main movie looked black.
Also would some one be kind enough to write a couple of lines showing the proper application of the above listed plugins that I have listed am not using properly, I having troubles with the readme files.
Thanks in advave
VC
Wilbert
7th May 2003, 09:24
Forget that Grip-stuff for a moment. Tell us what version of AviSynth you are using, and what the resolution of your avi is (I guess it's DivX/XviD?).
First, load all plugins. Load your avi, and apply the filters. I can't tell you how to crop/resize, because I don't know the resolution of your avi.
LoadPlugin("C:\avs plugins\Convolution3D.dll")
AviSource("C:\cce encoding\analyze\analyze.avi")
Convolution3D(preset="movieLQ")
ResampleAudio(48000)
MasterYoshidino
7th May 2003, 16:53
yes, filter order is important. it determines the compression and quality of encoding.
I recommend (this is for good looks in movies and compression)
First Crop
Then apply Spatial Filters to increase gradient colors/compressability
Then Temporal Filters should be done.
Now resize
Spatial before temporal as its the difference between frames that determines compressability. If you did it the other way, then what has been temporally smoothed may end up being blurred more or look like a dancing background from imperfections in frames. Remember, temporal is always last filter to use before resize.
:D
Remember, temporal is always last filter to use before resize.
I always wondered where I'd been going wrong all these years ;)
I think definitve answers to these type of questions is very difficult/subjective/subject to change and should be avoided if possible :)
regards
Simon (who personally doesn't spatially filter unless dealing with 3rd generation VHS tape :) )
scmccarthy
9th May 2003, 16:13
@videocheez
LoadPlugin does not do anything but make the plugin available to the script. So this:
LoadPlugin("C:\avs plugins\Convolution3D.dll")
Won't affect your encode at all. Try:
Convolution3D(preset="movieHQ") instead of
Convolution3D(preset="movieLQ")
or don't use it at all.
Stephen
timekills
17th May 2003, 08:42
Of course, you could always invest ina dual-processor computer, which will allow TMPGEnc to work as fast - or faster than - CCE, I've found.
I still use CCE though. I just encode multiple items at once. :)
I do wish CCE would encorporate SMP support.
Back on topic, although it is not wise to generalize, as stated by siwalters, I'd still have to agree that Spatial before Temporal is a safe rule of thumb.
That being said, perhaps if we knew what you were trying to encode...? I've found the KISS soultion often works best with CCE. You can *definitely* over filter when you get Avisynth-happy.
videocheez
18th May 2003, 02:03
Thanks for the advice guyz, I have another couple of questions.
What is a spatial filter and what is a temporal filter. I suppose i was going to try applying filters at random without really knowing the outcome to see if I could enhance the quality of my encodes. I have been doing little five minute conversions and documenting the outcome.
Currently I am trying to encode and Xvid using the following script:
aviSource("C:\cce encoding\ring\cce\ringnb12.avi")
ConvertToYUY2()
LoadPlugin("C:\avs plugins\Convolution3D.dll")
Convolution3D(preset="movieHQ")
LoadPlugin("C:\avs plugins\Gripfit_preview.dll")
GripCrop(720,480)
GripSize(resizer="BiCubicResize")
GripBorders()
ResampleAudio(48000)
I receive the following error when trying to load my script into WMP:
ACM failed to suggest a compatible PCM format.
What does this mean?
Also how would I resize a file from 640x352 to 720x480? I like gripfit because there is no math involved.
Thanks in advance,
VC
Boulder
18th May 2003, 10:47
You get the error message because you probably have an AC3 audio track in your source file. You can disable audio by using aviSource("C:\cce encoding\ring\cce\ringnb12.avi",false) instead of aviSource("C:\cce encoding\ring\cce\ringnb12.avi").
JohnMK
9th June 2003, 21:56
Is it OK to deinterlace after cropping?
Boulder
11th June 2003, 06:21
Originally posted by JohnMK
Is it OK to deinterlace after cropping?
I think that only if you crop horizontally and not vertically. It's recommended to deinterlace first and then do the rest of the processing, including cropping.
trbarry
11th June 2003, 14:16
I tend to crop first, then deinterlace since it's a bit faster that way, especially if you are removing large black bars. Just make sure you crop a multiple of 4 off the top in YV12 (2 in YUY2) and an even number off the left.
Some deinterlacers may also have specific requirements for height and width multiples, usually at least mod 4.
There may be a few exceptions but generally after cropping deinterlacing should be before everything else.
- Tom
To answer your question, I would recommend loading all your filters at once, and then go through and order the call to the filters like such (I am assuming that you are using AVisynth 2.5 from the ConverttoYUV2()(if not the code changes (In any casem you should use the 2.0 version of convo3d and loadpluginex.dll (part of warpsharp package) to load it and dust.dll amd any other 2.0 filters):
LoadPlugin("C:\avs plugins\warpsharp.dll") (change to favorite sharpener)
LoadPlugin("C:\avs plugins\loadpluginex.dll")
LoadPlugin("C:\avs plugins\Gripfit_preview.dll")
LoadPlugin("C:\avs plugins\DustV5.dll")
LoadPlugin("C:\avs plugins\MSharpen.dll")
LoadPlugin("C:\avs plugins\Convolution3D.dll")
aviSource("C:\cce encoding\analyze\analyze.avi")
ConvertToYUY2()
Convolution3d(preset="MovieHQ")
Pixiedust() (forget if this is the right call, im at work)
#play with pixie and convo to find the right ammount of noise removal,
add spacial filter, what have you
#I dont know what grip does
GripCrop(720,480)
GripSize(resizer="BiCubicResize") (I would recommend Lanzcos here cause
convo3d blurs)
GripBorders()
Warpsharp(15) (adjust strength to movie blurryness or use another sharpening filter
{cause convo3d blurs the image})
ResampleAudio(48000)
NOTE: Im an anime guy, so this changes if your doing a movie. This is all just supposition, and the code will need lots of tweaking depending on what your doing.
As for filters, I would recommend reading Avisynth FAQ- Filters (http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces) and the rest of the faq as well.
videocheez
27th June 2003, 07:55
Thanks for your advice. I feel like I need to be a programmer in order to become proficient with Avisynth, nevertheless I'm going to keep fooling around with it and try different filters when needed.
Thanks,
VC
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.