Logiqx
14th May 2003, 15:47
I often see threads relating to peoples trouble encoding DV material in CCE. So far I have seen two options suggested to deal with field order (of course, we all know that DV is bottom field first):
1) Use the 'top field first' flag in CCE to move the video up one line and in effect change the footage from bff to tff.
2) Encode in CCE then use pulldown, restream or whatever your preferred tool is for switching the tff/bff flags in the mpeg stream.
I've been using a third option on my footage and find the results very pleasing so I thought that it could be worth sharing. Using AviSynth (v2.51) I use a simple script to change the DV material from bff to tff. This means that I can encode as usual and should anyone need to work with my footage later (e.g. rip from my DVD and re-encode for some reason) then the footage is tff and should not cause them any problems.
The principal is simple:
1) Split the frames into separate fields
2) Add a blank field at the start and end of the footage.
3) Weave the fields back together and hey presto, it has changed to tff.
Here's an example of the kind of script that I use:
# Load the DV footage as individual fields, bottom field first is automatic.
# Note: Fix the chroma upsampling of the Canopus DV codec.
dv=AVISource("vhs.avi").FixBrokenChromaUpsampling.ConvertToYV12
fields=dv.SeparateFields
# Add a blank field at the start and end of the original footage.
BlankClip(fields, 1) + fields + BlankClip(fields, 1)
# Weave the fields back together, the result being top field first.
AssumeFieldBased.AssumeTFF.Weave
# Trim the footage to the desired length.
Trim(0, 106018)
# Use the Convolution3D plugin to smooth out VHS capture nasties!
Convolution3D(preset="vhsBQ")
# Switch back to YUY2 colorspace for MPEG-2 encoding.
YV12toYUY2
Maybe this trick will be of use (or just of interest) to you. It's just a little something that I came up with one day and been using ever since.
Logiqx
1) Use the 'top field first' flag in CCE to move the video up one line and in effect change the footage from bff to tff.
2) Encode in CCE then use pulldown, restream or whatever your preferred tool is for switching the tff/bff flags in the mpeg stream.
I've been using a third option on my footage and find the results very pleasing so I thought that it could be worth sharing. Using AviSynth (v2.51) I use a simple script to change the DV material from bff to tff. This means that I can encode as usual and should anyone need to work with my footage later (e.g. rip from my DVD and re-encode for some reason) then the footage is tff and should not cause them any problems.
The principal is simple:
1) Split the frames into separate fields
2) Add a blank field at the start and end of the footage.
3) Weave the fields back together and hey presto, it has changed to tff.
Here's an example of the kind of script that I use:
# Load the DV footage as individual fields, bottom field first is automatic.
# Note: Fix the chroma upsampling of the Canopus DV codec.
dv=AVISource("vhs.avi").FixBrokenChromaUpsampling.ConvertToYV12
fields=dv.SeparateFields
# Add a blank field at the start and end of the original footage.
BlankClip(fields, 1) + fields + BlankClip(fields, 1)
# Weave the fields back together, the result being top field first.
AssumeFieldBased.AssumeTFF.Weave
# Trim the footage to the desired length.
Trim(0, 106018)
# Use the Convolution3D plugin to smooth out VHS capture nasties!
Convolution3D(preset="vhsBQ")
# Switch back to YUY2 colorspace for MPEG-2 encoding.
YV12toYUY2
Maybe this trick will be of use (or just of interest) to you. It's just a little something that I came up with one day and been using ever since.
Logiqx