PDA

View Full Version : HDV to NTSCi script


redguy
9th January 2007, 02:12
hello,
i have some HDV material captured, originally 1440x1080 50i, edited it and rendered to lagarith, same size, 25i. now I have postproduced it in aftereffects and i want to squeeze it into a DVD.
i tried this:


directshowsource("G:\logos\logos edit lags_.avi")
Converttoyuy2(interlaced=true)
SmoothDeinterlace(doublerate=true)
LanczosResize(486,324)
ChangeFPS(59.94)
SeparateFields()
SelectEvery(4,1,2)
Weave()
ConvertToRGB()


i know that something i am doing is wrong.
*first, picture size is correct, it fits in the screen right (with an 1.33 PAR, inside a NTSC .9PAR composition), but it is somewhat downgraded, so i suppose the numbers must be bigger but with a different aspect ratio.
*second, something with the fields is screwed because the image appears like "ghosted" to me. i also tried SelectEvery(4,0,3) to no avail.

i am aware of my noobness/newbieness. please be kind in case of any possible misconception :)

thanks in advance avisynth wizards...

Blue_MiSfit
9th January 2007, 02:42
Why the strange resolution? If you are putting it on an NTSC DVD then it has to be 720x480. If your aspect ratio is a bit screwy then addborders() as necessary.

A better bobber would probably be MVBob or even MCBob, but they are both very slow. Tdeint(mode=1) (bobbing) seems to work very well for me.

You shouldn't need so many colorspace conversions. What MPEG-2 encoder are you using?

About the ghosting, is your source material TFF or BFF? Use AssumeTFF() or AssumeBFF() in the beginning.

~MiSfit

foxyshadis
9th January 2007, 02:45
Start by putting a "return last" after SmoothDeinterlace. You need to see the output of the bob first (which is probably where your ghosting is coming from) and decide whether it's worth changing out. Those are pretty odd numbers, too; wouldn't it be better to resize to 720x480 and just set the AR in the encoder/muxer?

If possible, hook your TV up to an S-video on your PC, or get a DVD-RW and burn 10 minute chunks each iteration to see how it looks on TV during playback. That's the final arbiter of quality.

Pookie
9th January 2007, 03:46
HDV 1440x1080 is actually 1920x1080 (something about PAR, I think), which means you could try resizing to 720x400 and adding borders of 40 on the top and bottom


"HDV 1080i, like other new HD recording formats, uses a pixel aspect ratio of 1.33 to store data in a more mathematically and algorithmically efficient way. HDV 1080i uses a pixel resolution of 1440×1080, but when displayed is scaled to an aspect ratio of 1920×1080 = (1440 × 1.33)×1080. While this reduces horizontal resolution, the loss is less than the numbers would suggest, because the vertical resolution is also reduced by interlacing. The benefit of adding pixels is reduced if resolution in only one direction is increased, while the other lags too far behind" .....wikipedia

BlueCup
9th January 2007, 09:00
720x360 with adding borders of 60 wouldn't keep the correct aspect ratio?

G_M_C
9th January 2007, 09:31
Well, isnt it much easier to resize to 720x480, and setting the PAR to NTSC-wide in the encoder; XviD has such a setting, and it workt perfectly, my standallone even honours this setting.

I use it often, in many similar cases, where i want to resize HD material to SD material, think of BBC-HD for instance that uses 1440*1080MBAFF (Explination: I HAVE to do this because i DO want to see it, but i DONT have a HDTV yet :sniff: ).

It works on both PAL (720x576, setting PAL wide in xvid) and 720x480 (setting NTSC-wide in xvid). Most Mpeg2 encoder will have similar settings if i'm not mistaking.

BlueCup
9th January 2007, 10:01
I've used that method before too GMC. It should be the same as 640x360 (720x360 + 60 borders = 4:3).

redguy
9th January 2007, 23:49
thanks guys, i'll try these suggestions and'll be back

zambelli
10th January 2007, 00:03
SmoothDeinterlace(doublerate=true)
LanczosResize(486,324)
ChangeFPS(59.94)
SeparateFields()
SelectEvery(4,1,2)
Weave()

Ditto on what everybody else said about resizing. You should resize to 720x492, then crop to 720x480, and encode with 16:9 flag set.

You should also pay attention to field order. You don't seem to be setting field order anywhere (Assume?FF), so it's defaulting to BFF. Is that the right field order for the source? When you do SelectEvery(4,1,2), you're actually flipping the field order for the output. You should use (4,0,3) if you want to preserve BFF on output.

TDeint + EEDI2, SecureBob or MCBob are probably better choices for bobber.

2Bdecided
10th January 2007, 12:47
TDeint + EEDI2, SecureBob or MCBob are probably better choices for bobber.

It really doesn't matter when the source is 1080i and the target is 480i. Even bob() is good enough.

IMO!

Cheers,
David.

zambelli
11th January 2007, 04:55
It really doesn't matter when the source is 1080i and the target is 480i. Even bob() is good enough.
OK, yeah, I see your point. Since the target height is less than the field heigh (540), I can see how interpolating the other field doesn't really matter.

Blue_MiSfit
11th January 2007, 06:11
Wait a second... if you are reducing resolution so drastically, isn't it perfectly acceptable to do simply reduceby2(), then resize as necessary?