View Full Version : DV Deinterlace.
avig70
25th May 2002, 07:58
After looking at the captured DV file that I made and reading almost all the threads here I still seem to have a problem deinterlacing the captured DV file.
There is no problem just to open the file in virtualDub using aviSynth's DirectShowSource("c:\DVApp.avi") and then doing some kind of manipulation on one field and getting sort of a good picture, only that picture has 1/2 the vertical lines duplicated or at best duplicated only where interlace is noticable.
I see that the fields that are needed for deinterlacing the file are there so isn't there some kind of TRUE deinterlacer like a good IVTC filters that actually rearrange the fields to get progressive frames ??
avig
Interlaced DV is truly interlaced, i.e. every field is shot at a different time. IVTC is useless, because the source isn't telecined. Phase shifting wouldn't help either. You need a true deinterlacer like Donald Graft's smart deinterlace. (That's the reason why I bought a Canon MV3, which is capable of progressive scan.)
bb
avig70
26th May 2002, 11:52
Thanks for the explenation.
But why would they want to do that ??
avi
Do what? Use interlaced mode for most DV camcorders?
First of all because of technical reasons like bandwith, and the format of the targeted output devices (TV sets). They say it plays back smoother than progressive.
You can leave your stuff interlaced if you don't resize vertically, and if you use an encoder which can handle interlaced mode, such as MPEG2 (NOT MPEG1!) or XviD. But you'll need a higher bitrate.
bb
Dali Lama
27th May 2002, 07:18
hey avig70, I was going to start a thread like this some days ago, until I figured something out. Well first of all everything bb said is true to my knowledge and his advice is the "standard" one in the video world. However, I have a technique I like to use with Interlaced DV.
It goes like this:
In your script, add: SeparateFields()
This will take your 30 fps interlaced video and make it 60 frames per second progressive (not sure if its really progressive, but there are no interlaced frames). Whats happening I think is its separating the one interlaced frame into two progressive frames that represent motion one frame before and one frame after. anyways...
Afterwards, in Virtualdub, go to Video --> Frame Rate --> Frame Rate Decimation --> Select Process Every Other Frame (Decimate by 2)
You can also do this in the AVS with Decomb using decimate(cycle=2).
Your end result will be 30 fps progressive encoding that's smooth and crisp (no interlaced lines).
I encourage everyone interested in DV to try this out. Oh and tell me what you guys think of this method.
Take Care,
Dali
avig70
27th May 2002, 12:20
Hi everyone, thanks for the help.
@bb
Now I understand the subject a hole lot better.
I also have canon camera MV430i and it has "Progressive Photo Mode" that I think is used only for taking stills unfortunently.
@Dali
Like I saied in the begining of the thread, doing that is actually manipulating only one field and therefor cutting the vertical resolution in half.
Isn't the picture you are getting half in vertical size ??
When you use SeparateFields() you get only one field half in size of the two fields combined and to fix that you need to use Weave() or somthing like the script I wrote below, isn't that so ?
I think it might get better results to do:
SeparateFields()
SelectEvery(2,0) or SelectEvery(2,1)
BicubicResize(512,384,0,0.5)
Better for magnifing, using it with the same horizontal width and the original vertical figure.
Anyways thanks
avi
YellowShark
27th May 2002, 22:09
Here is what I've learned reading this this forum and from my own little experience in DV capture/encoding:
If your target is VCD/SVCD/DVD (i.e. mpeg2) and you're gonna watch it on your TV set then just leave it interlaced - like bb said, interlaced video really look smoother on a standard TV set.
If you want to encode to DivX then you have to deinterlace. There are many ways to do it and none is perfect. You will never get quality you would have from a progressive scan camera (@bb - I wish I knew that before I bought mine camcorder :)) After deinterlacing you usually end up with ghosting or blurring or 50fps video :).
Personally I hate ghosting so I don't use field blending when deinterlacing. If I encode a video for some friends to watch I use GreedyHMA (AVISynth filter included with GKnot) - by many on this forum it is considered the best deinterlacer - I agree. You can also give Donald Graft's Decomb package a try. You are always loosing your original resolution (or sharpness should I say) when doing deinterlacing this way - there is interpolation / averaging / blending involved. Anyway - information is LOST! But you have 25fps video which is good for your friends :) After all, not everyone has the system powerful enough to watch 50fps full screen.
However the best results (perhaps that's just my personal preference) can be achieved by splitting fields. Yes, the vertical resolution is halved, but NO INFORMATION IS LOST! You keep two entire fields! Of course you end up with 50fps video which may be a problem for slower machines to play and surely takes a lot more bitrate to encode. But if it is the quality you're after then this is the way to go (again, at least for me it is). The big gain when splitting fields is the smooth playback. Do some test yourself and I am sure you will love 50fps. Deinterlaced 25fps looks really jerky when you have any kind of movement in your video (and you usually have - otherwise, why not just take a picture!) Panning / zooming looks the worst in 25fps deinterlaced.
The ideal would be to keep 720x288/50fps video - it would take roughly the same bitrate as full DV frame (720x576 - I am using PAL obviously) and then watch it thru AVISynth resize in real time. Unfortunately my Athlon 1700+ is to slow for that :( (remember, this video is 50fps). So the way I am doing it is to resize that 720x288x50 to the final resolution of my preference (taking into account the file size I am aiming for and making a compressibility test with Jonny's tool - look for it in DivX 5 forum).
I hate to increase that 288 and waste my bitrate, but until I buy myself a dual 2.2GHz Pentium (which is never :)) I will use this method - for me it's the best compromise of still frame quality, smoothness of the video and machine power consumed for playback. Files are a bit big though :)
If you can accept 360x288 res (I can for some videos) then use (in AVISynth):
SeparateFields()
HorizontalReduceBy2()
Otherwise resize after SeparateFields to whatever res you want. You can also try Bob (it's an AVISynth filters that does field separation and vertical resizing in one step, plus shifts fields a bit to match them better spatially - but I don't find that so neccessary - maybe I should do some more testing).
I guess that's it. Nothing really you wouldn't find in other threads :)
Cheers,
YS
@YellowShark:
Don't you get line flickering with your 50fps full fram size method? I'm asking because the lines of your fields will be doubled, and therefore always every other line of pixels would be in the wrong place (1 line shifted), and the next frame would have the same effect with the displacement in the other lines.
I mean, wouldn't there be a mismatch regarding time and position of half the pixels?
@avig70:
Bad luck, you need a progressive film record mode. On my camcorder I can switch between Movie (which is the standard interlaced mode) and Progressive Scan (which is... guess what). There are several photo modes, too, although I don't use them, because I can take out progressive frames in the filmed video wherever I like - and this way you never miss the best snapshots! It's like shooting photos all the time, and you can pick the most stupid faces ever seen.
@Dali Lama:
Your method reduces the vertical resolution by 2. No hassle with combing, but I prefer more details. Smart Smoother was my way to go when I had to deal with interlaced video from a different camcorder once. But GreedyHMA is a great one, too.
bb
Antti
28th May 2002, 07:50
I usually use Smart Deinterlacer interpolating mode(which is virtually the same as decomb, as they use the same codebase), never tried GreedyHMA though. In an ideal case, you only lose temporal resolution with SD. If you have a powerful machine and a clip with lot of motion, you could want to use Smart Bob. SB converts 50 fps interlaced to 50 fps progressive while retaining all information (that is, if it worked perfectly ;) ).
With a little tweaking I got great results with it, but to get perfect results you may have to tune thresholds in a scene-by-scene basis.
Originally posted by Antti
SB converts 50 fps interlaced to 50 fps progressive while retaining all information
This is NOT POSSIBLE with truly interlaced video, because the information you'd need is simply not there. You can indeed retain all information if the video source is phase shifted only or something similar. But that does not apply to interlaced DV.
bb
Antti
28th May 2002, 11:42
You misunderstood, perhaps my English isn't very good. Of course it doesn't create any new information. What smart bob is supposed to do is to use information from both fields in non-moving areas and interpolate in moving areas, while retaining temporal resolution (what Smart Deinterlacer doesn't do). The problem is of course to determine which parts of video are moving and which aren't.
Retaining information means it doesn't lose any details compared to original DV material in an optimal case. In reality results may vary.
theReal
1st June 2002, 15:25
DaliLama, you know that you are discarding one field with your method? You could also use VerticalReduceBy2 in avisynth, then resize and get exactly the same, only faster.
But, you are discarding one field and thereby you only get half the vertical resolution!
Here are some deinterlacing options for avisynth which are quite good (except for the smartdeinterlace, all are taken from the Gknot .avs script).
Usually, smartdeinterlace is the best, I think, but Decomb's fielddeinterlace is also good. Smartdeinterlace might be more compressible with blend=true, but blend=false gets rid of the ghosting.
# DEINTERLACING
SmartDeinterlace(2,10,true,false,true)
# usage: SmartDeinterlace(mode,treshold[,denoise[,blend[,fast]]])
# or use
#FieldDeinterlace()
# or use
#VerticalReduceBy2
# or maybe
#GreedyHMA(1,0,0,0,0,0,0,0)
SkaDood1
1st June 2002, 20:55
On a related line of questions, when thinking about editing footage with say premiere or pinacle or some video editing software, should I just leave it in interlaced if my final output is just going to be dvd or the such? bb said something to those effects:
Originally posted by bb
First of all because of technical reasons like bandwith, and the format of the targeted output devices (TV sets). They say it plays back smoother than progressive.
bb
and
Originally posted by YellowShark
If your target is VCD/SVCD/DVD (i.e. mpeg2) and you're gonna watch it on your TV set then just leave it interlaced - like bb said, interlaced video really look smoother on a standard TV set.
YellowShark
It seems like alot of effects (slow motion, colorization, cut effects) and editing will be hard to do in a badly interlaced (fast motion) scene though and was wondering if anyone had had any experience in editing interlaced dv video.
Basically my question boils down to, should I do editing and what not before deinterlacing using one of the above methods? or should I go ahead and deinterlace then edit because it may be easier or clearer after its deinterlaced?
Thanks for any help in advance!
theReal
1st June 2002, 23:28
You can set video editing programs like Ulead Video Editor and also VDub (I think, I'm not sure) to edit interlaced video.
In Ulead, rendering interlaced to interlaced is a lot faster and it does look better when watched on TV than when you convert it to progressive (seems to pump and flicker a little bit on the TV screen).
I have never had any problems with (basic) effects on interlaced video with Ulead set to "interlaced - field order A" (this is for PAL interlaced). I don't know how the program exactly renders effects on interlaced frames, but it does apparently work on each field seperately.
SkaDood1
4th June 2002, 08:06
If you were blind or didnt associate the link that is on doom9s front page this last day....goto http://www.100fps.com/ for answers to alot of the questions in this post and DV/interlace in general
avig70
4th June 2002, 09:08
Now look, theres no reson to get nasty on the forum!!!!!
If you were a little patiant, you'de see that this thread started long before Doom9 put his link on his site and from the moment he did, this thread was as dead as threads get.....
So please
yours
avi
SkaDood1
7th June 2002, 07:24
Oh no no u mistook me, i think avig70. I didnt mean blind as an insulting thing....I too did exactly what u said, saw the link AFTER the post. Actually i had posted b4 on it before he had put that link up about editing. I just was tryin to be helpful to anyone who maybe missed it on the front page, and I know I have been known to do it;-)
Sorry for an misinterpretation.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.