Log in

View Full Version : Help needed to optimize my avisynth script


Dyolfknip
10th February 2006, 10:58
Hello!

I'm recently started to use avisynth and I would like to make a good script to encode my Friends (R2) season boxes to DivX. My current script looks like this:

mpeg2source("F:\Process\Project-1\Project.d2v")
tdeint(mode=0,order=1) or fielddeinterlace(full=true,blend=false)
crop(16,16,-16,-16)
bilinearresize(640,480)

I would like to know if I'm maintaining the original frame AR here? Source is quite noisy and I would like to clean it a little bit what filter do you suggest? Bitrate for video is 1973kbps and i think that it should be good enough for 640x480 frame size. I would be really happy if someone could post a script that would help me to get higher quality encodes.

My DivX 6.11 Pro settings are:
3xInsane mode
250 Keyframe interval
Bi-directional encoding as allowed by the home theatre profile
263h Optimized

Daodan
10th February 2006, 11:35
Unless we somehow have the same DVD how could we know if the AR will be correct or not? In your case if the AR of the original DVD was 4/3 than you're good. (I presume it is, most serials are). That TDeint is a good choice (you can try mvbob as well instead), but using mode=0 is useless (this is the default). As for denoiser, I usually find that a good job is made by DeGrainMedian (mode=2 or 3) (3 being less than 2). Or a combination of Removegrain+temporalsoften can give good results if the noise isn't big. These are pretty fast filters but they do their job well. And change that bilinear resize with a lanczos4resize. As for the choice of codec, I believe it is up to you.

Boulder
10th February 2006, 11:44
Friends should be progressive so you don't need to deinterlace. It might be a bad NTSC->PAL transfer but there are other ways than deinterlacing to deal with that.

You could try using GordianKnot to help you with the cropping and resizing while maintaining a correct A/R.

Dyolfknip
10th February 2006, 15:24
Thanks for the tips!

And what mode I should use inTDeint? AFAIK other modes double the framerate and I don't know how to deal with that. Oh and I'm not a GordianKnot kinda guy :-)

DGIndex says that the original AR is 4/3 but it also says that source is interlaced (I can also clearly see the interlacing). So if it is a bad transfer what should I do?
BTW how slow TDeint is? my Amd X2 @ 2.5ghz encodes only 15fps when I'm using it (with Decomb I can get aprox. 40fps)?

to Boulder: Miten jyväskylässä menee? :-)

Daodan
10th February 2006, 16:12
Well, don't trust dgindex that much. Make a d2v file (with honor pulldowns checked), load it in a avs, load it in vdub or play it in a player or whatever you want and scroll through some frames (one at a time). If the pattern shows: 3 progressive, 2 interlaced, and so on, than it'n NOT interlaced (use TIVTC in this case, some nice examples are in the post near this one). If they all look intelaced, it's clear than.. And TDeint is sloow (but much better than decomb).