PDA

View Full Version : Using Avisynt and CCE for DV-AVI


Bugsy
18th June 2003, 08:31
I tried posting this in the Avisynth usage forum, but I guess this forum is the correct one...
I mainly use different Avisynth filters, and their default settings to convert my DV-AVI (PAL) to DVD. I use CCE 2.66 (at max DVD bitrate settings, avg 6000, min 500, max 9000) with the following Avisynth script:

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
convertToYUY2()
Convolution3D(preset="movieLQ")
DoubleWeave().SelectOdd()

I turn off all other filtering in CCE, and set 'Quantizer characteristics (flat part priority)' to 16. I am changing 'Quantize Matrice setting' to 'mb 1 interlaced DV' (thanks to mikeathome).

I'm getting fairly good results from these settings, it fixes the upper field first bug in CCE, and best of all good speed!

Is the Convolution3D(preset="movieLQ") and 'mb 1 interlaced DV' matrice a good pair....?
Are there any other settings/filters I should use to get even better results?

I have tested this script with the MSharpen() filter, but that filter corrupts my .m2v file...? (atleast Sonic MyDVD will not accept this file).

I hope the DV conversion guide will be made: http://www.avisynth.org/index.php?page=ConvertingDVtoDVD

Bugsy

ulfschack
18th June 2003, 15:10
Is C3D interlace-aware? Is it 2.5x or 2.0x version of avisynth?. I have strong doubts about support for interlacing in avisynth filters (I'm not quite up to date on C3D though). Thats why i separate fields to two streams before doing any temporal operations on my DV avis.

Do you yourself think the result is more blurred than you would like it to be?

Mb1's interlaced_DV is the one I've been using for quite a while. I never made any in-depth comparisons myself. I just kinda trust that guy :)

The preset MovieLQ seems a bit steep though. If any you should use MovieHQ. Me, I don't use noise filters at all when having 6000 kbps to play with. SVDC and DivX is a different matter entirely.

cheers

Wilbert
18th June 2003, 18:14
Is C3D interlace-aware?
No.

Try something like


LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
Convolution3D(preset="movieLQ")
Weave()


I'm not sure why you are using DoubleWeave().SelectOdd(), because it does the following:
original clip: b1t1 b2t2 b3t3 ...
doubleweave: b1t1 t1b2 b2t2 t2b3 ...
doubleweave.selectodd: t1b2 t2b3 t3b4 ...
So, it combines fields from different frames.

bb
18th June 2003, 21:08
Originally posted by Wilbert
I'm not sure why you are using DoubleWeave().SelectOdd(), because it does the following:
original clip: b1t1 b2t2 b3t3 ...
doubleweave: b1t1 t1b2 b2t2 t2b3 ...
doubleweave.selectodd: t1b2 t2b3 t3b4 ...
So, it combines fields from different frames.
Yes, but because DV is usually bff, and CCE always encodes tff, this clears the situation. It's even better than using CCE's "Upper field first" flag.

Regarding Convolution3D: you should always use it on fields, not frames, if you have to deal with interlaced sources, else you partially destroy the interlace structure. Due to its nature, Convolution3D performs better on progressive sources, because the lines in interlaced fields are less correlated in the vertical direction.

"movieLQ" is not that aggressive; I'd say you can safely use it. You may want to try the same parameters as the "movieLQ" preset, but use the full-1 matrix (1 instead of 0 as the first parameter) to get even better results.

If there's much noise in the video (because of low light), you can try Convolution3D(1, 16, 32, 16, 24, 2.8, 0)

@ulfschack:
The video gets better using Convolution3D, even at 6000 kbps average bitrate. Don't believe it? Try!

bb

troy
19th June 2003, 06:46
So is the general concensus that this is the best script. Would DoubleWeave().SelectOdd() for the last line of the script be the same as changing the field order flag in restream or pulldown.exe. after the file is encoded.

Also if I am using avisynth 2.08 with type 1 avi why do I need to put in convertToYUY2() in my script


LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
Convolution3D(preset="movieLQ")
Weave()
DoubleWeave().SelectOdd()

Wilbert
19th June 2003, 10:10
Yes, but because DV is usually bff, and CCE always encodes tff, this clears the situation. It's even better than using CCE's "Upper field first" flag.
I never worked with CCE, but shouldn't you feed it with "t1b1 t2b2 t3b3" then? Or better the ReverseFieldDominance plugin (http://www.geocities.com/siwalters_uk/fnews.html) of Simon Walters.

