Log in

View Full Version : AVISynth Filter Order Question


h00z
16th November 2003, 16:45
I am trying to encode an episodic DVD right now. It has four (30 minute) episodes all in one big "movie". Now, I'm encoding each episode individually using the Trim() command. Here's what my AVS looks like for an example episode: MPEG2Source("D:\_working\YYH_18\yyh_18.d2v")
Telecide(order=1,guide=1)
Decimate(mode=3,threshold=2.0)
AutoCrop(mode=0)
Convolution3d(preset="animeLQ")
SimpleResize(512,384)
MSharpen(strength=30)
video = last

audio = WAVSource("D:\_working\YYH_18\english.wav")
AudioDub(video,audio)
Trim(34193,68254)This works okay, but I'd really like to trim before cropping as each episode has different cropping needs. Now I know that I can go in and change the crop settings manually, but I'm trying to save myself a little bit of time by automating a few things. Is there a way I could mux the audio and video, trim, then crop? Something in an order like this maybe:# --- Load Clip ---
MPEG2Source("D:\_working\YYH_18\yyh_18.d2v")

# --- IVTC ---
Telecide(order=1,guide=1)
Decimate(mode=3,threshold=2.0)

# --- Audio/Video Dub ---
# audio = WAVSource("D:\_working\YYH_18\english.wav")
# AudioDub(video,audio)

# --- Trim ---
# Trim(31,34080)

# --- Crop ---
AutoCrop(mode=0)

# --- Smooth ---
Convolution3d(preset="animeLQ")

# --- Resize ---
SimpleResize(512,384)

# --- Sharpen ---
MSharpen(strength=30)


Edit by sh0dan: Made your script a bit more screenfriendly

sh0dan
16th November 2003, 21:27
This should do the trick:
MPEG2Source("D:\_working\YYH_18\yyh_18.d2v")
Telecide(order=1,guide=1)
Decimate(mode=3,threshold=2.0)
video = last

audio = WAVSource("D:\_working\YYH_18\english.wav")
AudioDub(video,audio)
Trim(34193,68254)

AutoCrop(mode=0)
Convolution3d(preset="animeLQ")
SimpleResize(512,384)
MSharpen(strength=30)

Justinus
17th November 2003, 03:30
Isn't it better if you place both temporal & spatial smoothers before deinterlacer? I heard that it'd increase compression ratio and also help deinterlacer to deinterlace video better because there's less noise.

stickboy
17th November 2003, 06:46
If you apply a spatial-smoother before deinterlacing, then you risk blurring even fields with the odd fields. This will produce potentially unwanted effects and can confuse the deinterlacer.

Justinus
17th November 2003, 07:05
So you mean that spatial smoother works better as frame rather than field. In that case, shouldn't Convolution3D in the script above placed before deinterlacer?

What about temporal smoother? I read from some threads and they said it works on field better than frame. So I think it's fine to put the temporal smoother before deinterlacer.

sh0dan
17th November 2003, 09:22
In 99% of all cases you want to place your smoothers AFTER the material has been deinterlaced. That way it the deinterlacer doesn't get confused by what the filter has done.

NightMare
17th November 2003, 11:08
why bother your self with such thing

just decrypt each ep from the dvd to a sepret folder and encode then its much easer

stickboy
17th November 2003, 12:49
Originally posted by Justinus
So you mean that spatial smoother works better as frame rather than field. In that case, shouldn't Convolution3D in the script above placed before deinterlacer?Convolution3D does both temporal and spatial smoothing. For the same reasons I mentioned before, you do not want to do any kind of spatial smoothing before deinterlacing.

Temporal smoothing by itself is a little safer, since it won't blend together even fields with odd fields. Too much smoothing still can risk confusing a deinterlacer though.

Justinus
18th November 2003, 01:42
I see. However, doessn't Convolution3D (YV12) for AviSynth 2.5 support only spatial effect (temporal effect is disable)?

stickboy
18th November 2003, 05:46
Yes, it's true that temporal smoothing is disabled in the YV12 version of Convolution3D.

That's not relevant, though. It doesn't change anything I said earlier. Smoothing, especially spatial smoothing, should occur after deinterlacing.

Didée
18th November 2003, 09:01
Originally posted by stickboy
Yes, it's true that temporal smoothing is disabled in the YV12 version of Convolution3D.
Wrong.

Temporal smoothing IS working in YV12-C3D.

It is the "temporal influence" that is disabled in the YV12 version.

- Didée

stickboy
18th November 2003, 12:52
Argh. Of course.

(Yeah, I didn't think it would make any sense for C3D to disable temporal smoothing. Obviously I haven't been paying much attention to the YV12 stuff... :p)