Log in

View Full Version : ntsc interlaced to pal dvd conversion


troy
16th July 2004, 16:49
I am trying to convert an NTSC interlaced video to pal to send overseas. I am using avisynth 2.5.

LoadPlugin("MPEG2DEC3dg.dll")
LoadPlugin("SmoothDeinterlacer.dll")
mpeg2source("d:\st\st1.d2v")
SeparateFields()
Weave()
SmoothDeinterlace(doublerate=true)
#ConvertFPS(50)
ChangeFPS(50)
LanczosResize(720,576)
SeparateFields()
SelectEvery(4,1,2)
Weave()
Converttoyuy2()

I get unrecognized exception on line 9. If I try to use convertfps instead of changefps I get convertfps needs yuy2 input. I tried adding the line converttoyuy2() before this command with no help. I have the plugins in the avisynth directory. any help?

troy
16th July 2004, 17:16
I changed my script to the following and it seems to load up ok. Does this script seem ok. Again my source is a wedding dvd video that is interlaced.

LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\SmoothDeinterlacer.dll")
mpeg2source("d:\st\st1.d2v")
SeparateFields()
Weave()
converttoyuy2()
SmoothDeinterlace(doublerate=true)
LanczosResize(720,576)
#ConvertFPS(50)
ChangeFPS(50)
SeparateFields()
SelectEvery(4,1,2)
Weave()
Converttoyuy2()

Mug Funky
16th July 2004, 18:18
try:

LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\SmoothDeinterlacer.dll")
mpeg2source("d:\st\st1.d2v")
SmoothDeinterlace(doublerate=true)
LanczosResize(720,576)
ChangeFPS(50)
SeparateFields()
SelectEvery(4,1,2)
Weave()


there were a few redundant lines in your script.

converttoyuy2() is only needed for a couple of internal avisynth filters, and will blur chroma and take slightly longer to process if it's used on filters that don't require it. also, it should have the argument interlaced=true for interlaced video - this affects how the chroma is upsampled (it is stored at half the vertical and horizontal size in DVD's YV12 colour, and as such the interlacing is potentially compromised unless some hoops are manually jumped through).

however, i'd do something like:


mpeg2source("yadayadayada.d2v")

SmoothDeinterlace(doublerate=true)
converttoyuy2() # frames are progressive at this point
convertfps(50)
converttoyv12()
LanczosResize(720,576)
separatefields().selectevery(4,0,3).weave() # 4,0,3 will give bottom-first


the 4,0,3 instead of 4,1,2 is to swap the field order (i think PAL is different order, but i'm not really sure, and the best way to test is on a PAL capable interlaced TV).

however, again there are much better methods out there - this may be a little advanced if you're new to the scripting, but you should read up on MVtools - this will calculate the motion frame to frame, and is capable of converting the frame rate by actually making new frames rather than blending existing frames together. it does this impressively well, especially for natural video.

it'll run slowly though, and you'll still need a full-framerate deinterlacer (how's smoothdeinterlacer working? i haven't used it). full rate deinterlacing (or "smart bobbing") is another potentially very slow process, but well worth it, as a dumb bob will give you problems on horizontal and near horizontal detail (shimmering)

troy
16th July 2004, 23:20
I was told somewhere where I need.

SeparateFields()
Weave()

before smoothdeinterlacer. I put in converttoyuy() before smoothdeinterlacer because it complained that smoothdeinterlacer needed yuy2 input. When I get home I will try to take out all three commands before smoothdeinterlacer to see if that works. Anyway the script that I had seems to produce a dvd compliant pal m2v file as I was able to make a pal dvd compliant video in dvdlab. I am not too much worried about the quality as long as it will play. The dvd plays on my computer but I have no idea where I can get a pal dvd player and tv to test it on. I guess i'll just have to send it away and hope for the best.