Also if I am using avisynth 2.08 with type 1 avi why do I need to put in convertToYUY2() in my script
You only need that if your source is not YUY2. In case you don't know, you can check that by using the following script

AviSource("c:\testfil1.avi").Info

Bugsy
19th June 2003, 10:33
Thanks for your response, a lot of good input here!

@bb
"movieLQ" is not that aggressive; I'd say you can safely use it. You may want to try the same parameters as the "movieLQ" preset, but use the full-1 matrix (1 instead of 0 as the first parameter) to get even better results.

I will try this for my next test.

I was not aware Convolution3D performs better on progressive sources, so I'll change my script according to this.

I'm using Avisynth 2.51, and have to change to YUY2 to get CCE to accept the file....

I feel I'm getting close, and I'll post my results and script when I have tested this.

Bugsy

bb
19th June 2003, 10:40
Wilbert,

Simon Walters ReverseFieldDominance does the same thing as CCE's "Upper field first" flag, except that it can shift in both directions. So this is the method of swapping fields, and I'm not certain if this should have been named "reverse field dominance", because I would understand this as the other approach (dropping one field and recombining the fields).

Strictly speaking you're right that the fields get recombined differently using DoubleWeave().SelectOdd(), but that doesn't matter because for interlaced sources we have to deal with fields, not frames. And this way you don't lose one line at the top and double another at the bottom, which means loss of information (although this won't bee very noticable).

See http://forum.doom9.org/showthread.php?s=&threadid=46765&perpage=20&pagenumber=2
for an extensive discussion, especially Donald Graft's post (the first on page 2).

bb

ulfschack
19th June 2003, 11:14
With all due respect to all the "heavies" here, you seem to be missing a vital point in temporal filtering of fields in 50 fps streams. Namely that you're not comparing pixels on the same position. If you divide it into two (25 fps) by SelectOdd/Even, on the other hand, an arbitrary pixel will have the same spatial coordinates in two consecutive frames/fields/pictures (or whatever is the right word here).

Hope you get my point :)

@BB. Yes you (even I) migt think it looks better, but are you sure that it's also closer to the original? (I for one like to have it that way and usually tire rather quickly at "cool new looks".

cheers

troy
19th June 2003, 14:03
ULF, what script would you suggest.

I tried this script

LoadPlugin("d:c3d\Convolution3D.dll")
directshowsource("D:\test.avi")
SeparateFields()
Convolution3D(preset="movieHQ")
Weave()
DoubleWeave().SelectOdd()
resampleaudio(44100)

and analyzed the resulting m2v in bitrate viewer and my resulting video is now tff. Is this correct.

ulfschack
19th June 2003, 14:36
First of let me just say that I know next to nothing about field order and dominance, but I've over the years come to realize that if it you do it wrong there's no question about it because it's so obvious. I mean I don't believe that there's a way of doing this tff-bff-even-odd-dominance-stuff in different ways and just get slight improvements. It's either right or wrong. And if it is wrong, I just run it through pulldown.exe to set it right again. I think "Restream" is another freeware that does it for you.

As for the avisynth script I'm at work and have my standard script @home so forgive typos. Here's roughly what I do.


LoadPlugin("d:\c3d\Convolution3D.dll")
avisource("D:\test.avi")
fps50=SeparateFields()
even=selectEven(fps50).Convolution3D(preset="movieHQ")
odd=selectOdd(fps50).Convolution3D(preset="movieHQ")
interleave(even,odd).weave() #possibly swap Even and Odd
resampleaudio(44100) #only necessary for certain versions of CCE


You might wanna add an AssumeFrameBased or a ConvertToYUY2 at the start depending on various circumstances. Don't be afraid to use the parameters bb recommended tho. See what you like best

cheers

troy
19th June 2003, 17:34
sorry for being a nube but if my source is ntsc would I use fps(60).

Also Ulf. You probably forgot but you yourself said that you can not use this filter in your script in more than one instance in another thread. Anybody have any suggestions.

troy
19th June 2003, 17:38
sorry again ulf but you were talking about dust and not c3d. I am gonna try what you suggested and see if it will work.

troy
19th June 2003, 17:49
Well it at least works. About comparing quality this will have to wait.

bb
19th June 2003, 20:11
Originally posted by ulfschack
Namely that you're not comparing pixels on the same position. If you divide it into two (25 fps) by SelectOdd/Even, on the other hand, an arbitrary pixel will have the same spatial coordinates in two consecutive frames/fields/pictures (or whatever is the right word here).

