Log in

View Full Version : "occasional" realtime De-interlace success at capture time


bluefear
24th October 2002, 01:27
Hi all,

I've been battling with this problem for a while now and I can't work it out. I am capturing in VirtualDub (this happens with _every_ different flavour of it - I've tried them all) and using the Picvideo MJPEG codec at the moment as Huffy is just a bit too big for me to handle.

My question is this: Can VirtualDub apply filters during realtime video capturing? I ask this as I am using the deinterlace - area based v1.4 filter by Gunnar Thalin with "random" success during capturing.

I say random because sometimes it works and sometimes it doesn't. I can't understand what is going on here. When it does work, I don't get a much great CPU load (and no dropped frames) and my capture quality is GREATLY enhanced. As the codec doesn't have to deal with the higher motion that interlace "combing" produces the resultant picture really is SO much better. To prove I can make it deinterlace at capture time, I attached this screenshot of a capture when the deinterlace filter did work. It is a high motion grab of a pair of glasses being flicked to illustrate the deinterlace in effect.

I know non-realtime deinterlacing can work but the original capture quality is greatly reduced due to the interlacing effects. I want to start off with a crystal clear source (as illustrated below).

Please can someone help my sort this problem so the filters work everytime I capture. None of the filters seem to work - it's not just the deinterlace filter I use. Anyway, here is an unedited image from a realtime deinterlaced capture (when it did work).

http://bluefear.netfirms.com/shot.jpg

Many thanks in advance,
bluefear

thorazine
24th October 2002, 15:20
Originally posted by bluefear
Hi all,

As the codec doesn't have to deal with the higher motion that interlace "combing" produces the resultant picture really is SO much better.

I'm sorry but I can't help you with the deinterlace filter problem.
But if you are using PicVideo you may want to use the "2 fields if more than 240/288 lines" option. With this option the codec will compress even and odd fields separately and it won't have to deal with any combing artifacts.

^^-+I4004+-^^
24th October 2002, 21:10
here's a thought (and an advanced one..hehe)
from my experience (PAL film material as source)
there can be scenes (in same video mind you)
that look prefectly progressive.....few seconds after it all
goes to hell and interlacing is everywhere (in same video mind you!)

this is (to the best of my knowledge) somethign that can be called
random pal one field phase shift.....

i did this test--->i recorded 1 episode of tv-series (shot on film) to
vhs--->i captured that twice(!)
i've seen same "phase shifts spots" in both capturings (of the same episode!)

so it means these random phase shifts are in original material also....
(i though it was my card dropping fields but i was wrong...)

how does this correspond to your problem?
well perhaps you sometimes captured film material that doesn't need
deinterlacing,and on the other times u captured material that needs deint,BUT it (deinterlacing) didn't worked...(as it didn't worked on film material too but there it's not visible as capture card can recreate progressive frames on itself!...as mine does if there's no phase shift)

hope you got it...hehe

