Log in

View Full Version : Dealing with interlace source


tempetai
6th May 2003, 03:02
Hi all,

My source is interlace 752x576 PAL. I'm developing Home VCD. Is it better to deinterlace the source? I've tried using the script below for deinterlace and sizing, but it caused the audio sync problem.

separatefields
selectevery(2,1)
lanczosresize(352,288)
assumefps(25)

By the way, when is the right time to deinterlace and resize? Before NLE or before encoding or during encoding (if using TMPGenc)?

TIA

avih
6th May 2003, 04:36
VCD does NOT support interlaced content. so somewhere in the filter chain you'll have to deinterlace. the most easy (although not top quality) would be selecteven or selectodd. a better version would be to deinterlace and then resize, although your VCD composition software (tmpegenc?) might do that for you.

you should have read the guides before posting this question. now it the perfect time to do that.

sh0dan
6th May 2003, 14:17
Your script is fine, but you might achieve better quality with a proper deinterlace. Some scripts to try:

fielddeinterlace()
lanczosresize(352,288)

or
fielddeinterlace(blend=false)
lanczosresize(352,288)

or
smoothdeinterlace()
lanczosresize(352,288)

You require the decomb package (for fielddeinterlace) or smoothdeinterlacer. Both available here (http://www.avisynth.org/~warpenterprises/).

You should perhaps also try a noise filter for VCD, but that's another story.

tempetai
7th May 2003, 03:46
avih and sh0dan,

Thanks for the reply. I will try the script that sh0dan has suggested.

I have read some guide, but I'm not sure whether it is exactly the right guide for my purpose. Hopefully avih can give me a link to correct guide. Here again the details of the input and the intended output.

Input : Interlace 720x576 PAL 25fps from Sony DV (DCR-TRV340E)
Capture and NLE : Adobe Premiere
Deinterlace/Sizing : Avisynth or VirtualDub
Encoding : TMPGEnc
Output : VCDEasy to VCD (PAL).

I know TMPGenc can do all the deinterlace and sizing without going through any frameserving program, but my pc will die for the speed.

tempetai
7th May 2003, 03:51
Originally posted by sh0dan

You should perhaps also try a noise filter for VCD, but that's another story. [/B]

Once I have succesful on my deinterlace and sizing, I might need your advice on this noise filter. Is it OK?

Thanks in advanced.

Regards,
tempetai

sh0dan
7th May 2003, 08:00
Just search - there are many threads here that's aout this issue:

[1] (http://www.avisynth.org/index.php?page=ConvertingAnalogCaptures_to_XviD%2FSVCD) [2] (http://forum.doom9.org/showthread.php?s=&threadid=51181) [3] (http://forum.doom9.org/showthread.php?s=&threadid=50473&highlight=Noise)

tempetai
13th May 2003, 03:45
sh0dan,

Link [1] is very helpful. Thanks for the link. You're the man... I have succesfully deinterlace the clip and frameserve to TMPGenc. Below is the script:

---------------------------------------
Avisource("Project 1 Final.avi")
SeparateFields()
ConvertToYuy2()
Weave()
Telecide()
FieldDeinterlace(full=false)
Convolution3D(preset="movieLQ")
saturation = 0.8
cu = - (1-saturation)*256
ColorYUV(off_y=0, gain_y=64, cont_u=cu, cont_v = cu)
LanczosResize(352,288)

I'm going to try the fielddeinterlace(blend=false) and smoothdeinterlace() that you have suggested tonight. One more thing, which one should I do first? Filtering or Resizing?

However, I'm having intermittent problem with avisynth to TMPGenc. The speed is very encouraging where I save more than 50% of the time. However, it is not always a success. It's really depend on luck. Sometimes I got an error message saying that TMPGenc unable to read a certain address, but when I re-encode again, I get a same error message but on a different address. Sometimes, with the same AVI and same script, I can succesfully encode the whole clip... Do you have any idea why I got this intermittent error. I'm not sure whether it is avisynth or TMPGenc problem.

I don't see this problem if I do this sequence :

Avisynth -> VirtualDub -> TMPGenc.

Do you have any idea what's wrong with my script? Is it something to do with the colorspace?

Avisynth version : 2.5.1
TMPGenc version : 2.511.51.160 (2.511)
Input : DV AVI from Sony DV
Codec : Panasonic DV Codec
NLE and capture software : Adobe Premiere.

Rgrds

Guest
13th May 2003, 12:25
Originally posted by tempetai
Telecide()
FieldDeinterlace(full=false) It's crazy to do both of these! If your source is progressive just use Telecide(). If it is interlaced, just use FieldDeinterlace().

Dali Lama
13th May 2003, 12:30
Originally posted by tempetai
One more thing, which one should I do first? Filtering or Resizing?

Hi,

According to my knowledge and more importantly to the knowledge under avisynth.org (link 1), you should filter before resize usually.

Think about it. If the image is unresized, then it is larger. Higher resolution, more data for the filter to work with and noise can be easier to find. Then resize to a smaller size, less resolution, and the resizer ususally hides some noise too. So you end up with the best case senario.

The only situation when I find that using a spatial filter after resizing may be of help is cartoon/anime encoding.

Good luck,

Dali

tempetai
16th May 2003, 02:19
Originally posted by neuron2
It's crazy to do both of these! If your source is progressive just use Telecide(). If it is interlaced, just use FieldDeinterlace().

neuron2,

Thanks for the advice. I've get rid both of them and use TomsMoComp() instead. It is an excellent de-interlacer. Thanks to Tom...

JohnMK
8th June 2003, 19:44
TomsMoComp looks just like FieldDeinterlace(blend=false). Except . . . does Tom's anti-alias decombed edges?

Guest
8th June 2003, 23:34
TomsMoComp does some basic edge-directed interpolation, yes. It therefore produces less jaggies. I have it on my to-do list to do that in FieldDeinterlace as well.

The thing about FD is that it is designed as a postprocessor for progressive frames. It must avoid touching progressive frames. As such it must be an intra-field deinterlacer, which brings with it certain artifacts that can be avoided with an inter-field deinterlacer.

Although people have found FD adequate for general video deinterlacing, there are better solutions in that problem domain, especially TomsMoComp. It is unfair to compare the two in that domain, as some misinformed people are wont to do.