Log in

View Full Version : 720*480 29.970i -> 4:3 25.000p


Livesms
18th November 2006, 10:29
I've got 720*480 29.970fps interlaced video

I need to reencode it to play with DVD PAL standalone player
What is the best way to make this video 4:3 (640*480 seems to best way) and 25.000fps prog?

Blue_MiSfit
18th November 2006, 11:00
Well, there is no "best way".

What I've done in the past, and works well for me is the following avisynth script, created with the assistance of Mug Funky and scharfis_brain:


source("...") #Source filter of choice
assumebff() #Assuming you have DV input
tdeint(1,0,mthreshl=8,expand=4,chroma=true) #Bob deinterlace
resize(720, 576) #resize NTSC to PAL
framerateconversion(50) #59.94 to 50fps
converttoyuy2() #If source isn't already YUY2
assumetff() # Set field order for DVD
separatefields().selectevery(4,0,3).weave() #Reinterlace to 50i


This seems to do a good job at retaining motion fluidity (looks great for some exercise shows I had to do), and is easily accepted into an authoring program as PAL, after I set the encoder (CCE in my case) to PAL Interlaced 4:3 (though in my case it's 16:9). The decoder takes care of the rest.

Good luck.

~MiSfit

Livesms
18th November 2006, 11:27
Well, there is no "best way".

What I've done in the past, and works well for me is the following avisynth script, created with the assistance of Mug Funky and scharfis_brain:


source("...") #Source filter of choice
assumebff() #Assuming you have DV input
tdeint(1,0,mthreshl=8,expand=4,chroma=true) #Bob deinterlace
resize(720, 576) #resize NTSC to PAL
framerateconversion(50) #59.94 to 50fps
converttoyuy2() #If source isn't already YUY2
assumetff() # Set field order for DVD
separatefields().selectevery(4,0,3).weave() #Reinterlace to 50i


This seems to do a good job at retaining motion fluidity (looks great for some exercise shows I had to do), and is easily accepted into an authoring program as PAL, after I set the encoder (CCE in my case) to PAL Interlaced 4:3 (though in my case it's 16:9). The decoder takes care of the rest.

Good luck.

~MiSfit

1. Thank you
2. My source is FFmpeg TTF video
3. Resize NTSC to PAL from 720*480 to 720*576 or may be better leave 480 vertical resolution and resize to 640*480?
4. I need progressive output so no need for Reinterlace to 50i

Daodan
18th November 2006, 11:57
I guess it can't hurt to make it 720x480, but if you really want it compatible with the standard go for 720x576, it's safer this way. The codec usually takes care of this aspect, just select a preset (so you don't have to resize in the script). Also, is the source pure interlace or telecined?

Livesms
18th November 2006, 12:06
I guess it can't hurt to make it 720x480, but if you really want it compatible with the standard go for 720x576, it's safer this way. The codec usually takes care of this aspect, just select a preset (so you don't have to resize in the script). Also, is the source pure interlace or telecined?

720*576 is 4:3 and I' going to pla yvideo both PC and DVD - so I think 4:3 is better cause playing 720*576 will produce "think heads"

How can find out if my video is pure interlace or telecined?
Opening it with Vdub looks like this
http://h.foto.radikal.ru/0611/78712438707dt.jpg (http://foto.radikal.ru/f.aspx?h061178712438707djpg)http://g.foto.radikal.ru/0611/d2716cab704ct.jpg (http://foto.radikal.ru/f.aspx?g0611d2716cab704cpng)

Daodan
18th November 2006, 12:15
If all frames look like that (with combing) than it's interlaced. If there are ok frames in a certain pattern (usually 3 ok, 2 intelaced) than it's telecine -this usually is for movies (comercial movies).

Livesms
18th November 2006, 12:26
If all frames look like that (with combing) than it's interlaced. If there are ok frames in a certain pattern (usually 3 ok, 2 intelaced) than it's telecine -this usually is for movies (comercial movies).

When I looked closer I start hesitation :)
Here is the sample (http://www.egoshare.com/63775068be522ecbf9b0803f9cad26f1/sampleavi.html) from video

Could you look and give me advice....

Daodan
18th November 2006, 12:57
That looks a bit weird. If you analyze you see 4 interlaced, 2 progressive which is a bit unusual. By the looks of it it seems like interlaced content encoded progressive as no deinterlacer seems to be able to give good results.

Blue_MiSfit
18th November 2006, 13:22
On second thought, it's probably best to just add black borders for 4:3 NTSC stuff that you want to convert to 4:3 PAL.

As for your source (which is painful btw) - I can see a 4:2 pattern - so 4 interlaced frames and 2 progressive frames, but it looks like this has been processed before - because the first of 2 progressive frames has some artifacts that look like a bad deinterlacing.

This might be field blended crap (as it's affectionately known around here), and if so I'm not sure how to work with it.

Interestingly -
AssumeTFF().tdeint(1,0,mthreshl=8,expand=4,chroma=true).SelectEven() seems to produce very nice results for deinterlacing - gets rid of the bad artifacts, and motion is smooth.

Converting to PAL on the other hand isn't so easy - but I'm no expert. The answer may be right in front of us. The best I can come up with (preserving the interlaced structure I think):

AssumeTFF()
tdeint(1,0,mthreshl=8,expand=4,chroma=true)
addborders(0,48,0,48)
convertfps(50)
convertToYUY2()
separatefields().selectevery(4,0,3).weave()


Looks alright, but the motion is kind of jerky (when you deinterlace on playback anyway).

Not sure if adding borders is wise... but logically it makes sense since its a 4:3 resolution, and you wouldn't want things to be stretched vertically.

Hopefully someone else here will have a better idea! Maybe MVFlowFPS2 from MVTools for the framerate conversion, but it's slooow :)

~MiSfit

Livesms
18th November 2006, 13:34
I run MeGui test analyse to get another suggestion

The result is here http://j.foto.radikal.ru/0611/06513d2ba9b4t.jpg (http://foto.radikal.ru/f.aspx?j061106513d2ba9b4png)

And suggested script is
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=3)


Blue_MiSfit
In you script - Tdeint has no parametr named expand
Syntax
TDeint (clip, int "mode", int "order", int "field", int "mthreshL", int "mthreshC", int "map", string "ovr", int "ovrDefault", int "type", bool "debug", int "mtnmode", bool "sharp", bool "hints", PClip "clip2", bool "full", int "cthresh", bool "chroma",

I swap convertfps(50) and convertToYUY2() cause convertfps requiers YUY2...

Blue_MiSfit
18th November 2006, 23:19
Now I finally realize that you want to go to 25p - not 25i :)


AssumeTFF()
bob()
addborders(0,48,0,48)
ConvertToYUY2()
ChangeFPS(50)
selecteven()


The TDeint that I suggested was actually screwing up the motion a little bit. Strange that it didn't work at all for you - maybe your version is out of date.

Livesms
19th November 2006, 10:27
Now I finally realize that you want to go to 25p - not 25i :)


AssumeTFF()
bob()
addborders(0,48,0,48)
ConvertToYUY2()
ChangeFPS(50)
selecteven()


The TDeint that I suggested was actually screwing up the motion a little bit. Strange that it didn't work at all for you - maybe your version is out of date.

Yes - I need 25p for MPEG4 Xvid reencode (to play with DVD standalone cause it refuse to play Ffmeg :))

Adding borders looks unnesseccery because of ascept ratio for NTSC is 1,5:1 and PAL is 1.33:1 so I need to resize it to 768*576 or 640*480. 720*576 will no be played correclty on PC - not all players read and use ascept ratio 1.33:1 even if video is 1.25:1