View Full Version : Colorspace questions
Dot50Cal
28th June 2007, 16:36
Hello, I'm starting to re-examine some of my methods and I'm a bit confused as to what would be best and was hoping someone here could set me straight.
At the moment I am capturing video game footage using HuffyUV (YUY2), then putting that through virtualdub for some filters, and finally using VD's frameserver to put it into Megui for final encoding to x264.
I've been told theres possibly some color space conversions happening here, if anyone can set me right on that I would appreciate it. I've been checking around and it seems my best bet would be to capture Huffy in YV12 colorspace (using ffdshow) in order to not have to deal with any colorspace conversions. Would this be the best course of action? Does Virtualdub convert the colorspace?
Finally, is there any benefit to capturing to say RGB or YUY2 lossless even if your final encode will be x264 (YV12)?
Thanks for any help you guys can lend!
wiseant
28th June 2007, 21:01
Interesting timing Dot50Cal - I just finished doing some tests using Huffyuv, Lagarith, and ffdshow Huffyuv
Without getting into details - I found the best results are got from HuffYUV(YUY2) - a little better compression than Lagarith in YUY2 mode and a little faster
I have been using ffdshow Huffyuv so I can use avisynth scripts in my captures Using VirtualDub - in this case it is best to set up ffdshow so that huffyuv captures in YUY2 - if you try to capture in YV12 this way - you will experience some colour degradation and you won't be able to open the file in VirtualDub - in order to open the file you will need to use (avisynth) DirectShowSource instead of AviSource
BTW I have got good results using the old _2DCleanYUY2_for_25.dll plugin with settings of (1,4,1,2) for good interlaced sources and (1,5,1,3) for noisier interlaced sources
I was using Deen but it requires YV12 colorspace - and I started noticing the colour degradation compared to the YUY2 colorspace and filtration
Dot50Cal
29th June 2007, 06:09
Wouldnt you lose the same color information if you were to use x264 for your final encode anyway?
check
29th June 2007, 07:42
The most reliable way to convert YUY2 to YV12 would be in avisynth, as I know it has a reliable converter in it. Try this miniguide:
http://mewiki.project357.com/wiki/MeGUI:Using_.vdr_files_as_input
Dot50Cal
29th June 2007, 07:46
Since Im using filters in Virtualdub (full processing mode), wouldn't it already be going from whatever my source is, to RGB, and then to YV12 via your tutorial there? Or will avisynth bypass that?
check
29th June 2007, 08:32
you can probably replicate the filters with avisynth commands. This will prevent any unnecessary colourspace conversions.
Dot50Cal
30th June 2007, 12:38
Thanks, On your suggestion I went ahead and made a nice little script which does all the functions I needed in virtual dub, so I am now free of it ;)
I have to ask though, Since Im using a lossless codec to capture to initially and I'm doing final encodes to YV12 (x264), what colorspace should I capture to initially? At the moment Im using YUY2, and using avisynth's converttoyv12 command at the end of my script. Would it be in my best interest to capture to YV12 natively?
check
30th June 2007, 15:33
It depends on the input format. Generally I'd advise you to capture in a format as close to the input as possible, and then do the conversion later in avisynth. The reason is simply because I know that avisynth has high quality colourspace conversion, resizing, etc that many programs manage to bugger up.
Dot50Cal
30th June 2007, 16:47
Im not sure what the input format would be, I capture from various video game consoles. Is there a standard for them? Capturing through component video if that helps.
Blue_MiSfit
30th June 2007, 22:52
Well, if it's coming through component video, then definitely capture in a YUV format, since that's what component transmits.
I would suggest staying with 4:2:2 (YUY2), as 4:4:4 is sort of overkill for anything less than compositing. You can downsample this cleanly to 4:2:0 for encoding after your filter chain, as most filters operate happily in YUY2.
HuffYUV and Lagarith natively operate in YUY2 as well...
The real advantage of capping into YUY2 is more chroma information. Of course, it's going to be thrown away in the end, but in my mind, providing your filter chain with more data is a good idea.
~MiSfit
Dot50Cal
1st July 2007, 11:20
Thanks for the help guys! I really appreciate it!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.