I have files from mini DV tapes that I want to de-interlace with AviSynth's yadif plugin, then de-shake with VirtualDub. They play fine in players, and when I drag them onto VirtualDub, VirtualDubMod, and NanDub. But the chroma is wrong when I drag a simple AviSynth script onto VirtualDubMod.
AviSource("sampleDirectStreamCopy.avi")
produces this:
Adding
ConvertToYUY2(), or including interlaced=true doesn't help. I've tried separate attempts using ConvertToRGB(), TopFieldFirst, BottomFieldFirst, ComplementParity, and AssumeFieldBased.
I saw this post about chroma channels being applied to the wrong fields of the luma channel, but I'm not cropping. This happens to the original files. I also converted the files from DV Type I to Type II, but that didn't change anything.
info() says it is YV12, 720x480 at 29.9700
FieldBased (Separated) Video: NO
Parity: Bottom Field First
However GSpot 2.60 thinks it's interlaced and the TFF icon is lit, which I believe means top field first.
Here is a second of the video including the first frame.
I have come up with a workaround but the file sizes are nuts. It will work if I re-save the video as uncompressed, or with Huffyuv and open that in a script which includes ConvertToYUY2(). But the uncompressed file size is 870% larger. Huffyuv is 625%. Huffyuv includes the lossy option to convert to YUY2 and then it's 300% larger. But I want to de-interlace and de-shake before sacrificing any color if I can help it. Any ideas on scripts and combinations I didn't try?
+ Reply to Thread
Results 1 to 7 of 7
-
-
your sample works fine for me without your issues in avisynth, by opening the .avs in vdub or avsp
what decoder are you using?
I'm using cedocida for the vfw decoder (which is invoked when AVISource() is used). Directshow players use a directshow decoder which is different (invoked when DirectShowSource() is used) -
Force your DV decoder to output YUY2. That will avoid interlaced YV12 problems.
I didn't see anything unusual in the clip you posted (I opened the video in VirtualDub with ffdshow decoding the DV). But you should post a sample with much more motion of colored objects. The sample was interlaced, bottom field first.
Your sample image is displaying some other type of problem. Colors are being applied in the wrong places:
Here's your sample Yadif deinterlaced in VirtualDub (Xvid AVI):Last edited by jagabo; 21st Apr 2010 at 10:01.
-
FIRST it works now! Thanks so much! I did
loadcplugin("C:\AV\AviSynth 2.5\plugins\yadif.dll")
DirectShowSource("sampleDirectStreamCopy.avi")
ConvertToYUY2()
Yadif()
How do I find out what decoder is being used by AviSynth? It looks like I installed cedocida in the past and forgot about it, but it shows up in the virtualdubmod compression options.
Are there downsides to using DirectShowSource in speed, accuracy, or integrity?
jagabo, I'll post a messed-up clip in several minutes. -
-
So DirectShowSource() is giving you proper colors and AviSource() is giving the bad colors seen in the Xvid AVI? The difference is which DV decoder is being used. DirectShowSource() will use a DirectShow DV decoder. AviSource() will use a VFW decoder. So this would indicate there is something wrong with the VFW DV decoder you have installed. Get rid of it and try using Cedocida instead. Cedocida usually puts out YUY2 from NTSC DV sources so you won't need the ConvertToYUY2() or ConvertToYuy2(interlaced=true).
The nature of your color errors in your samples is not what you would see from ConvertToYUY2() with the wrong interlaced argument. Interlaced chroma errors are usually much more subtle.
Attached is your Xvid AVI fixed with the following script:
src=AVISource("sampleWithMotionBadColorXvidQuantiz ation2.avi")
U=UtoY(src).Crop(0,0,180,-0).BilinearResize(360,240)
V=VtoY(src).Crop(0,0,180,-0).BilinearResize(360,240)
YtoUV(U,V,src)
Tweak(sat=1.3)Last edited by jagabo; 21st Apr 2010 at 19:51.
Similar Threads
-
Progressive and Interlaced Chroma -- again!
By Anonymous344 in forum Newbie / General discussionsReplies: 6Last Post: 23rd Apr 2011, 07:14 -
Capturing YUY2 or YV12 interlaced?
By rmdeboer82 in forum Capturing and VCRReplies: 5Last Post: 15th Dec 2010, 09:10 -
cropping interlaced YV12 video caused chroma error
By dphirschler in forum EditingReplies: 2Last Post: 3rd Dec 2009, 10:07 -
Convert interlaced HD to interlaced SD with AVISynth
By jorbje in forum Video ConversionReplies: 19Last Post: 22nd Mar 2008, 18:48 -
Chroma Noise Reduction filter for Virtualdub
By demonwarrior in forum Newbie / General discussionsReplies: 3Last Post: 23rd Nov 2007, 09:43