That's what I referred to when I wrote "the lines in interlaced fields are less correlated in the vertical direction" in my post above.

@BB. Yes you (even I) migt think it looks better, but are you sure that it's also closer to the original? (I for one like to have it that way and usually tire rather quickly at "cool new looks".
cheers
Don't know for sure; you'd have to do a test series and calculate the differences or the PSNR. What I can tell for sure is that Convolution3D increases compressibility by reducing noise, and, if you ask me, also increases quality, at least in critical situations (low light shots). Noisy sources tend to create blocks or mosquito noise in the MPEG-2 video, and that's what I dislike.

Unlike other noise removers Convolution3D averages a large number of the pixels that can be assumed to correlate the most: the direct neighbours in time and space. Up to 26 neighbour pixels are used to build an average with the current pixel, so noise is removed efficiently while keeping the "real" pixel values at a maximum.

Just yesterday I had low-light shot to encode (a progressive DV source), and I did a quick-and-dirty conversion using CCE VBR Q40. Later I did another encode using Convolution3D, again using CCE @ VBR Q40, and the result was *much* better.

Well, you have to decide which method you like best. In the end it's a matter of taste.

bb

Bugsy
23rd June 2003, 15:37
I have tested both Convolution3D settings in this script:

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
# Convolution3D(1, 16, 32, 16, 24, 2.8, 0) #For noisy DV
Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #For good DV source
Weave()
DoubleWeave().SelectOdd()

I find Convolution3D (1, 6, 10, 6, 8, 2.8, 0) the best as this setting is more like the original DV-AVI.
When it comes to fieldorder in CCE, this script produces a perfect result.
I have also compared this result to a conversion done with TMPEGEnc (Wizard DVD high quality). TMPEGEnc takes 4- 5 times as long to convert the same file, and with the same quality (in my opinion)!
I use 'Quantizer characteristics (flat part priority)' = 16 for my test.
Will 'Quantizer characteristics (flat part priority)' = 40 produce a better result (3 pass)?
I have done a lot of reading, and a lot of testing, but no result is nowhere near this, but I am still looking for settings to further enhance the result. CCE settings or other Avisynth filters/settings, so keep on posting!

Bugsy

bb
24th June 2003, 19:53
Originally posted by Bugsy

I use 'Quantizer characteristics (flat part priority)' = 16 for my test.
Will 'Quantizer characteristics (flat part priority)' = 40 produce a better result (3 pass)?
My '40' setting referred to the one-pass quantizer value - just in case you misunderstood.

The 'Quantizer characteristics (flat part priority)' gives more bitrate to complicated scenes if lowered, and distributes the bitrate more evenly if increased. The default of 16 is a good all-purpose value, and you should increase it only if you use a high bitrate and experience banding in dark, slow scenes.

bb

Bugsy
25th June 2003, 10:23
Thanks bb for clearing that up.

Have you any experience with the 'peachsmoother' or 'TomsMoComp'?

Bugsy

ulfschack
25th June 2003, 10:34
Sorry for my seeming indifferent to your comments. This is not my purpose, but rather a consequence of an unfortunate crossing of my ADSL modem and a lightning bolt.

@bb I hear you, and think I agree too. Low light scenes would prolly need a good filtering. I'd like to perform some test on avisynth 2.5x to see if the new "conditional"-feature coud be of help in selective filtering (dark scenes only), but just thought I'd throw the question your way in case you'd allready dabbled with it. Editing in Avisynth with trim is not my favourite pastime.

Just out of curiosity, bb ... do you think your progressive DV cam produces better material for TV viewing (than compared to interlaced ... if you ever had the expirence, that is). Reason I ask is that prog DV used to be a wet dream of mine. Mainly for not having to concern myself with the hassels of interlacing, but also purely based on hearsay that the quality should be somuch better. However watching progressive (in fact deinterlaced) DV in my TV I'm pretty sure that the fluentness of pannings created by a 50 fps interlaced stream is more to my liking. Progressive DV sort of gives me the same feeling as sitting to close up front in the movie theatre. Any support from you in this?

@Bugsy, Try my script too (splitting streams) while your at it so that readers of this thread can get something out of our bickering, would you ? :)

@Troy, Yes I would really like for Steady to have a look-see at this bug, cause his filter is certainly among the top contenders as far as I'm concerned.

cheers

Bugsy
25th June 2003, 11:50
@ulfschack
@Bugsy, Try my script too (splitting streams) while your at it so that readers of this thread can get something out of our bickering, would you ?

