digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Guide to dealing with interlaced sources (http://www.digitalfaq.com/archives/avisynth/11922-avisynth-guide-dealing.html)

the viking 11-16-2004 04:34 PM

Boulder wrote:
Quote:

50fps is not DVD compliant, so you must weave the fields!
and when I weave the fields,the video is interlaced again!!

So when doing kvcd,ksvcd,kdvd,vcd,svcd and dvd we can't :?:
use bob() as deinterlacer(to keep the video deinterlaced)
beacause it gives 50 fps and the standard of the above mentioned
formats is 25 fps :?:

Or have I missed something again :?: 8O

--------------------
viking

incredible 11-16-2004 07:24 PM

We only do use (kernel)bob()) .... speratefields().selectevery(4,x,x).weave() ....in here for processing an interlaced video.
Means temporarely gettingfull height 50fps field separated streams and re-weaving the fields afterwards.

If you want to result in a finally deinterlaced 25 fps video I would do that using tomsMoComb as it works motion compensated.

Also a quick'n dirty deinterlacer is Fielddeinterlace(full=false, blend=false).

Full= false means ONLY the frames where combing is detected the deinterlacer processes, means NO unsahrp results in frames wheres no combing.

Blend=false means that no blending/ghosting will be the result, which would be my choice if fielddeinterlace() is used. But the bad side is that due the interpolation small typographics on the screen could get uneasy cause of crappy interpolation. So you have to test.

the viking 11-17-2004 03:28 AM

Inc. wrote:

We only do use (kernel)bob()) .... speratefields().selectevery(4,x,x).weave() ....in here for processing an interlaced video.


Ok,then everything is clear to me(finally) :lol:

Ill make some tests with FieldDeInterlace(),SmoothDeInterlace
and TomsMoComp() when deinterlacing for Mpeg 1 purposes.

Anyway thanks a lot for the help :!:
-------------------
viking

Boulder 11-17-2004 04:51 AM

Quote:

Originally Posted by the viking
Ill make some tests with FieldDeInterlace(),SmoothDeInterlace
and TomsMoComp() when deinterlacing for Mpeg 1 purposes.

Don't forget KernelDeint and TDeint, when considering details, they are superior :wink:

incredible 11-17-2004 06:10 AM

Quote:

SmoothDeInterlace
Even if I once used it ....
Drop it as its old and outdated.

the viking 11-17-2004 09:58 AM

So I did a test using the following script(s):

Quote:

AviSource("D:\Full Capture\Video 1.avi",Pixel_Type="YUY2")
FieldDeInterlace(full=false,blend=false)
#TomsMoComp(-1,5,1)
#Tdeint(order=1)
#KernelDeint(1)

Crop(6,4,-6,-12)
LanczosResize(448,544,0,0,756,560)
AddBorders(16,16,16,16)
ConvertToRGB24() # For TMPGEnc
Trim(0,3540)
TMPGEnc settings was CQ 90,min.bitr.300,max bitr.2500,
res. 480x576,MPEG 1.

Then I burned as non-standard Vcd in Nero.
When viewing them on a 21 inch. TV,several times,the
poorest result was from FieldDeInterlace(full=false,blend=false),
a kind of "shaky" motion and not very sharp picture.It was hard to tell
any difference between the other three,maybe slightly better/sharper
picture with KernelDeint(1).

But as you can see I used default settings almost all over.
Maybe getting better results with other parameters.

BUT,the "man in the street" cant see any difference,and you must
know it to tell the difference between the results here and
the same video in Interlaced mode.Perhaps you can see
the difference better if the source was cleaner,I used
my captures for this test.

So to another question,when doing DVD,what gives best
results of this two options:

1. CQ 90,Min.Bitrate 2000,Max Bitrate 8000.

2. CBR 8000

Im here talking about interlaced videos.
And the final encoded filesize doesn't matter,only the quality. :!:
anyone have any opinion about this?

And is CQ just as compatible as CBR with all Standalone DVD-players?
(I read somewhere that CBR is used as DVD standard,is it correct?)

---------------------
viking

Boulder 11-17-2004 10:07 AM

I recommend the parameter type=2 for TDeint.

