Log in

View Full Version : interlaced content to DVD via HC


halsboss
26th June 2007, 09:23
A new PAL DV camera yields a type 1 interlaced BFF (bottom field 1st) 16:9 720x576 .AVI. Can anyone clarify a few points please ?

1. using HC to encode to DVD from a .AVS - do I have to convert to TFF or can I leave it as BFF (telling HC it's BFF in HC's .ini) without any DVD player hassles down the track ? Is there some advantage to converting to TFF ?

2. If I have to convert to TFF, Is this right for converting BFF to TFF ? (or is there as faster way ?)

AssumeFPS(25)
ConvertToYUY2(interlaced=TRUE)
AssumeBFF()
ReverseFieldDominance(true)
AssumeTFF()

as I saw this in a DV thread ... if I un-comment the DoubleWeave.SelectOdd() will it be faster than the above ?

SeparateFields()
ConverttoYUY2()
odd=SelectOdd()
evn=SelectEven()
Interleave(evn,odd)
Weave()
# BFF to TFF: DoubleWeave.SelectOdd()

3. Will this same code work for filtering both BFF and TFF or does something have to change ?

AssumeBFF() # or AssumeTFF()
SeparateFields()
even=SelectEven()
odd=SelectOdd()
even=even.Convolution3D(0, 32, 128, 16, 64, 10, 0)
odd=odd.Convolution3D(0, 32, 128, 16, 64, 10, 0)
Interleave(even,odd)
Weave()
AssumeBFF() # or AssumeTFF()


4. Are any of these the "latest" TDeint settings for deinterlacing a BFF DV and/or which do you recommend ? (I don't know how to go about it, too many seemingly similar alternatives... I would try to set up and use MCbob but it seems difficult and apparently slow compared to TDeint).

# 1. bff clip, keep bottom field, interpolate top field:
interp = separatefields().selecteven().EEDI2(field=0)
tdeint(order=0,field=0,edeint=interp)


# 2. bff clip, keep top field, interpolate bottom field:
interp = separatefields().selectodd().EEDI2(field=1)
tdeint(order=0,field=1,edeint=interp)


# 3. BFF but dunno where this code came from or what the diff is to the other codes
interp = separatefields().eedi2(field=2)
tdeint(mode=1,order=0,edeint=interp)


# 4. I think this one means "dumb" TDeint ... but will it be OK ?
tdeint(mode=0,order=0) # order=0 means BFF apparently



Thanks

wonkey_monkey
26th June 2007, 10:00
1. using HC to encode to DVD from a .AVS - do I have to convert to TFF or can I leave it as BFF (telling HC it's BFF in HC's .ini) without any DVD player hassles down the track ? Is there some advantage to converting to TFF ?

Most DVDs I've come across have been TFF, but you should be able to leave it as BFF without a problem.

2. If I have to convert to TFF, Is this right for converting BFF to TFF ? (or is there as faster way ?)

The quickest and dirtiest way is to crop one line from the top and add a line to the bottom of the video :) Not entirely sure what that will do to the colour information in a YUY/YV12 clip though...

David

halsboss
26th June 2007, 11:42
Thanks. This is a 25-frame clip of a noisy indoor DV (3.6Mb)... any suggestions on how to deal with this type of noise ?
http://rapidshare.com/files/39422343/25Frames.avi (direct download)

So far I've tried (without much success) leaving it interlaced
- Convolution 3d with light to strong settings
- DeGrainMedian(limitY=5,limitUV=7,mode=0, interlaced=TRUE)
- MVdegrain1

fields=LAST
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)

-MVdegrain2

fields=LAST
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = fields.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = fields.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
fields.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)

Boulder
27th June 2007, 06:25
I didn't check the sample as I'm at work but try this:
TDeint(mode=1) # or better yet, use YADIF
denoised=DegrainMedian(limituv=0)
backward_vec2 = MVAnalyse(denoised, isb = true, delta = 2, pel = 2, overlap=8, sharp=2, idx = 1, blksize=16, chroma=false)
backward_vec1 = MVAnalyse(denoised, isb = true, delta = 1, pel = 2, overlap=8, sharp=2, idx = 1, blksize=16, chroma=false)
forward_vec1 = MVAnalyse(denoised, isb = false, delta = 1, pel = 2, overlap=8, sharp=2, idx = 1, blksize=16, chroma=false)
forward_vec2 = MVAnalyse(denoised, isb = false, delta = 2, pel = 2, overlap=8, sharp=2, idx = 1, blksize=16, chroma=false)
MVDegrain2(last,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
SeparateFields()
SelectEvery(4,0,3)
Weave()If you have ugly chroma noise like many DV clips tend to have, you can use FFT3DFilter or FFT3DGPU to get rid of that. You can safely encode the clip as BFF, no need to change the field order. You probably also need to use ColorMatrix(mode="rec.601->rec.709") to keep the colors as they are in the original clip.

halsboss
27th June 2007, 09:14
Thankyou !

MVDegrain2(last,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
SeparateFields()
SelectEvery(4,0,3)
Weave()
Will try this... just checking,
idx=2 is right ?
and SelectEvery(4,0,3) is OK for PAL BFF incoming and will remain BFF afterward ?

Boulder
27th June 2007, 09:44
idx=2 is right because you would use a pre-denoised clip for analysis and do the denoising on the original clip. The video will remain BFF after processing. You can put AssumeBFF() before TDeint and SeparateFields() to ensure this.