I'll test this script tonight (I'm at work right now):

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
convertToYUY2() #Convolution3D.dll only supports this
fps50=SeparateFields()# The 'ulfschack' method
even=selectEven(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
odd=selectOdd(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
# Convolution3D(1, 16, 32, 16, 24, 2.8, 0) # Alternative for noisy DV
# Convolution3D (1, 6, 10, 6, 8, 2.8, 0) # For good DV source, by bb
interleave(even,odd).weave()
DoubleWeave().SelectOdd() # For fixing the CCE upper field bug

If someone else would like to test this I'm very interested in the results!!!!!

Bugsy

troy
25th June 2003, 14:16
Ive tried various methods with c3d, peachsmoother, msooth. I am doing svcd so that may be my problem. I see no difference in any of my mpgs. I watch them on tv and I keep seeing this halo effect around the edges like a ghosting effect on the edges. I am not sure what it is. My video is from a minidv interlaced. It is hard to describe this halo effect except to say it is like the edges are hot and putting off heat. Any suggestions

bb
25th June 2003, 19:32
troy, what you experience is probably the so-called "mosquito noise", which appears around sharp edges due to the high frequencies being clipped by the MPEG encoding. You can get rid of them by applying smoothing filters (blurs the image) or by increasing the bitrate (which is of course limited for SVCDs).

As you tried various smoothers, you may want to try a higher video bitrate, maybe at the cost of audio bitrate. You can go up to 2778 kbps (video + audio). I wouldn't go higher than 2600 kbps for the video, though.

bb

troy
26th June 2003, 04:21
thanks for the reply bb. I tried many filters and I can not see any difference. I tried peachsmoother and I think I can see some improvement but not much. I am using CCE 2.66. Is there a way to get rid of this mosquito noise with the low pass filter. I turn it off for my encodes. Also I tried both bbs method and Ulfs meathod and I see no difference. I am going to get a dvd burner and then I hope to get better results.

FredThompson
26th June 2003, 04:45
Wow, this is a very good thread. I just stumbled on it after a discussion concerning bobbing and cleaners. In fact, I was planning to figure out how to process field sequences independently but, since it's illustrated here, can just follow your lead. Thanks!

The latest readme for Convolution3D for AviSynth 2.5 says temporal cleaning is NOT active for that version. Hence, I've been using FluxSmooth.

Have been unable to contact vlad59 to find out if the most recent version (on WarpEnterprise's list at AviSynth.org) now has temporal support.

Can any of you tell me the status? If it still doesn't have temporal support, am I correct the only option for 3D cleaning with AviSynth 2.5 is Fluxsmooth?

Wilbert
26th June 2003, 10:21
FredThompson, only the temporal influence is disabled. As I understand it, this influence is a threshold to decide when to smooth spatially or spatial-temporally. Iow, in this version (and I think also in the one @Warpenterprises) the smoothing is always spatial-temporally. From the docs:

Temporal influence :
It's used especially to speed up a little this filter and to avoid using temporal informations when not needed (scene change, fade, ...)
I first build a limit = Temporal Luma Threshold * Temporal influence
For each 2 pixel computed (due to MMX, 2 pixel at the same time), I first check this :
if
(Abs (Y0 - Y0[Previous frame]) +
Abs (Y0 - Y0[Next frame]) +
Abs (Y1 - Y1[Previous frame]) +
Abs (Y1 - Y1[Next frame])) > limit
then
do Spacial work (only 3*3 matrix)
Else
do Spacial and Temporal work (3*3*3 matrix)
The lower it is -> the faster will be the filter but compressibility should be lower
The higher it is -> the slower will be the filter but compressibility should be higher
if temporal influence is set to -1 then only spatial work is done (high speed).
This parameter is a float.

FredThompson
26th June 2003, 10:27
Would this mean scene changes would be corrupted due to smoothing across them?

Wilbert
26th June 2003, 11:21
I also would like to know that (I haven't used it for a while) :)

Bugsy
26th June 2003, 11:41
This is getting rather tecnical, and that's great! I'm still a novice to filters, but I'm learning!
@FredThomson
The latest readme for Convolution3D for AviSynth 2.5 says temporal cleaning is NOT active for that version. Hence, I've been using FluxSmooth.
What does this mean, and how does this affect the output? I guess this has something to do with Spacial and Temporal work (3*3*3 matrix) as one of the dimensions is not involved in the calculation....?

Excuse me for posting 'stupid' questions, but an explanation would propably be welcomed by other novices following this thread as well ;-)

@ulfschack
I have not tested the output from the last script on my standalone DVD player yet, but the script worked fine, and I'll keep you posted.....

Bugsy

Wilbert
26th June 2003, 11:47
@FredThomson


The latest readme for Convolution3D for AviSynth 2.5 says temporal cleaning is NOT active for that version. Hence, I've been using FluxSmooth.

What does this mean, and how does this affect the output? I guess this has something to do with Spacial and Temporal work (3*3*3 matrix) as one of the dimensions is not involved in the calculation....?
Did you actually read what I wrote above? Temporal cleaning is active (meaning a 3x3x3 smoothing matrix is applied), but the temporal influence option is disabled.

Bugsy
26th June 2003, 11:57
@Wilbert

As I stated in my last post, I'm a novice....

'Temporal cleaning vs. temporal influence' a short explanation would be much appreciated...

Thanks

Bugsy

Wilbert
26th June 2003, 12:19
A low temporal influence just means that during fades or scene changes the temporal smoothing is low (which is what you want, otherwise you will see ghosting during those scenes).

Spatio-temporal smoothing means (in this case) applying a 3x3x3 blur. So if you take a pixel in a frame (of the final clip), it just means that it is the average of the surround 3^3 = 27 pixels. Of which 9 pixels are located in the same frame (but of course in the old clip), 9 in the previous frame and 9 in the next frame.

bb
26th June 2003, 17:44
The temporal influence is disabled for the YV12 version only. On WarpEnterprise's page the "old" YUV2 only Convolution3D filter is available as a new compile for the new AviSynth 2.5, too. So if you can live with YUV2 support, you may want to use that one.

bb

FredThompson
27th June 2003, 05:08
I'm going to test conversion to YUV2 and Convolution3D for AviSynth 2.5. First, however, I'd like to test the process of separating fields and filtering them independently with FluxSmooth because the lack of temporal influence in Convolution3D will not interfere.

The concepts have been touched on in this thread so it should still be helpful for people who are working with Convolution3D. I have a number of questions and would appreciate some help.

First the AviSynth 2.5 script, the questions are in the immediate reply.

AVISource("DV Tape.avi")

# decomg - decomb/deinterlace
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")

# CNR2 - chroma filter
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Cnr2.dll")

# FluxSmooth - temporal cleaner
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FluxSmooth-2.5.dll")

# Dup - replace duplicate frames with true duplicate
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Dup.dll")

##########################
#
# If DV source and want to make it top field first
#
# DoubleWeave().SelectOdd()
#
##########################

##########################
#
# If decombing (film source and want to make it progressive)
#
# Telecide()
# Decimate(cycle=5)
# FluxSmooth()
# Cnr2("xxx",4,5,255)
#
##########################

##########################
#
# If deinterlacing:
#
# FieldDeinterlace(blend=true)
# FluxSmooth()
# Cnr2("xxx",4,5,255)
#
##########################

##########################
#
# If keeping interlaced:
#
# even=SelectEven(SeparateFields()).FluxSmooth()
# odd=SelectOdd(SeparateFields()).FluxSmooth()
# Interleave(even,odd).Weave()
#
##########################

##########################
#
# Replace duplicate frames (only for simple animation)
#
# Dup(copy=true, blend=true)
#
##########################

FredThompson
27th June 2003, 05:10
I realize there are extra # characters. The plan is to build one script then enable the parts I need and also to facilitate discussion of the script.

1) How can Donald Graft's Dup filter be integrated into the section which executes temporal filtering by field such that it is run after the temporal filter?

2) If the source is to be decombed, Dup should be executed AFTER the decomb process, correct?

3) If the source is to be deinterlaced, would it be more helpful to execute Dup by field BEFORE deinterlacing? I suspect it would give a slight noise reduction compared to running after deinterlacing.