Also if you use TomsMoComp with the -1 parameter, you should put AssumeTFF or AssumeBFF before so that the filter gets the correct field order. I don't recommend using the vertical filter in TomsMoComp, it tends to soften too much.

If you have a truly interlaced source, you should remove full=false from FieldDeinterlace. Full=false is meant for hybrid material, in which there's both progressive and interlaced content. The other usage for full=false is being a post-processor for any IVTC filter.

the viking 11-17-2004 12:03 PM

Boulder wrote:
Quote:

I recommend the parameter type=2 for TDeint.
I used
Tdeint(order=1) beacause order=1 is TFF.
(Thats what I found out from the help-file)

So I guess your parameter recommandation has nothing to do with TFF/BFF?

------------
viking

Boulder 11-17-2004 12:51 PM

That's right, type=2 means that TDeint uses kernel interpolation. The default, type=1, isn't recommended for any non-cartoon like sources. At least that's what the help file says.

Prodater64 08-21-2005 05:49 AM

@Boulder or/and Incredible
Since DGPulldown 25 > 29.97 seems to be a good method to do PAL > NTSC conversions, and it needs progressive material, could you post how would be the script to obtain progressive from PAL interlaced.
There is any change respect to the script posted in first messages of this thread?
Thanks.

Boulder 08-21-2005 05:58 AM

http://www.geocities.com/xesdeeni200...Preview-0.html

I don't know if it will look good though.

Dialhot 08-21-2005 10:14 AM

Nice cross-entry array !

For 25i -> 25p I didn't see any problem with the method exposed, that is also the one I use (learkerneldeint)

Boulder 08-21-2005 10:25 AM

If you can handle the extra encoding time, try tritical's TDeint. It's a very good motion adaptive deinterlacer, much less flickering but also slower than LeakKernelDeint.

http://forum.doom9.org/showthread.php?t=82264

Prodater64 08-21-2005 04:32 PM

Quote:

Originally Posted by Dialhot
Nice cross-entry array !

For 25i -> 25p I didn't see any problem with the method exposed, that is also the one I use (learkerneldeint)

Nice, yes, but who could explain me it?

incredible 08-21-2005 05:19 PM

A direct "doesnt matter" deinterlacing used on a 25i material sometimes results in a poor quality which could be better archieved by first analyzing the fieldarchitecture.

So ...

IF you got a PAL 25 interlaced source then you should go through the following steps.

1. do use after loading the source:
Telecide(order=1,guide=2,post=0)

this telecide() command in the settings above does first try to remove a dynamical phase shift on PAL material. Sometimes this fast routine lets result your PAL interlaced stream into a nice 25 fps progressive one WITHOUT blendings and thats the goal.
i.E. I did fix some SexInTheCity DVDs using this to archieve perfect 25p streams as they where just dynamical phaseshifted.

if that doesnt work, means if still combs or blendings do result, try the next one ...

2. Use one of the Deinterlacers mentioned above like LeakkernelDeint() or Tdeint(). As it seems that 25i source is a REAL interlaced one taken by a video device. BUT If the deinterlacing results in blendings then you deal with a fieldblended 25i source out of a 29.976 wich resulted from 23.976 via telecine. And this will be handled using the next option ...

2. The Restore24() or Crestore() functions (one of them).
These ones do try to inverse a process called fieldblended conversation from 23.976p -> telecine -> 29.97i -> fieldblending -> 25i.
Means if you have luck an almost clean 25p stream containing no stutters or blends will result. But these are slow, especially Restore24() and its very complex blend detection.

Boulder 08-21-2005 11:09 PM

Quote:

Originally Posted by incredible
A direct "doesnt matter" deinterlacing used on a 25i material sometimes results in a poor quality which could be better archieved by first analyzing the fieldarchitecture.

So ...

IF you got a PAL 25 interlaced source then you should go through the following steps.

1. do use after loading the source:
Telecide(order=1,guide=2,post=0)

this telecide() command in the settings above does first try to remove a dynamical phase shift on PAL material. Sometimes this fast routine lets result your PAL interlaced stream into a nice 25 fps progressive one WITHOUT blendings and thats the goal.
i.E. I did fix some SexInTheCity DVDs using this to archieve perfect 25p streams as they where just dynamical phaseshifted.

