View Full Version : How do you Reinterlace deinterlaced footage?
Undead Sega
22nd June 2008, 14:17
Hi, i have a video that i deinterlaced or bobbed from 50i to 50p in an avi format, and inwhcih now i want to take that 50p video footage and make it into a 50i again.
i was wondering if this is possible, without any further post-processing, just a simple reinterlacing is what i am looking for.
would be great help if i can get it done really soon.
thanks :D
neuron2
22nd June 2008, 14:24
You can't reinterlace a deinterlaced clip. You can reinterlace a bobbed clip.
separatefields().selectevery(4,0,3).weave()
Undead Sega
22nd June 2008, 14:26
well, that as well, i have bobbed a 50i clip to 50p.
would i need any external filters?
neuron2
22nd June 2008, 14:44
well, that as well, i have bobbed a 50i clip to 50p. If you meant you went from 50 fields/sec (25 interlaced frames per sec) to 50 frames per second, then you can use the chain I gave you. If you meant your source was 50 interlaced frames per second, then that is deinterlacing not bobbing.
The key is whether you have discarded the temporal information. Deinterlacing discards the field rate information. Bobbing retains it.
would i need any external filters? Not for the chain I gave you.
Alex_ander
23rd June 2008, 10:10
If you want TFF as output, add AssumeTFF() before that script. Otherwise default BFF will be assumed for field separation (the script doesn't invert that assumed order).
Undead Sega
23rd June 2008, 19:19
now i have a problem with my filter, i use YadifMod to bob my footagr from 50i to 50p and it worked great. Now when i d the same thing and input it into VirtualDub, it basically speed up the whole thing twice the speed (this is because the framerate changed to 50fps thus speeding it twice as fast).
even when i input it into TMPEGEnc directly, it does the exact thing, why is ithis doing this to be now?
AviSource("C:\CLIP.avi")
AssumeFPS(50) *i did 25 but that basically slowed it down and still gave 25p*
AssumeTFF()
ConvertToYV12()
yadifmod(order=1,field=1,mode=0,edeint=nnedi,opt=0)
ConvertToRGB24()
mikeytown2
23rd June 2008, 19:33
If "CLIP.avi" is 50 FPS then AssumeFPS(50) would be pointless. what is the original frame rate of "CLIP.avi"? what happens when you remove the AssumeFPS(50) line?
Didée
23rd June 2008, 19:45
AviSource("C:\CLIP.avi")
# AssumeFPS(25) # 25 probably is correct, but superfluous anyways. Source fps IS SOURCE FPS, period*
AssumeTFF()
ConvertToYV12(interlaced=true) # input is interlaced, yes?
yadifmod(field=-2,mode=1,edeint=nnedi(field=-2),opt=0)
ConvertToRGB24()
Fixed.
Position of ConvertToYV12 is questionable, too. If the input is YUY2, then the conversion should be done after YadifMod, not before.
Undead Sega
23rd June 2008, 21:21
with this, will i get 50p then?
Gavino
23rd June 2008, 21:43
with this, will i get 50p then?
Yes, mode=1 is for bobbing, which doubles the frame rate.
This assumes you are starting with something which is 25 FRAMES per second interlaced, which is what 50i usually means.
Mounir
17th September 2011, 02:12
How could i do to reinterlace the following video guys:
mpeg1 352x 240 (vcd) / 29.970 (progressive / deinterlaced )
content: music, concert / live
Thanks for your help
johnmeyer
17th September 2011, 03:05
As with the OP, the term "reinterlace" needs to be defined. He defined it as wanting to go from 50p to 50i. In your case it sounds like you might want to go from 29.97 progressive to 60i. If so, the following code may be of some use. I use it to take my Canon still camera videos, which are 30 fps progressive, and use them on a DVD alongside my 720x480 DV interlaced video from my old digital camcorder.
You will need to modify some of the parameters, but this should get you started. I haven't used this code for a long time, and looking at it now, I'm not sure that the 720x480 resize is the correct way to resize to output to DV 720x480.
# This script converts 30 fps progressive footage from a 640x480 still camera
# into 720x480 29.97 interlaced (NTSC SD) video
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
AVISource("e:\my_video.avi")
source=AssumeFPS(30, false).LanczosResize(720,480)
super=MSuper(source,pel=2)
backward_vec = MAnalyse(super,blksize=16, overlap=4, isb = true, search=3 )
forward_vec = MAnalyse(super,blksize=16, overlap=4, isb = false, search=3 )
MFlowFps(source,super,backward_vec, forward_vec, num=60000, den=1001, ml=100)
SeparateFields()
SelectEvery(4, 0, 3)
Weave()
AssumeBFF()
AssumeFPS(29.97, false)
Mounir
17th September 2011, 04:30
Is there a logicial reason to put assumefps=30 rather than 29.7 early in your script ?
source=AssumeFPS(30, false).LanczosResize(720,480)
I'm gonna try it and see the end result anyway
johnmeyer
17th September 2011, 05:07
Is there a logicial reason to put assumefps=30 rather than 29.7 early in your script ?
source=AssumeFPS(30, false).LanczosResize(720,480)As I said above, you will have to change some of the settings. I merely copy/pasted some code. So, yes, you do need to change that from 30 to 29.97 (not 29.7).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.