4) Does it matter if the DoubleWeave().SelectOdd() conversion of DV from BFF to TFF is at the beginning or the end of the script?

5) Does DoubleWeave().SelectOdd() properly pad the very beginning and ending fields of the destination stream? In other words, we start with b1t1 b2t2 ... and end with b1 t1b2 t2b3...tx, right? There should be an empty t0 and bx, correct?

I ask this because ReStream doesn't appear to pad the very end so the last frame is screwed up.

If I am correct about this and DoubleWeave().SelectOdd() does not pad the beginning and ending fields, how can this be accomplished?

Wilbert
27th June 2003, 10:29
I don't know anything about dup, so can't help you with that.

But DoubleWeave().SelectOdd() does the following:
original clip: b1t1 b2t2 b3t3 ...
doubleweave: b1t1 t1b2 b2t2 t2b3 ...
doubleweave.selectodd: t1b2 t2b3 t3b4 ...
So, it combines fields from different frames. Remember selectodd selects the odd frames, but the framecount starts at zero (so frame 1 is actually the second frame of the clip). Only the last field will be missing if the number of frames is odd, else it's ok.

FredThompson
27th June 2003, 10:42
what about b1?

Is there a method to generate a t0 to go with b1 and a b(x+1) to go with tx?

Wilbert
27th June 2003, 10:57
If you use selectodd, then b1 won't be selected.

