View Full Version : DirectShowSource + DV (Type 2) = no fields?
I'm trying to process a Type 2 DV, opening it with DirectShowSource(). Info() says "FieldBasedVideo: No" and the FPS is 25. This is the result I get both when decoding with Microsoft's QDV.DLL (whatever that is) and ffdshow.
Shouldn't I get it interlaced? GSpot at least claims it's interlaced. Or maybe it's progressive after all? (Are progressive DVs common/possible at all?)
Looking at the video in VDub, there isn't any obvious combing in motion scenes, but there are some cases stepping which might be deinterlacing artifacts. Could it be deinterlaced content saved as progressive DV and GSpot is just misidentifying?
Are there better ways to get info on DV video?
JohnnyMalaria
11th May 2008, 22:14
Type-2 DV AVI is a kludge to let older Video for Windows based software handle DV since such software is incapable of handling Type-1.
The AVI header for the video stream for Type-2 simply specifies the frame size and rate.
With Type-1, software that can handle it (namely DirectShow-based software) can determine whether the DV is interlaced or not.
Progressive DV is possible but rare (capable camcorders tend to be high end and often 24 fps). The DV specification supports a wide range of field/frame options (such as pulldown etc) and aspect ratios. Software has to dig into the actual DV stream within the AVI file to get this information. DirectShow makes it trivial. Video for Windows makes it difficult and should have been buried years ago...
Shouldn't DirectShowSource() then find the true parameters?
"FieldBased" Video is the result of using the SeperateFields() filter. It indicates that the clips video stream has been broken out into alternating top and bottom fields. The parity of each frame indicates which is top and which is bottom.
Avisynth does not have any clip properties indicating if a clip is interlaced or progressive. You have to know your source and code your script accordingly.
There is no current Avisynth standard for the source filters to return extended clip information. The author of FFMpegSource is experimenting with setting environment variables for some properties.
Would interlaced at 50FPS be reported as 25FPS? (Or does it depend on the DShow decoder?)
audyovydeo
12th May 2008, 16:59
Type-2 DV AVI is a kludge to let older Video for Windows based software handle DV since such software is incapable of handling Type-1.
Sorry for barging in but I'm also interested.
I always capture to DV type 2 (with WinDV) on the assumption that Type2 was more recent == better than Type1.
Is this meant to mean that anyone using DirectShow software should capture in Type1 mode ?
I haven't noticed any drawbacks in editing / encoding type2 stuff, but then again that's all I tried.
cheers
audyovydeo
As far as I know Type 2 just adds the audio also in a dedicated AVI stream, unlike 1 where A+V is one multiplexed AVI stream.
thetoof
12th May 2008, 19:29
As far as I know Type 2 just adds the audio also in a dedicated AVI stream, unlike 1 where A+V is one multiplexed AVI stream.
QFT! Is there any reason you're using directshowsource? I always use avisource with DV type 2 and it works just fine...
With AVISource I get "couldn't locate a decompressor for fourcc". Is AviSource preferable to DirectShowSource for some reason (particularly in this case)?
thetoof
12th May 2008, 19:59
You need to find a decompressor for your DV file. I don't recall which I took, but with a quick search I found this (http://www.free-codecs.com/download_soft.php?d=3121&s=59). Right click on the .inf and "install". This may be the source of your problem.
Thanks for the link. It just lead back to their homepage, but it has just occured to me that I didn't enable ffdshow's VFW DV decoder. With it enabled AviSource() now works. But it didn't change anything else, it's still 25 FPS, etc.
Reading some more I now think that's the expected framerate even if it were interlaced (which I suspect is not the case).
Perhaps I should move to the DV subsection of the forum. :)
But why not DirectShowSource anyway (for decoders that allow seeking and report FPS)?
JohnnyMalaria
12th May 2008, 21:40
Sorry for barging in but I'm also interested.
I always capture to DV type 2 (with WinDV) on the assumption that Type2 was more recent == better than Type1.
Is this meant to mean that anyone using DirectShow software should capture in Type1 mode ?
I haven't noticed any drawbacks in editing / encoding type2 stuff, but then again that's all I tried.
cheers
audyovydeo
Well, technically it is more recent but only because DV came along and required an unusual AVI format to contain it. DirectShow recognizes it and can decode the audio and video from the DV data inside the AVI file directly. But MS saw a need to make DV available to the older Video for Windows technology and so developed a second format (hence Type-2). This puts a second stream in the AVI containing a copy of the audio from the DV. Video for Windows restricts a stream within an AVI file to contain only audio or only video. Native DV contains audio and video in a single stream.
Basically, if any of your software that you will use with DV is not DirectShow based, you should use Type-2. However, there are some well-known and expensive NLEs that claim to be DirectShow but are, in fact, some weird fusion of DirectShow and proprietary stuff. Type-1 files will open but you will not be told that the audio will be screwed up. And only if NTSC. I shan't name them...
With DirectShow-based software, you can usually use either format without issue. Sometimes, depending on the complexity/features of the software, Type-2's won't be "scrubbable" in a window but that's a minor issue.
thetoof
13th May 2008, 01:27
If avisource works with an avi file, there's no reason not to use it.
Then, if you want to make your video progressive with your full temporal resolution, use mcbob() and it'll be just fine.
What matters most in interlacing is what you see, not necessarily what the program tells you.
There's been some discussion about DV deinterlacing here (http://forum.doom9.org/showthread.php?t=136914) and here (http://forum.doom9.org/showthread.php?t=137574).
If avisource works with an avi file, there's no reason not to use it.The question is whether there's a reason not to use DirectShowSource, since it can open more formats (though, I have noticed Lagarith YV12 returned thru DShowSrc as RGB32 while it's YV12 thru AviSource).
Then, if you want to make your video progressive...The thing is, it doesn't look interlaced in most places, and in a few others there's what looks like deinterlacing artifacts. Perhaps it was deinterlaced and saved progressively into DV (this is post edit). But the only thing so far that shows info on the interlacing format is GSpot, and it claims it is interlaced.
mikeytown2
13th May 2008, 02:18
Thought i would chime in. I use the Cedocida DV Codec with AviSource(). Works Great!
http://forum.doom9.org/showthread.php?t=94458
Shae, Seeking with DirectShowSource isn't always exact. That is the main reason I don't use it, also seems slower.
thetoof
13th May 2008, 03:05
Shae, Seeking with DirectShowSource isn't always exact. That is the main reason I don't use it, also seems slower.
Yeah, this is the reason why avisource should be used if it works. I thought it was something like that, but I didn't want to assume anything as I wasn't 100% sure. Thanks for barging in! ;)
Also, ffmpegsource can give some pretty good results where directshowsource fails.
The thing is, it doesn't look interlaced in most places, and in a few others there's what looks like deinterlacing artifacts.
It'd be weird to have progressive and interlaced in a DV source... Could you upload 2 samples, one that doesn't look interlaced and one that is? Maybe it simply doesn't look interlaced because there's not a lot of motion...
Yeah, this is the reason why avisource should be used if it works.So seeking only? Why won't DS seek right, BTW? If it's about non-keyframes, AviSource would suffer too (or have to decode from the last key), no? I also thought VFW is lacking compared with DS.
Also, ffmpegsource can give some pretty good results where directshowsource fails.Never tried that.
It'd be weird to have progressive and interlaced in a DV source...Don't think it's both. Maybe progressivified interlaced.
Could you upload 2 samples, one that doesn't look interlaced and one that is? Maybe it simply doesn't look interlaced because there's not a lot of motion...There are fast motion parts that look progressive. Then there are no motion parts that look stepped. I'll post later some crops.
EDIT:
I can't make the video public, but hopefully these crops will do.
http://img514.imageshack.us/img514/4628/dvmn5.th.png (http://img514.imageshack.us/my.php?image=dvmn5.png)
A: Zoom in motion blur. No combing.
B: Horizontal motion blur. No combing.
C: Obvious combing/chroma problems.
D: Hand motion blur with no combing, but stepping on white in
the background.
E: Combing.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.