PDA

View Full Version : AVSynth Filters


luphy
1st June 2004, 04:39
Excuse me if this is in the wrong forum or if it's a dumb question/request.

But regarding RB-Opt and the ability to use AVS scripts....I've heard several folks mention deen and undot. I've downloaded the dlls for those two (and a few others).

Could someone point me to a link/post that explains how to use these (geared for a beginner) in combination with RB-Opt and DVD-RB? I get a feeling that some of these filters may be very useful when compressing episodics since they tend to squeeze so many episodes onto one disc.

Or if someone is bored, maybe they can post a response as to how to use these from within RB-Opt and DVD-RB? :)

Thanks.

wmansir
1st June 2004, 06:59
These particular filters can only be used on progressive material. So if your doing a tv series, which is most likely interlaced, you may have to find a different filter set, or do some special processing (see avisynth usage forum).

1. Run prepare for DVD-RB. You currently cannot use filters with OPV, well you can but your final size will be off.

2. Run RB-Opt and open your projects REBUILDER.INF file.

3. To make things easier be sure and 'link' the VOBids you want to edit together. That way one edit will affect them all.

4. Select the VOBid you want to edit. click AVS editing button.

5. First you have to make the script load the plugin(s) you want to use. This can be done at any point before you use the functions in the script. I like to place it around the Mpeg2Dec2 Loadplugin line. So select that line number from the dropdown box and enter something like:

LoadPlugin("C:\myplugindirectory\undot.dll")

and click Add Line. Do the same for Deen.dll. Then click the 'test script' button to make sure it found everything ok. IF you get an error about 'can't find file' or something, reset the script and try again.

6. So we have our plugins loaded, but we haven't actually used them. To use the filters on the video we have to put them in at some point after the video is loaded (the Mpeg2source(...) line), but before it is converted to YUY2 (because some filters don't work in that colorspace). Also, if your video is being deinterlaced you should place the filter(s) after the 'FieldDeinterlace()' line. So pick a line in between those statements and add the line "Undot().Deen()" . The '.' is just a way of writting mutliple commands on one line, so

Undot().Deen()

is the same as,

Undot()
Deen()

Undot has no settings, but Deen can be configured. The readme won't be much help considering it's not very detailed, and in french. But searching the avisynth usage forum should give some good information, there is a translation of the readme here (http://forum.doom9.org/showthread.php?s=&threadid=69052&perpage=20&pagenumber=2).

7. Test your script, Apply, then save settings on the main page before exiting RB-Opt. Then encode as normal.

I also recommend the FluxSmooth plugin. It's action is very similar to undot.deen, but contained in a single plugin and with a simplified interface. It only has 2 parameters, to determine it's strength, so it is much easier to use the non-default settings.

luphy
1st June 2004, 12:07
Wow,

Thanks for that great tutorial wmansir. You should probably add that to a sticky/tutorial/FAQ or something.

DocDragon
2nd June 2004, 02:30
wmansir:

muchas gracias for the quick tutorial -- i will try it out as soon as i get home. i went through the avisynth forum before and got totally dismayed and cross-eyed!!! :scared: it's not like i do nothing else than sitting in front of the face-tanning monitor and read all that stuff. i'm trying to have a life as well. :D therefore, thanks a lot for this cheat-sheet. :p

i only wish quantum could come up with some "standard" filters for avisynth. his filters that he set up in a different thread are for CCE SP only and don't work with the basic version -- and i can only afford CCE basic. :rolleyes:

DD

bohemian
2nd June 2004, 18:27
Originally posted by wmansir
These particular filters can only be used on progressive material. So if your doing a tv series, which is most likely interlaced, you may have to find a different filter set, or do some special processing (see avisynth usage forum).....


After reading this comment by wmansir I did a search for a solution to processing interlaced material and found the following.

FYI: have only briefly tested this method, and have little experience in this area, so I am just presenting this info for anyone who may find it useful.

http://www.avisynth.org/stickboy/

From this site you will need the following scripts which need to be placed in your \AviSynth\Plugins directory
http://www.avisynth.org/stickboy/jdl-util.avsi
This script includes initialisation info and declarations which the other scripts on the page are dependent on,

and you will need http://www.avisynth.org/stickboy/jdl-interlace.avsi which includes the functions we need.

NOTE: when you download the files they will have a .TXT extension, just remove that extension so you are left with the .AVSI extension then place both files in the Plugins directory.

.........................

Now this is a post I found by DDogg which he explains how he uses this method. (I hope he doesnt mind me using his example)

(INFO taken from Stickboys own notes) Here JDL_UnfoldFieldsVertical Separates the fields in a clip and stacks them vertically regardless of field order, even fields are on top.

JDL_FoldFieldsVertical, Folds fields from a clip that resulted from calling JDL_UnfoldFieldsVertical. (I suppose that means it puts it all back together:))

QUOTE:
My limited understanding of Stickboy's [un]UnfoldFieldsVertical is that it takes care of all the stuff I don't want to think about the few time a month I do interlaced.

Assuming top field first, when dealing with 60i from a DVD source like an interlaced trailer, is this a correct usage?:

jdl_UnfoldFieldsVertical(flip=true)
Undot().Deen()
# resize here also if vertical resize?
jdl_FoldFieldsVertical(flip=true)

What I am looking for is the simplest way to take the commands from my progressive source scripts and move them over to the interlaced scripts with the least amount of effort. I suspect there may be a lot of other folks that would like a simple recipe also. Frankly, interlaced is just a PITA and good enough is good enough for a cheesy trailer.
.......................................

And as I understand, the line ConvertToYUY2(interlaced=true
must remain as the last line of the AVS file.

Now this is all said and done, is there anyone who can expand my knowledge of stickboys handy functions?
For example, I am unsure when I should use (flip=true) or just (true) with no flip in the two functions:)

DDogg
3rd June 2004, 03:00
To add to wmansir's always excellent advice, you might also just try inserting the simple line -

Import("d:\MyProgFilters.avs"), or Import("d:\MyIntFilters.avs") directly after the mpeg2source command. An import command like this simply make the contents of your import file become a part of the dvd-rb avs, just as if you had directly typed it in to it.

For my use, "myProgFilters.avs" (a separate AVS file) is normally:

Undot()
Deen()
#sometimes Fluxsmooth(5,5) or Fluxsmooth()

and as mentioned above, "MyIntFilters.avs" is:

jdl_UnfoldFieldsVertical(flip=true)
Undot().Deen()
#sometime convolution3d
jdl_FoldFieldsVertical(flip=true)


The nice thing about an import line is, by inserting just this one command in the dvd-rb avs files you could, in effect add like 50 lines to the avs, because each line you type in the your import file is added to dvd-rb's avs on the import. This way you can try all types of things in your filter.avs and then preview the dvd-rb avs in media player to make sure everything is working and you like the result. This keeps editing the dvd-rd avs to a bare minimum and keeps you out of trouble because once the single import line is inserted in the dvd-rb avs files all further editing is done on the YourParticularFilters.avs file.

btw, RB-Opt is a heaven sent program and I hope folks really appreciate robot1's fine work as it makes this filter stuff easy as pie for non OPV encodes.