Example: a b c d e ...
selectodd: b d f ... (= frame 1, 3, 5, ...)
selecteven: a c e ... (= frame 0, 2, 4, ...)

I messed up a bit (doesn't matter whether the number of frames of the original clip is even or odd). I would do the following:

clip: b1t1 b2t2 b3t3 ...
clip2 = clip.doubleweave: b1t1 t1b2 b2t2 t2b3 b3t3 ... # total frames of this clip is always odd
# delete the last frame:
clip2.deleteframe(framecount(clip2)-1): b1t1 t1b2 b2t2 t2b3 ... # total frames of this clip is always even
selectodd: t1b2 t2b3 ...

Thus:
clip = ...
clip2 = clip.doubleweave
clip2.deleteframe(framecount(clip2)-1)
selectodd

FredThompson
27th June 2003, 11:19
OK, so if we assume the source we want is b1t1...bxtx the safe thing to do is add an all-black frame at the front (b0t0) and one at the end (bx+1 tx+1) then do the field order reversal. That preserves all the original fields, right?

Or would it screw up at the end? The front should be ok. Is it possible to end with only 1 field or is that what causes the window shutter effect at the end of some files?

Should the last frame actually be a bobbed version of bx?

Wilbert
27th June 2003, 12:05
If you do that, you will get:

clip: b0t0 b1t1 b2t2 ... # b0, t0, b2, t2: black
doubleweave: b0t0 t0b1 b1t1 t1b2 b2t2 ...
selectodd: t0b1 t1b2 t2 ...

One of the fields of the first frame is black, while the other field is normal. Also the last frame consist of one black field (which can be deleted of course). So, it screws up the beginning. If you really want to keep all the fields, you have to make sure that you add two black fields: b0 and t3:

clip: b1t1 b2t2 ... # no black fields
selecteven: b1 b2
selectodd: t1 t2
add black field to selecteven (1): b0 b1 b2 # b0 black
add black field to selectodd (2): t1 t2 t3 # t3 black
interleave (1) and (2): b0t1 b1t2 b2t3
doubleweave: b0t1 t1b1 b1t2 t2b2 b2t3 ...
selectodd: t1b1 t2b2 t3 ...
delete last frame: t1b1 t2b2 ...

I guess something like this should work, but it might be easier to delete one frame (like described above).

FredThompson
27th June 2003, 12:16
Sometimes the source doesn't have leading and trailing black or fades. Perhaps it would be wise to assume the source starts and ends with active frames and pad accordingly in the script. The script will be more difficult but it prevents loosing content. I'll play with this later.

Thanks for your insight.

Bugsy
1st July 2003, 11:36
I have tested the following script for converting my DV-AVI with CCE 2.66, and viewing it on my standalone DVD player:

#Avisynth 2.5
LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
convertToYUY2() #Convolution3D.dll only supports this
fps50=SeparateFields()# The 'ulfschack' method
even=selectEven(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
odd=selectOdd(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
# Convolution3D(1, 16, 32, 16, 24, 2.8, 0) # Alternative for noisy DV
# Convolution3D (1, 6, 10, 6, 8, 2.8, 0) # For good DV source, by bb
interleave(even,odd).weave()
DoubleWeave().SelectOdd() # For fixing the CCE upper field bug

@ulfschack
I have compared the result to a script not separating the fields (other settings the same). I am not able to see any difference... They both produce very good results :)

@FredThompson, bb and Wilbert
When it comes to separating fields and filtering them independently I'm not sure what to expect in regard of visual quality...

I have a feeling more work has to go into tweaking CCE for further quality enhancement (from 3 to 5 passes, flat part priority, 'mb 1 interlaced DV' matrice, ...) Any suggestions?

I'm gonna test FluxSmooth, but so far I'm happy with Convolution3D...

Bugsy :D