if that doesnt work, means if still combs or blendings do result, try the next one ...

2. Use one of the Deinterlacers mentioned above like LeakkernelDeint() or Tdeint(). As it seems that 25i source is a REAL interlaced one taken by a video device. BUT If the deinterlacing results in blendings then you deal with a fieldblended 25i source out of a 29.976 wich resulted from 23.976 via telecine. And this will be handled using the next option ...

2. The Restore24() or Crestore() functions (one of them).
These ones do try to inverse a process called fieldblended conversation from 23.976p -> telecine -> 29.97i -> fieldblending -> 25i.
Means if you have luck an almost clean 25p stream containing no stutters or blends will result. But these are slow, especially Restore24() and its very complex blend detection.

I would even move the Restore24 step before simple deinterlacing as such material seems to be more common than PAL video. Hopefully R24 will get faster with the new MaskTools and Didée's revision. He told me that he's at the last few steps but who knows how difficult they prove to be..

incredible 08-22-2005 02:57 AM

It was meant to be that I first see if a real video is the source by using a deinterlacer as second option. As if then combing still exists, this means in fact its a fieldblended source.

I tried Crestore by myself with no luck :( Others on Doom9 do report successes, so each one has to try by himself.

Yes, Im also waiting for the new Restore24() as it should run in LQ Mode in realtime, but even h HQ Mode is faster then the actual version.
(Theres a roumor on the germann doom9 board that Didée got rid of edgemasks as the internal blendetection in the new version will be done using a special procedure, .... so lets get surprised :) )

Dialhot 08-22-2005 07:47 AM

Quote:

Originally Posted by incredible
i.E. I did fix some SexInTheCity DVDs using this to archieve perfect 25p streams as they where just dynamical phaseshifted.

And remember that I did the same with LeakKernelDeint with no problem, except surely a time loss.
LeakKernelDeint and some others are quite "intelligent" and do not blend when not necessary.

rds_correia 06-16-2006 08:53 PM

Ok, I must have read this topic one thousand times but I still don't get it :(.
I just got 2 NTSC captures and I need to backup them.
Both are Satellite DVB captures and both are interlaced.
Could somebody help me with a step-by-step tour to interlaced sources :lol:?
Please :lol:?
Thanks in advance :).

kwag 06-16-2006 11:47 PM

Quote:

Originally Posted by rds_correia
Could somebody help me with a step-by-step tour to interlaced sources :lol:?
Please :lol:?

Hi Rui :D

Are they 24fps -->> to 29.97fps :?:
Did you try a script with "telecide", or read here http://www.kvcd.net/forum/viewtopic....light=telecide ;)

-kwag

Boulder 06-17-2006 01:39 AM

Open the source clip in VDubMod. Is there a pattern of three non-combed frames followed by two combed frames? If so, it's telecined and you should use the Telecide-Decimate -combo (simply put, IVTC the clips).

Otherwise the path depends on whether you can keep the files as NTSC or need to convert to PAL.

rds_correia 06-18-2006 05:30 AM

1st of all thank you both for such a quick reply.
2nd when I load my source into VDubMod I can't find a 3on2 sequence.
In fact, I can't get why some parts are combed and some other are not.
I thought that in scene change transitions I would find combed effect and on specially fast scenes.
But sometimes I find fast scenes/scene change where I can't find the combing effect.
VDubMod file info says 720x480, 29.970fps (33367us).
I have tried to burn this source to a DVD but...to tell you the truth...sometimes I think I can see the combing effect when watching on the TV too.
I know, it doesn't make sense but nevertheless I get that feeling :lol:.
I would feel much better if I could deinterlace it and maybe slow it down to ~25fps if that's possible :).
Any help will be very welcome :D.
Cheers

Boulder 06-18-2006 05:34 AM

Could you upload an unprocessed sample clip, preferably one from where there's no combing and one where the combing is visible. I guess something like 100 frames would be enough but you can upload a larger clip if you like.

rds_correia 06-18-2006 06:02 AM

Ok, I'll try to find sometime during today to upload the clips.
Thanks in advance guys ;).

