PDA

View Full Version : Progressive NTSC -> PAL conversion ?


joybreaker
28th November 2007, 10:07
Hello.

Could someone please give me an example how to use Avisynth to get NTSC progressive 30fps video to PAL 25fps?

I'm trying to make a PAL dvd video from hockey game that is NTSC 30fps progressive footage 480 x 320...

I have converted the frame rate as told in many tutorials and posts on this forum as well.

But the result has a kind of a "ghost" effect like this:

Frame1:
http://www.jlunnas.com/video/frame1.jpg

Frame2:
http://www.jlunnas.com/video/frame2.jpg

My avisynth script goes as follows:

AVISource("M:\capture\chipit_game1_classictv.avi")
ConvertFPS(25)

............

as you can see the "ghost" effect on Jagr's right side.
The ChangeFPS(25) doesn't do this kind of effect, but it skips frames randomly so the end result is a bit jerky. So, what's wrong?

Any help from persons who have actually done this or know how this can be done, would be highly appreciated, no guessing please. Thanks.

ajk
28th November 2007, 10:44
Skipping/doubling frames and blending them together are the two simpler choices, if neither of those is acceptable you need to look into motion compensation. These techniques will follow the motion and attempt to recreate the required frames to the best of their ability. The end result can be spectacular, but new problems may also be introduced in cases where the motion estimation goes wrong. I suggest reading this thread (http://forum.doom9.org/showthread.php?t=113256) IN FULL, should give you some ideas and ready made scripts to experiment with.

Also, if you don't need the resulting DVD to be progressive, you could make it interlaced and use the frame skipping methods, spreading 30 frames over 50 fields will yield much smoother results than 30 frames to 25 frames even with the simpler tactics. See Xesdeeni's work in this thread (http://forum.doom9.org/showthread.php?t=45459).

2Bdecided
28th November 2007, 11:30
I think 30p > 50i by duplicating frames to fields is just...

AVISource("M:\capture\chipit_game1_classictv.avi")
changefps(50)
lanczos4resize(704,576)
assumetff()
separatefields()
selectevery(4,0,3)
weave()
assumefps(25)

...but I could be wrong.


If you want to create 50 new fields per second via motion compensation, grab mvtools...
http://avisynth.org.ru/mvtools/mvtools.html
...and try this...

source=AVISource("M:\capture\chipit_game1_classictv.avi")

# Get motion vectors (slow version)...
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1, divide=2,overlap=4,search=3)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1, divide=2,overlap=4,search=3)
cropped = source.crop(4,4,-4,-4)
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2, divide=2,overlap=4,search=3)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2, divide=2,overlap=4,search=3)

# change frame rate (slow verssion)
source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=50,den=1,idx=1,idx2=2)

lanczos4resize(704,576)
assumetff()
separatefields()
selectevery(4,0,3)
weave()
assumefps(25)


...the result should be very smooth, but the processing will be very slow. For a faster version, change the motion compensation parts in the above script to...


# Get motion vectors (fast version)...
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1, divide=2)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1, divide=2)

# change frame rate (fast verssion)
source.MVFlowFps(backward_vec,forward_vec,num=50,den=1,idx=1)


IMO the Salfps3 results in the alchemist thread aren't quite as good as the slow version above, but are faster. MotionprotectedFPS on its own is worse still, but faster still.

Hope this helps.

Cheers,
David.

ajk
28th November 2007, 12:14
The slow version is indeed very good, but it could still benefit from the "funny structure protection" (I anticipate some wobbly hockey sticks here and there) and also a scene change detector. At least the for the first problem some answers can be found in the Alchemist thread.

I'd probably go for 50i without motion estimation in this case, it should work just fine and it's simple and fast. Difficult to say without actually seeing the source, of course.

pandy
30th November 2007, 17:38
This look very interesting:
http://www.compression.ru/video/frame_rate_conversion/index_en_msu.html

scharfis_brain
30th November 2007, 19:31
īt is worse than mvtools.

2Bdecided
30th November 2007, 20:35
Plus it only doubles the rate, so no help here.

Cheers,
David.

pandy
2nd December 2007, 22:22
īt is worse than mvtools.

but is easier to use especialy for those that is not familiar with mvtools

pandy
2nd December 2007, 22:25
Plus it only doubles the rate, so no help here.


hm i know that i have very poor english but from description of this plugin i read that: "It increases the frame rate integer times."
so new frame rate can be integer multiply of incoming framerate (2,3,4 etc). Even given example is 4 times output framerate.

ajk
2nd December 2007, 22:29
Even so it wouldn't be very useful for 30 fps -> 25 fps. Perhaps by increasing the frame rate a lot more to some common denominator and then going back down again, but mvtools would do it all right away.

pandy
3rd December 2007, 16:46
Even so it wouldn't be very useful for 30 fps -> 25 fps. Perhaps by increasing the frame rate a lot more to some common denominator and then going back down again, but mvtools would do it all right away.

30 > 150 > 25 ;)

medp7060
5th December 2007, 09:29
Why not just use this to convert 30 to 25 fps:
ConvertFPS(25,1, 80,49)