Log in

View Full Version : neebie avisynth + staxrip question.


Betsy25
11th March 2009, 21:35
I have some quite newbie question.

I just took my first steps with avisynth, and tried out some simple standard filters.

Now the situation :

- I encoded a movie to x264 .MKV in Staxrip (no avisynth filters used)

- I compared the .MKV with the same file but now using some basic avisynth filters.

This is the script :
a = Directshowsource("Oscar.mkv").converttoyuy2()
last = a
c = UnDot().LimitedSharpenFaster()
StackVertical(a,c)


... and I find the slightly filtered .mkv a bit better than the unaltered .mkv

Now I understand that I probably had to do this BEFORE I encoded the movie, so I must feed some avisynth script to Staxrip for it to encode to .MKV again.

Questions :

1) What has to change in the script, so Staxrip will encode it with the avisynth filters properly applied ?

I only know I have to point the script to the VTS_01_1.d2v file instead of an .mkv file, do I have to add .converttoyuy2() to this file too ?

2) Is UnDot().LimitedSharpenFaster() a recommended method, or is there something I don't know ?

Thanks.:helpful:

BigDid
11th March 2009, 23:06
Hello Betsy,

I will let the avisynth gurus answer for the script constitution, just wanted to let you know:

1/ Staxrip is no longer updated, So if you begin with it you may want to consider another x264 auto/semi auto GUI

2/ Concerning the filters;
- undot() is a very minimalist tiny noise remover (dots) equivalent is removegrain(mode=1); removegrain() has different modes for different uses/strength
- LimitedSharpenFaster() is a very powerful sharpener (to make a blurry movie crisp/sharp); you need to tune some parameters to adapt to your source movie and/or the sharpening wanted etc...

3/ If not already started you may want to read/understand/test the use of avisynth and different filters; see
- avisynth documentation on your computer
- Wiki for avisynth
http://avisynth.org/mediawiki/Main_Page/
- Some stickies here
http://forum.doom9.org/forumdisplay.php?f=33

Many many things to understand/master when using avisynth; happy learning.

Did

burfadel
11th March 2009, 23:32
Staxrip is open to development, just needs people willing to do it!...

Sharc
11th March 2009, 23:39
1) What has to change in the script, so Staxrip will encode it with the avisynth filters properly applied ?

Assuming your source is mpeg2, you can open this script in StaxRip (as Source):

loadplugin("....your path here...\DGDecode.dll")
mpeg2source("...your path here...\xxxx.d2v")
UnDot()
LimitedSharpenFaster()

You may want to test the script beforehand in MPC.

Long live StaxRip!

Betsy25
11th March 2009, 23:57
OK, I just found out how to insert UnDot().LimitedSharpenFaster()
into the Filters list, just below the Crop filter. I was quite easy actually.:)

BigDid, Thanks for pointing me out about removegrain !
Right now, for a test, I'll just encode using UnDot().LimitedSharpenFaster() and see the result.


I'm so used to StaxRip (and it's great compressability check). This GUI is just so polished and easy, It's a real shame Stax has left it, his programming skills and logic thinking will really be missed.:(

Hoping someone as skilled as Stax will not let this masterpiece go to dust. *Fingers crossed*

Betsy25
13th March 2009, 18:17
Sorry to bump this topic up again, but I have another rather newbie question.

Regarding avisynth filters like .UnDot() and .LimitedSharpenFaster()

Where are these filters best placed ?
I mean between which steps in StaxRip (or any other Encoding GUI)

1 Here ?
2) Crop Borders
3) Resize
4) Or here ?

:helpful:

BigDid
13th March 2009, 19:02
...
Regarding avisynth filters like .UnDot() and .LimitedSharpenFaster()

Where are these filters best placed ?
...:
Hi,

Usually and for SD sources:

crop
#all following only if needed...
deinterlace
resize
Adjust colors
denoise
sharpen


Any filters or script can be used line after line (and each line disabled with "#") or chained with a dot "." in between

A common mistake is to over-strength a given filter; ex if you over denoise like degrainmedian(mode=1) you will remove grain noise AND film details; than you will need an oversharpen to try get some details back like limitedsharpenfaster(strength=300) and you will end with plastic looking faces :eek:

Did

[P]ako
13th March 2009, 21:03
I'd prefer to deinterlace before doing anything else to the video.

Betsy25
13th March 2009, 21:58
Thank you very much BigDid, learned a LOT from your post !

I always encode simple SD PAL DVD's, until now and always encoding for a 700MB CD-RW, I always used the Sharp resize filter in StaxRip :

LanczosResize(%target_width%,%target_height%)

Therefor, for a small target size (and target bitrate) like that, ain't it better to use some other resize method, like a more neutral :

BicubicResize(%target_width%,%target_height%,0,0.5)


... or should LanczosResize still be prefered for this lower bitrate encodings ? :thanks:

Sharc
14th March 2009, 07:51
You may want to do your own tests and make the choice of your preference. It seems though that the general "rule" is:
- LanczosResize or Lanczos4Resize for upscaling
- BicubicResize for upscaling or downscaling at reasonable bitrate
- BilinearResize for downscaling and/or when bitrate is scarce

My preference is
- Spline36Resize for up- and downscaling.

Betsy25
15th March 2009, 13:39
Thanks for the tip (and your countless other helpful posts) Sharc ! :thanks:

Actually, I didn't think of Spline36Resize until now, I thought it was some old, abandoned way of resizing.:rolleyes:
I always do downscaling, so i might have been wrong for a long time for always using the LanczosResize method. I read Spline36Resize is somewhat slower than Lanczos3, but that doesn't hinder me, would it be preferred to use Spline36 over the the other methods for downscaling at bitrates around 1000 ?

Thanks again ! :o

Sharc
15th March 2009, 16:13
I don't have too much experience with low bitrate encodes. I would just be a little cautious with applying sharpening filters because sharpened material is more bitrate demanding - possibly producing artefacts if your encode is size constrained. So for low bitrate encodes the simple, fast and slightly softening BilinearResize may be a good choice.
At the end you have to try and select what looks best for you.