rds_correia 06-18-2006 09:14 AM

Errrrm, guys?
I have a problem.
I want to cut a few frames from my VOBs but...what tool should I use to do that?
Cheers

Boulder 06-18-2006 09:26 AM

Open the VOB in DGIndex, choose a small range and choose Save project and demux video. You'll get an m2v file out of that.

rds_correia 06-18-2006 09:32 AM

Thanks Boulder :D

kwag 06-18-2006 10:50 AM

Quote:

Originally Posted by rds_correia
Errrrm, guys?
I have a problem.
I want to cut a few frames from my VOBs but...what tool should I use to do that?
Cheers

You can always use "Kutter" for that ;)

-kwag

rds_correia 06-28-2006 05:57 PM

Hi guys :).
I'm sorry for taking so long to post but lately I haven't had a life due to too much work. :(
Man I could use some vacations...
So here's what I have.
http://www.freewebs.com/kvcdguides/clip1.demuxed.m2v
Please be so kind to advise me on what to do from here on ;).
Thanks in advance :).
Cheers

Boulder 06-29-2006 02:35 AM

The stuff looks like it's mostly progressive at 29.97fps, only some occasional combs but there's no pattern.

You could try using ConvertFPS(25) but it will probably look bad. I don't know if there's any decent way to do the conversion, one option is to use MVFlowFPS or MVFlowFPS2 included in MVTools (avisynth.org.ru) instead.

rds_correia 06-29-2006 05:35 PM

Quote:

Originally Posted by Boulder
I don't know if there's any decent way to do the conversion...

Hi Boulder :).
Thanks for looking at my sources.
These are the words that I retained from your post.
If there's no decent way to convert these from interlaced to progressive I really won't loose much more of my (and yours') time with this.
But does this mean that my only option is authoring and watching this as interlaced?
And does this use to happen very often with your sources?
TIA
Cheers :)

Boulder 06-30-2006 03:11 AM

You can try using ConvertFPS but I'm not sure if the results are satisfactory. NTSC to PAL conversions often result in blending or jerkiness unless you have a clean, progressive 23.976fps source.

Try this one:
Code:

MPEG2Source()
AssumeTFF()
LeakKernelBob(order=1,sharp=true,threshold=3) # or TDeint(mode=1)
ConvertFPS(50)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()

As I said, you can use MVFlowFPS or MVFlowFPS2 to do the framerate conversion. They are slower but should provide better quality.

Replace ConvertFPS(50) with this:
Code:

backward_vec = MVAnalyse(isb = true, truemotion=true, pel=2, idx=1, sharp=1, blksize=8)
forward_vec = MVAnalyse(isb = false, truemotion=true, pel=2, idx=1, sharp=1, blksize=8)
MVFlowFPS(backward_vec, forward_vec, num=50, den=1, ml=100, idx=1)

or this:
Code:

backward_vec = MVAnalyse(isb = true, truemotion=true, pel=2, idx=1, sharp=1, blksize=8)
forward_vec = MVAnalyse(isb = false, truemotion=true, pel=2, idx=1, sharp=1, blksize=8)
cropped = crop(4,4,-4,-4,true) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2, sharp=1, blksize=8)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2, sharp=1, blksize=8)
MVFlowFPS2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=50,idx=1,idx2=2)

I wrote those by copy-pasting from the MVTools documentation and changed them slightly so there might be errors lurking, the functions sometimes want a clip specified as a parameter.

rds_correia 06-30-2006 04:35 PM

Quote:

Originally Posted by Boulder
You can try using ConvertFPS but I'm not sure if the results are satisfactory. NTSC to PAL conversions often result in blending or jerkiness unless you have a clean, progressive 23.976fps source.

I see...
Thankfuly I live in PAL land and I don't get to see much interlaced stuff.
Quote:

Originally Posted by Boulder
Replace ConvertFPS(50) with this:

By replacing you mean creating a avsi function, right?
Quote:

Originally Posted by Boulder
I wrote those by copy-pasting from the MVTools documentation and changed them slightly so there might be errors lurking, the functions sometimes want a clip specified as a parameter.

