Log in

View Full Version : DVD to AVI - Filters in right order?


Razorholt
8th September 2006, 20:04
Hi everyone,

I'm trying to convert a DVD to an AVI file. I used DGIndex to convert the source file to .d2v and below is the script I would like to use in order to convert it to AVI (using MeGUI):

MPEG2Source("C:\video.d2v")
AssumeTFF()
Telecide()
Decimate()
TDeint(mode=0,full=false,tryWeave=true)
ColorMatrix()
ConvertToYv12()
LanczosResize(576,320)
Crop(32,16,-32,-16)
asharp(0.5,0,0).awarpsharp(3,1,bm=3,cm=3,0.25)
Blockbuster("noise",detail_max=100)


I know that the movie has been telecined and I'd like to bring back the initail framerate (23.976)

Am I making any mistakes here?


Thanks,
- Dan

foxyshadis
8th September 2006, 20:48
Colormatrix should be the first filter; see its readme for the best way to use it with mpeg2source. Then tdeint is superfluous and somewhat dangerous after telecide; if telecide leaves combs, try TFM (upping the pp, or using tdeint as a clip2).

You should only use blockbuster if you actually need it; if you haven't stripped all the detail from the source you shouldn't. (The grain in the dvd itself should be enough.)

asharp always looked unnatural to me, but that's sjust a personal preference. You might want to try limitedsharpen (http://www.avisynth.org/mediawiki/wiki/LimitedSharpen) as a replacement. You might always want a denoiser; even RemoveGrain(1), the simplest and fastest of them, can help keep artifacts down in the result.

Razorholt
9th September 2006, 05:21
Thanks foxyshadis. I followed your advice and changed my script to:

ColorMatrix()
AssumeTFF()
Telecide()
TFM(order=1)
Decimate()
ConvertToYv12()
LanczosResize(576,320).ConvertToYV12()
Crop(32,16,-32,-16)
LimitedSharpenFaster(Smode=4)

It works quite well but some scenes are jerky - as if some frames were missing. It not horribly choppy but sometimes not pleasant to watch. I tried to set Telecide to hybrid but nothing changed. I switched to Tdeint, same results.

What can I try next?


Thanks,
- Dan

foxyshadis
9th September 2006, 06:20
This is the problem:

Telecide()
TFM(order=1)

Both do the same thing, and step on each other! Drop Telecide and Decimate, and use TFM and TDecimate instead.

Blue_MiSfit
9th September 2006, 06:21
Is it just me or is the ConvertToYV12() call unnecessary?

Given that the source is MPEG-2 which is already in YV12, you shouldn't be getting the video into AviSynth in any other colorspace. You also use it again after LanczosResize, which surely must not be nevessary.

Unless I'm missing something of course ;)

Regarding the choppy playback, are you referring to trying to play the output of the script in realtime, or are you talking about playing an output file from an encoder?

If you are talking about viewing the script live, that is to be expected. The filters you have may not always run realtime.

Good luck, you're off to a good start

~MiSfit

Razorholt
9th September 2006, 15:01
@foxyshadis: oddly enough it's smoother with Telecine+TFM. Maybe I should tweak TFM... What are the parameters that I should adjust in this case? Thanks.

@Blue_MiSfit: Yes, you were right about ConvertToYV12(), completely unnecessary. Regarding the choppy playback, it happens off the player after I encoded the file. Whatever player I use I get the same result. Thank you for helping out :)

Razorholt
9th September 2006, 16:05
New test, better result:

ColorMatrix(d2v="C:\myvideo.d2v")
interp = separatefields().selecteven().EEDI2(field=1)
deinted = tdeint(edeint=interp,order=1,field=1)
tfm(order=1,mode=1,clip2=deinted,d2v="C:\myvideo.d2v")
tdecimate()
LanczosResize(576,320)
Crop(32,16,-32,-16)
LimitedSharpenFaster(Smode=4)

Not 100% sure about the tweakings of each filter though :o


- Dan