test it for yourself..make some vhs recordings (of film source and of interlaced source) and capture them twice....see what happens
is there a pattern?
(i've discovered what was mine problem.....but also "telecide" filter cures it...)

also---->wether you do it on-line or afterwards (deinterlacing) it's the same thing...on-line deint. only makes it harder for your system

cheers

Ivo

bluefear
24th October 2002, 22:32
Ok here is a bit more info. I am in PAL (UK) land you are correct. Last night I recorded an episode of Sex And The City. This capture was not at all interlaced and neither were the (native PAL) adverts in between. Now the strange thing here is that I can record a clip of the same show which is interlaced and then record another bit of the same show and it comes out deinterlaced. Very puzzling.

A further confusion is that I happened to record the exact same advert on two seperate occasions - one time it was deinterlaced and the other it was interlaced! This is what is leading me to the conclusion that the deinterlace filter only seems to be working occasionally. I understand what you are saying about different broadcasts, but from the _same_ advert?

Should it be possible to use any filters at capture time? I ask this because I have been unable to get _any_ filters working (resizing, cropping etc.) to work at capture time. Is it a limitation of VirtualDub?

If what you're saying is true about the quality be unaffected by the capture being interlaced or deinterlaced then I am happy to deinterlace in the post processing. It's just that the deinterlaced capture seemed to be much better quality at the same compression setting.

cheers,
bluefear

^^-+I4004+-^^
25th October 2002, 09:41
b>Ok here is a bit more info. I am in PAL (UK) land you are correct. Last night I recorded an episode of Sex And The City. This capture was not at all interlaced and neither were the (native PAL) adverts in between. Now the strange thing here is that I can record a clip of the same show which is interlaced and then record another bit of the same show and it comes out deinterlaced. Very puzzling.

_no it's not strange --->field arrangement (2fields make frame and they determine if interlacing occurs.......that and capture card's way of putting 2fields into 1frame) changes during the video....
(this phase shift is error in the source..invisible if watched on tv..)
[nice info on this is in "smartdeinterlace" filter package...by graft]

do this-> record WHOLE THING (show and commercials...) TWICE
(you end up with 2 avi's....) from the VHS
see if both have interlacing/or not in the SAME places.....
(open it in VDub and watch...some fast movements will be ok some won't
if all fields differ (see my thread "blended fields" on how to watch only fields) then you're dealing with pure interlaced source and NO pure progressive frames will be recovered either on capturing or by "telecide" filter!!!)

if they do (have interlacing in same places) it's pal with phase shift and shift is occuring randomly (can be recovered by telecide/& smartdeinterlacer)

if they don't it's your card that is messing stuff (if video1 has different part interlaced than video2 (video1 & video2 are 2 captures of same VHS recording)
off course use NO deinterlace filters during the capturing!!!

i hope you're aware that interlacing occurs only in motion scens not on still scenes!

b>A further confusion is that I happened to record the exact same advert on two seperate occasions - one time it was deinterlaced and the other it was interlaced! This is what is leading me to the conclusion that the deinterlace filter only seems to be working occasionally. I understand what you are saying about different broadcasts, but from the _same_ advert?

_turn off deinterlace filters during test capturings....it only confuses you....it may be that it's true that sometimes it works and sometimes it doesn't....just turn it off during capturing!
then you'll at least know what source you're dealing with..
also you'll see if capture card does it or it's in the source!


b>Should it be possible to use any filters at capture time? I ask this because I have been unable to get _any_ filters working (resizing, cropping etc.) to work at capture time. Is it a limitation of VirtualDub?


_what do you mean?you've just said that you turn on deinterlace during capture...(?)and it occasionaly works.....
you can use filters->use "YUY2" format and after that mjpeg or huff compression.......

b>If what you're saying is true about the quality be unaffected by the capture being interlaced or deinterlaced then I am happy to deinterlace in the post processing. It's just that the deinterlaced capture seemed to be much better quality at the same compression setting.

_well on-line-deint can only get you poorer results in motion areas than doing it in post process........with post process you might be also able to recover progressive frames if there were any ("telecide" for VD or decomb4 package for asynth)

deinterlacing actually works like this-->it discards one field and instead it interpolates for missing lines (from the ones that are left in 1 field)
throwing field is not good if one can be without it ( with PAl film source progressive fields can be recovered...)


use mjpeg,"interlaced if more than 2xx lines" etc.
mjpeg compresses interlaced stuff quite nice...
(at least mine picvideo is...)

MvB
25th October 2002, 12:13
As far as I have seen, vdub doesn't use filters at all while capturing. I've tried this often and vdub never used the video filters i added. That goes up to version 1.4.10.

^^-+I4004+-^^
25th October 2002, 13:12
some filters introduce "lag" on processing.ie. they need more than
1 frame at once so that doesn't work during capturing
some filters can work (NR for example) during capture....