View Full Version : interlaced NTSC -> PAL w/ MVTools?


Blue_MiSfit
2nd November 2006, 02:31
Ok, so I've got a DV Project that I want to make a PAL DVD out of. I know NTSC -> PAL and vice versa is a severely beaten dead horse, but I was wondering if people had suggestions for my workflow. I'm trying to do the framerate conversion with MVtools for smooth motion.

Here is my current script:


qtinput("c:\new pal test", audio=true)

source=last

backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)

cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)

return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=25,idx=1,idx2=2).addborders(0,48,0,48).convertToyv12()


I then encode this with HC, @ roughly 6mbps. The result is acceptable. but I'm not sure if my approach preserves the interlacing.

Suggestions?

~Misfit

Mug Funky
2nd November 2006, 03:19
try the same thing, but change num to 50 (not 25), add a bob-deinterlace beforehand, and a "assumetff().separatefields().selectevery(4,0,3).weave()" to the end.

also resize before that interlace command i just gave - this works better than adding borders, as that'll make the aspect ratio wacky.

encode as interlaced, top field first (not the bottom-field that DV defaults to...). if you want bottom-first, change the selectevery above to "selectevery(4,1,2)" instead of 4,0,3

i recommend tdeint(1,0,mthreshl=8,expand=4,chroma=true) for the bob-deinterlace part.

Blue_MiSfit
2nd November 2006, 03:28
Sweet.

The AR is very much off when I add borders from 720x480 to 720x576, and encode as 16x9. I'm not really clear on how to make the 720x480 anamorphic image fit in a 720x576 frame and have it get displayed correctly on playback. Perhaps you can clarify this for me


I may have tried to REALLY over think this one. All I really need to do is resize to 720x576, and set 16x9 in my MPEG-2 encoder right?


I see your point about bobbing and then reinterlacing after converting the frame rate. It seems to perserve the interlaced structure (or rather re-create it) much better than the original method.

Thanks for the prompt reply
~MiSfit

Blue_MiSfit
4th November 2006, 02:35
Works great. The HC'd M2V and original AIFF went happily into DVD Studio Pro when selecting PAL mode. Encoded the AIFF to 2ch AC3 to save space, and everything works great :) Bobbing on playback to 50p looks fantastic.

I'm, curious, I did nothing with the audio, yet it sync'd perfectly with the 50i m2v. I would think that I would need to slow it down, but I didn't. What gives?

Thanks Mug Funky!

~MiSfit

scharfis_brain
4th November 2006, 03:36
the best (yeah I know the roules ;) ) quality for pure interlaced sources can be achieed with didee's newest creation: mcbob(). It enhances the resolution compared to traditional deinterlacers a lot and also reduces interlace flicker noticably!
Of course it will take ages to process you video.
But rest assured you may top the quality of a Snell & Wilcox conversion with this combination.

you script should look like this:

source("blah")
assume?ff() #input field order (commonly BFF with DV)
mcbob() #bob-deinterlace
resize(width, 576) #resize NTSC to PAL
framerateconversion(50) #59.94 to 50fps
converttoyuy2() #YUY2 is needed for most encoders. Only HcEnc and QuEnc are able to process YV12 correctly!
assume?ff() #output fieldorder (DV=BFF, DVD=TFF)
separatefields().selectevery(4,0,3).weave() #reinterlace 50p to 50i (25fps)

Blue_MiSfit
4th November 2006, 04:56
schweet deal scharfis_brain :)

Has anyone tried mcbob with MT?

I've got a MacPro running boot camp here, and using CCE it's got cycles to spare :)

~MiSfit

Didée
4th November 2006, 05:09
@scharfis_brain: Thanks for the flowers;), but aren't you shooting a lil too fast?

Biggest issue is
framerateconversion(50) #59.94 to 50fps [ # or vice versa ]

for which IMO we don't have a really satisfying solution, in respect to avoiding artifacts (without throwing away too much of the benefit. If it were only about masking out all artifacts, well that's easy: just use a fullframe-white mask - tadaa, no artifacts at all :D ).

... and MCBob is still in it's swaddling clothes. :)

Mug Funky
4th November 2006, 09:27
But rest assured you may top the quality of a Snell & Wilcox conversion with this combination.

not as hard as it seems :) i've seen conversions done by them fail on relatively simple stuff. they don't like 3:2 for instance... comes out jittery and in fact regular blending looks better.

McBob certainly looks fantastic though. could make a good way to do HDTV upconversions on a budget (hell, for australian TV it's there already, considering 576p is considered HD... go figure. stupid clueless government ruining everyone's lives and eating our steak)

Blue_MiSfit
4th November 2006, 14:46
interesting... I mentioned I was running all this nonsense on a Mac Pro.

Under Parallels (running in software virtualization), i got ~ 5-8 fps running HC. when doing my previous script with tdeint and mvflowfps2

Under native Boot Camp XP, got 1-2 fps running CCE. The raw source runs ~ 100 fps. I wonder what changed? I've got a lot to learn about multi threading apparently!