Colorspace in post-processing
- CrackTheSky
- has trust issues
- Joined: Sun Aug 27, 2006 11:01 pm
- Status: Maybe editing?
- Location: Chicago
Colorspace in post-processing
Ok, I exported my video from Vegas uncompressed and as I was reading Absolute Destiny's guide, he says to convert the video to YV12 colorspace because it's needed for certain AVS filters like deen that I want to use. However, when I convert to YV12 my color is all screwed up; i.e. red things appear blue, etc. This didn't happen to me with my last video, so I'm really confused.
I also tried exporting my video from Vegas using a HuffYUV encode but that didn't make a difference. I'd really like to use some of these filters to make my video look better, but I can't do it in YV12 colorspace because of the color problem.
Unless...if I put the line "ConvertToRGB32" or "ConvertToYUY2" at the end of my AVS script, will it do all the filters in YV12 colorspace and then convert the video back to the right colorspace? Or do I just have to go without some of these filters?
I also tried exporting my video from Vegas using a HuffYUV encode but that didn't make a difference. I'd really like to use some of these filters to make my video look better, but I can't do it in YV12 colorspace because of the color problem.
Unless...if I put the line "ConvertToRGB32" or "ConvertToYUY2" at the end of my AVS script, will it do all the filters in YV12 colorspace and then convert the video back to the right colorspace? Or do I just have to go without some of these filters?
- Kariudo
- Twilight prince
- Joined: Fri Jul 15, 2005 11:08 pm
- Status: 1924 bots banned and counting!
- Location: Los taquitos unidos
- Contact:
maybe you should try exporting in rgb colorspace then convert in avisynth as needed.
I believe that most editing programs don't handle yv12 footage...and I'm not one to trust any filtering to something not avisynth (the programs usually mess it up in one way or another...at least that's my experience)
colorspace conversions [generally] don't really affect the video quality (save yuy2 conversion)
I believe that most editing programs don't handle yv12 footage...and I'm not one to trust any filtering to something not avisynth (the programs usually mess it up in one way or another...at least that's my experience)
colorspace conversions [generally] don't really affect the video quality (save yuy2 conversion)
- CrackTheSky
- has trust issues
- Joined: Sun Aug 27, 2006 11:01 pm
- Status: Maybe editing?
- Location: Chicago
But that's what I did...I exported my video from Vegas to an uncompressed (and thus, I believe, RGB) AVI file, and in order to apply certain filters like deen, I need to convert the whole video to YV12, which messes up the color in my video.
So here's my AVIsynth script so far, and I believe the "ConvertToRGB32" line at the end fixes all my problems:
So here's my AVIsynth script so far, and I believe the "ConvertToRGB32" line at the end fixes all my problems:
Basically, my question now is does that ConvertToRGB32 line at the end cancel out all the filters I applied because of the change in colorspace?avisource("E:\Documents and Settings\Ben\Desktop\RX Temp\RahXephon5.avi")
converttoyuy2(interlaced=true)
tomsmocomp(1,5,1)
converttoyv12()
deen("a3d",4,10,12)
temporalcleaner()
mftoon()
converttorgb32()
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
- CrackTheSky
- has trust issues
- Joined: Sun Aug 27, 2006 11:01 pm
- Status: Maybe editing?
- Location: Chicago
- Gepetto
- Mr. Poopy Pants
- Joined: Thu Jun 10, 2004 10:11 pm
- Status: Bored to tears
- Location: The Tokyo Settlement
- Contact:
First off, remove "converttoyuy2" unless "tomsmocomp" needs YUV2 colorspace.
Second, depending on what codecs you have installed, YV12 footage will appear with a reversed hue (±180°). VLC player's internal decoder, for example, does that. I've never had that problem with virtualdub/mod, but that may be it.
Try exporting a part of the video (never mind the exact filtering) with the converttorgb32 line at the end and playing it. If the colours come out right, your problem is solved. If not, try using the Tweak filter to correct the hue.
Second, depending on what codecs you have installed, YV12 footage will appear with a reversed hue (±180°). VLC player's internal decoder, for example, does that. I've never had that problem with virtualdub/mod, but that may be it.
Try exporting a part of the video (never mind the exact filtering) with the converttorgb32 line at the end and playing it. If the colours come out right, your problem is solved. If not, try using the Tweak filter to correct the hue.
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile
My DeviantART profile
- CrackTheSky
- has trust issues
- Joined: Sun Aug 27, 2006 11:01 pm
- Status: Maybe editing?
- Location: Chicago
- Melanchthon
- Joined: Thu Sep 02, 2004 11:12 am
No. All the filters in that script work on the output of the previous filter. So ConvertToRGB32 applies to the output of mfToon, which applies to the results of TemporalCleaner, and so on until it reaches AVISource, which provides a clip itstead of working on one.CrackTheSky wrote:Basically, my question now is does that ConvertToRGB32 line at the end cancel out all the filters I applied because of the change in colorspace?
From the AviSynth scripting language tutorial:
Unless you name an output clip yourself by using '[variable name] = [filter()]', AviSynth will name it 'last'. Single-filter clips use the clip named 'last' as input unless you specify otherwise. This allows you to write scripts without having to type a variable name every time you call a filter.What if you don't assign the result of an expression to a variable? The answer is that the result gets assigned to a special variable named "last," as though the line had begun "last =". Last is used implicitly in two other situations as well: first, if you use a filter, and the filter takes a single clip as its last argument, and you don't supply that argument, then the value in last will be used; and second, when the script ends, the video clip in last is taken as the "return value" of the script--that is, the video clip that the application opening the script will see.