I will take that in consideration when I try them.
Thanks for helping me here.
Hopefully next time I get a 23.976 source and maybe you can explain me more in detail what I need to know for those sources.
Are those the 3:2 ones? The ones that I can use Telecide?
Cheers

Boulder 07-01-2006 01:49 AM

Quote:

Originally Posted by rds_correia
Quote:

Originally Posted by Boulder
Replace ConvertFPS(50) with this:

By replacing you mean creating a avsi function, right?

No, instead of ConvertFPS(50) use those lines in your script. You can make a function out of those snippets and save them as avsi though. If you use them often, it might be a good idea so you won't have to type or copy-paste the whole lot every time.
Quote:

Hopefully next time I get a 23.976 source and maybe you can explain me more in detail what I need to know for those sources.
Are those the 3:2 ones? The ones that I can use Telecide?
Cheers
With regular sources, it's either Force FILM in DGIndex or IVTC (Telecide+Decimate). Most of the time Force FILM will do the trick and you get a clean 23.976fps stream which can then be converted to PAL by using AssumeFPS and speeding up the audio.

grodriguez 09-28-2006 01:44 AM

trying to fully understand interlaced is giving me a headach. i work 6 days a week 10 to 14 or sometimes more hours and dont have a lot of time. (honest) .i have made a basic kvcd from scratch about 2 years ago and might be a little rusty but all i need is a script for interlaced sources. so is there a basic script? all i want is my wife work out videos (a couple of them) on a kdvd really dont care a bout the best quality.

SOURCE:
- dvd
- interlaced
- Framerate 29.97
- aspect ratio 4:3
- 45 min long


DESTINATION:
-KDVD Full D1 720x480
- Encoding App Tmpgenc
- Muxing App BBmpeg
- Burning App Nero

thanx for any help

Dialhot 09-28-2006 03:43 AM

Quote:

Originally Posted by grodriguez
SOURCE:
- dvd
- interlaced
- Framerate 29.97
- aspect ratio 4:3
- 45 min long

Do you plan to use a whole DVD for it or do you want to have the smallest video possible, in ordoer to put other things with it on the same DVD ?

If you don't bother to use one DVD for just this video then do not mind about scripts : encode straight forward your video in interlaced mode. No filter is necessary, just a resize if needed.

kwag 09-28-2006 08:32 AM

Quote:

Originally Posted by grodriguez
trying to fully understand interlaced is giving me a headach.

http://www.100fps.com :)

-kwag

grodriguez 10-01-2006 08:30 PM

thanks for answering and sorry for late response

Quote:

Originally Posted by Dialhot
Do you plan to use a whole DVD for it or do you want to have the smallest video possible, in ordoer to put other things with it on the same DVD ?

i want to use the smallest video possable so i can put other videos like it on the same dvd

i also heard that if i dont have to deinterlace if i am only watching it on my tv and if true do i just use kwag's latest script?

and kwag thanks for the info, but what i meant was i dont understand how to use the deinterlaced plugins to make the script. i just used your script.

Quote:

Originally Posted by grodriguez
i have made a basic kvcd from scratch about 2 years ago and might be a little rusty but all i need is a script for interlaced sources

what i meant was i know how to use the script i just dont know how to create it. so is there a basic script ?

thanks

Dialhot 10-02-2006 03:44 AM

Quote:

Originally Posted by grodriguez
i also heard that if i dont have to deinterlace if i am only watching it on my tv and if true do i just use kwag's latest script?

This is true only if you do not plan to use an avisynth script to "obtain the smallest video possible". Filters are not all abble to deal with interlaced video and depending on the situation, the better is to deinterlace and use a "regular" script or to use a script that can handle interlaced materials.

In your situation, I think you just have to use the "Step one - Step two" given by Boulder in the first message of this toppic to deal with the source. There is just the problem with : where to put your filters, and I have to say that I don't really know. I never deal with interlaced material :(.

Boulder ?

Boulder 10-02-2006 04:16 AM

If you do not do any filtering, you could just simply use this as your script:
Code:

MPEG2Source("path\clip.d2v",cpu=4)
Open it in TMPGEnc and encode as interlaced 29.97fps and top field first (most likely).


All times are GMT -5. The time now is 11:50 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.