Colorspace Confusion

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Colorspace Confusion

Postby Nicho Void » Mon Jan 13, 2014 9:34 pm

Hey Guys,

I recently built a new rig and in the process of getting everything reinstalled, I'm trying to update/improve my process. I'm running into confusion about colorspaces, so let me detail what I'm doing:

1. I have the following AVS script I put together via information from l33tmeatwad's site:

FFVideoSource("source.mkv")
animeupscale(widescreen=true,strength=2,fullhd=true,degrain=0)
ConvertToRGB(Matrix="Rec709")

If I don't convert to RGB, I get a warning saying "couldn't locate decompressor for YV12" and only direct steam copy is available. So, I convert to RGB and go to the next step:

2. I load that script into VirtualDubMod. Now, the absolute everything guide suggests I use UtVideo for my codec (I previously used lagarith), specifically stating to use the "i420" one because that one encodes to YV12 colorspace, but is that really the correct thing to do? There is a second UtVideo codec that just says "iyuv", should I be using that one for RGB sources? And finally, is it important to set Video to Fast Recompress? I don't know what effect that setting is supposed to have on the output.

Thanks a bunch
ImageImageImage
User avatar
Nicho Void
 
Joined: 12 Mar 2010
Location: St. Paul, MN

Re: Colorspace Confusion

Postby mirkosp » Tue Jan 14, 2014 8:10 am

Don't use virtualdubmod, it's an ancient software, all the good things it did are part of the main virtualdub, as are a LOT of bugfixes and improvements.
http://virtualdub.sourceforge.net/
Grab the 32bit stable from here.
Now, I have to ask, what is the resolution of your source? Because I see that animeupscale does not seem to internally handle the colormatrix, so using the Rec709 if you have SD footage is wrong.
Instead, you should indeed keep the I420 colorspace, but convert the matrix.
So, assuming you have a SD source:
Code: Select all
FFVideoSource("source.mkv")
animeupscale(widescreen=true,strength=2,fullhd=true,degrain=0)
colormatrix("Rec.601->Rec.709")

If you instead have a HD source just remove the converttorgb line.

At that point you should be able to load the avs in virtualdub and have it all work correctly, if animeupscale is a good filter (one that breaks is not ─ I see it discourages use of 1.10.x, probably suggesting 1.9.x instead, but 1.10.x is stable now and should be the reference by all means).
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Colorspace Confusion

Postby Nicho Void » Tue Jan 14, 2014 11:27 am

My source is 1920x1080 @ 23.976 fps...so leaving it in YV12 is correct?

I don't understand why the resolution of my source effects the color space I should be working in. :oops:
ImageImageImage
User avatar
Nicho Void
 
Joined: 12 Mar 2010
Location: St. Paul, MN

Re: Colorspace Confusion

Postby l33tmeatwad » Tue Jan 14, 2014 12:06 pm

Nicho Void wrote:My source is 1920x1080 @ 23.976 fps...so leaving it in YV12 is correct?

I don't understand why the resolution of my source effects the color space I should be working in. :oops:
I wrote some of the guides before Ut codec added support for Rec.709 and never got around to changing or including that when I was updating. It would be fine to keep it yuv if you use that codec to encode to (UtVideo YUV420 BT.709 (ULH0) VCM). Also, you should not direct stream copy, you should be using fast recompress (and also you should be using the latest version of VirtualDub and not a mod). I'll probably update the guides to reflect that in the near future. If you are using the AviSynth tutorial on my website, I would recommend taking a look at the basic guides on pixelblended.com for a direct example on how to save files from VirtualDub since my site did not currently have that information.
Guides, Scripts, & Software: AMV 101 | AMVpack | AviSynth 101 | Anime Upscale
PixelBlended Studios: Website | Facebook | Tumblr | Twitter | YouTube
User avatar
l33tmeatwad
 
Joined: 16 Feb 2005
Location: Charleston, SC
Status: Trolling

Re: Colorspace Confusion

Postby Nicho Void » Tue Jan 14, 2014 9:27 pm

Thanks, that helped clear up a lot of crap.

I'm having a problem with LWLibavVideoSource(). It just says unable to load "C:\Program Files (x86)\AviSynth 2.5\plugins\LSMASHSource.dll". It clearly has the correct path and AvsPMod formats it as a valid function name. Any ideas on that one?
ImageImageImage
User avatar
Nicho Void
 
Joined: 12 Mar 2010
Location: St. Paul, MN

Re: Colorspace Confusion

Postby l33tmeatwad » Wed Jan 15, 2014 1:55 am

Nicho Void wrote:Thanks, that helped clear up a lot of crap.

I'm having a problem with LWLibavVideoSource(). It just says unable to load "C:\Program Files (x86)\AviSynth 2.5\plugins\LSMASHSource.dll". It clearly has the correct path and AvsPMod formats it as a valid function name. Any ideas on that one?
Make sure you copied the 32bit version and that you also copied the other DLL (msvcr120.dll) to the SysWOW64 folder (if you are using a 64-bit OS) or the System32 folder (if you are using a 32-bit OS).
Guides, Scripts, & Software: AMV 101 | AMVpack | AviSynth 101 | Anime Upscale
PixelBlended Studios: Website | Facebook | Tumblr | Twitter | YouTube
User avatar
l33tmeatwad
 
Joined: 16 Feb 2005
Location: Charleston, SC
Status: Trolling

Re: Colorspace Confusion

Postby Nicho Void » Wed Jan 15, 2014 12:32 pm

Ah, didn't realize the other .dll was a windows driver. Thanks a ton.
ImageImageImage
User avatar
Nicho Void
 
Joined: 12 Mar 2010
Location: St. Paul, MN


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest