Log in

View Full Version : What Needed To Cut and Stretch Video


GParent
5th September 2003, 19:50
What is the best way to take a video that has around 10 "sync noise" lines at the bottom and delete them?

I don't want to crop because I need to retain the 720x480 AVI I need to feed into CCE for DVD authoring.

Also, I know I can put a black bar over the bad lines (10 pixels) but on a good TV you see the 10 black lines at the bottom, out of proportion with the 10 good lines at the top.

Is there a high quality way to cut 10 pixels (lines) off the bottom and then stretch the video to fill the full 480 lines out?

Thanks,

Gary

bb
6th September 2003, 06:39
It's easy to do that by cropping the bad lines and resizing back to full size (I'd use BicubicResize for this purpose). But on the other hand you'd distort the picture, i.e. the aspect ratio won't be correct. If you ask me, I'd rather live with the black bars.

bb

GParent
6th September 2003, 21:20
BB,

How about this for a compromise. If I crop 8 lines off the bottom, I get 720x472 representing good video lines, and then add 4 black to the top and 4 black to the bottom, returning me to 720x480, pseudo letterbox mode.

This will make it symetric and if you play the DVD on most TV sets, the black bars are probably not going to be noticed, and it might even have a serendipitous side effect of showing a bit more of the top lines if displayed on overscanned or maladjusted sets. Although, a really good TV will display it like a letterbox.


LoadPlugin("H:\STYLE\convolution3d.dll")
AviSource("H:\STYLE\STYLE.AVI")
ConvertToYUY2(interlaced=true)
CropBottom(8).AddBorders(0, 4, 0, 4)
SeparateFields()
odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()


NOTE: LINE 4 can be modified by using LETTERBOX but I am not up on how to do that yet.

bb
6th September 2003, 21:29
Yes, that's not bad. I always center my captured video, even if it wasn't centered properly in the source.

bb

GParent
6th September 2003, 22:39
BB, a break thru on the resize. Late last night I did some Google searches and found what was the answer. Namely, to do the resize on each field, separately.

Please Go To Paragraph: 4.2.1 PROCESSING INTERLACED VIDEO

http://www.doom9.org/index.html?/capture/postprocessing_avisynth.html

Its sort of a page from your recommendation to use the C3D filter on each field. I had created a test DVD late last night and just tried it. NO RIPPLE!

Here is what I tried:

LoadPlugin("H:\STYLE\convolution3d.dll")
AviSource("H:\STYLE\STYLE.AVI")
ConvertToYUY2(interlaced=true)
CropBottom(8)
SeparateFields()
odd=SelectOdd.LanczosResize(720, 240).Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
evn=SelectEven.LanczosResize(720, 240).Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()

___________________________________________________________________

An alternative Script:

LoadPlugin("H:\STYLE\convolution3d.dll")
AviSource("H:\STYLE\STYLE.AVI")
ConvertToYUY2(interlaced=true)
CropBottom(8)
SeparateFields()
odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
odd=LanczosResize(odd,720,240)
evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0)
evn=LanczosResize(evn,720,240)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()


_________________________________________________________


What is the recommended script to use and should I do the resize before or after the C3D filter?

NOTE: I plan to make up two DVDs. One with the border we discussed and the other with the resize. Then I will check it on several DVD players and TV sets before having it mass duplicated.

bb
7th September 2003, 14:28
In the first script you posted above you don't resize at all, but crop and add borders instead. That's what I would do, because it doesn't stretch the video.

Regarding the resize: If you need to resize vertically, you have to do it for each field separately, else you'd hurt the line structure of the interlaced frames. And you have to make sure, that you get back to the full vertical frame size in the end, i.e. 576 for PAL, 480 for NTSC. The two scripts with the resize you posted respect this, so they're both correct from that perspective. They do both the same thing, there's only a syntactical difference; i.e. there's no difference on which one you use. I would rather use BicubicResize instead of LanczosResize because of the better performance (or even trbarry's SimpleResize, which is a fast BilinearResize). I doubt that you'll see a difference, except for the processing speed.

bb