Log in

View Full Version : Scripts: Wich line must come first?


Cunhambebe
18th April 2007, 02:51
This is a simple question I might have asked before, but I can't find it on the foruns; please take look at this script:

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
LoadPlugin("C:\avs_filters\TomsMoComp\TomsMoComp_Avisynth\Debug\TomsMoComp.dll")
MPEG2Source("C:\birds.d2v")
ColorMatrix(mode="Rec.601->Rec.709")
TomsMoComp(1,5,1)
ConvertToRGB()
Crop(0,50,0,-50)
Lanczos4Resize(720,394)

As you can see, I'm de-interlacing a video here with TomsMoComp. I've heard that if one line (for instance, the one for the ColorMatrix) came after the plug-in that de-interlaces, the plug-in would destroy the information of colorimetry generated by ColorMatrix.

So this is a simple question: is this script correct (as the order of the lines)?

Thanks in advance.

Mug Funky
18th April 2007, 06:02
if you're not using hints in colormatrix (like the colorimetry hints that DGdecode outputs), then you can use it pretty much anywhere so long as colours aren't being tweaked before it (and even then it's fine, it'll just look a little different to what the colours were adjusted to).

Boulder
18th April 2007, 06:50
I'd move ColorMatrix after resizing for fastest possible processing, you can use the d2v option instead of hints (you don't need CM every time, those options are meant for automating the process). Using d2v is a bit faster than using hints.

I'd also move the colorspace conversion as the last item.

check
18th April 2007, 07:45
are you sure you need you need to convert to RGB? it might not be neccessary, depending on what you are doing with the output.

Cunhambebe
18th April 2007, 14:38
Thanks to all who took time to respond; then instead of hints, I'll use this:
ColorMatrix(d2v="birds.d2v");
Then the script will look like this one:

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
LoadPlugin("C:\avs_filters\TomsMoComp\TomsMoComp_Avisynth\Debug\TomsMoComp.dll")
MPEG2Source("C:\birds.d2v")
ColorMatrix(d2v="birds.d2v")
TomsMoComp(1,5,1)
ConvertToRGB()
Crop(0,50,0,-50)
Lanczos4Resize(720,394)

What about now? :) Does it work this way?

Check wrote this:
are you sure you need you need to convert to RGB? - ConvertToRGB()

-Sorry, that was just an example.

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
LoadPlugin("C:\avs_filters\TomsMoComp\TomsMoComp_Avisynth\Debug\TomsMoComp.dll")
MPEG2Source("C:\birds.d2v")
ColorMatrix(d2v="birds.d2v")
TomsMoComp(1,5,1)
Crop(0,50,0,-50)
Lanczos4Resize(720,394)