ColorMatrix
Hi,
I saw the word "colormatrix" sometimes in some posts (Inc, Boulder...) but nobody never focused on it. I just found a thread in the Portuguese forum where someone did comparisons (thanks to him). In short words : Original Without Colormatrix With Colormatrix Open the three picture in three windows (or in three tabs under firefox) ans switch from one to the other. For me, colormatrix is definitely needed in all scripts using DVD sources :!: What do you think ? |
I cant access the pics linked above, also not when opeing in a separate window via dropdown mouse options.
But maybe cause on a MAC right now using IE. :? :) If I did understand right, in regular the color coefficients wont be handled the right way and colormatrix fixes that. |
Quote:
Quote:
|
Not working here either Phil
Both in IE or Firefox. Greg |
Quote:
By the way, the question is : what do you think about colormatrix. So I'm asking that to peoples that already tried it, and they don't need to see the picture to give the result of their tests. EDIT: I hosted them on ImageShack (Original, without and with colormatrix, in that order) http://www.digitalfaq.com/archives/error.gif http://www.digitalfaq.com/archives/error.gif http://www.digitalfaq.com/archives/error.gif |
@Phil
I'm impressed that you didn't know about that, because of that was a old discussion between Giovane (ginoboy) and Jorge (jorel). Giovane uses the filter since this age ... :D If I'm remembered jorel discussed the color issue very long time ago (when me and ginoboy weren't kvcd.net members) here and in Doom9 board and then Wilbert did the first version of Colormatrix ... BTW, it's a very useful filter ... :D See you, |
Quote:
|
Thanks Phil,
I just wanted to have a look at the samples you were talking about since I am unable to perform my own tests right this minute as I am at work. I will test tonight and post my findings. For those of you that don't know where to find the colormatrix plug-in. You can download it from here: http://www.geocities.com/wilbertdijk...Matrix_v19.zip Here is a post over a D9 that will further your reading. http://forum.doom9.org/showthread.php?s=&threadid=82217 Greg |
There is certainly something that needs to be explained :roll:
I use Avisynth, I have compared my VOB sources with my scripts and they are all perfect matches :roll: Maybe I'm doing something wrong but I wouldn't know what... |
You don't need the filter in every encode. It depends on the source (i.e. what coefficients have been used) and the encoder you use (i.e. what coefficients it expects).
|
Quote:
Or do you mean that you need it for DVD but nor for avi sources for instance ? |
The latest DGIndex/dgdecode.dll -combination includes an info=1 parameter in MPEG2Source which can be used to determine what the coeffs are for the original file.
CCE expects MPEG2 coeffs and TMPGEnc/QuEnc MPEG1 if I remember correctly. All MPEG4 stuff are encoded with MPEG1 coeffs. If the original VOBs contain MPEG2 coeffs and you use CCE to encode to MPEG2, you don't need ColorMatrix. If you encode MPEG4 or a VOB with MPEG1 coeffs to MPEG2 with CCE, use ColorMatrix(mode="rec.601->rec.709"). And so on.. The docs explain more, basically it's just adjusting the parameters depending on what the input is and what the encoder expects. |
Quote:
I think I will do faster with a quick test with/without colormatrix before to launch the real encode :D Note: now we know why tmpgenc sometimes washes the colors and why for intance Rui can't compare directly it to what he obtains with HC ! |
Quote:
Besides, you can use the hints parameter but it's a bit slow. There's also an option to use the d2v file for getting the parameters to ColorMatrix, it's faster. |
Quote:
|
Quote:
And Colormatrix isn't so old it seems to me. Quote:
Note: I have doubt it can be faster than doing a test because it depends on the encoder as you say and there is no way avisynth can know what is expected by the encoder you plan to use :D |
Quote:
Quote:
So if it works like it should, it would simply be MPEG2Source("path\clip.d2v") ColorMatrix(d2v="path\clip.d2v",mode="rec.601->rec.709") for CCE. If the coeffs in the input file are rec.709, no conversion is done - if the d2v parameter works like hints. This must be checked, otherwise it's pretty much useless. Quote:
|
Okay, now that I am fully in the subject I understand more the docs I read before without giving attention :
D2V_Format_v08.txt : Quote:
Quote:
|
And it would be even faster if the plugin just read the very first line and used the value that's entered there. At least according to the fact that it crashes if the information changes during the d2v file, it reads every one of them.
|
:?: Would this work the same with a D2V from a MPEG2 capture (PVR-250)?
Some of my encodes appear darker than original captures and I would like to try this. I use D2V - AVS - TMPGenc |
It does work. My PVR-250 uses MPEG2 coefficients so you should probably use ColorMatrix(mode="rec.709->rec.601"), the video will appear slightly brighter.
|
Quote:
Mpeg2Source("H:\24\24.d2v",idct=7) Undot() Telecide(order=1, guide=1, gthresh=10, post=2, vthresh=50, dthresh=7, blend=false, show=false) Decimate(cycle=5, mode=0, threshold=0, threshold2=3, quality=2, show=false) aSharp(1, 4) BicubicResize(320,432,0,0.6,4,0,712,480) STMedianFilter(3, 3, 1, 1) MergeChroma(blur(1.5)) MergeLuma(blur(0.1)) ## Linear Motion Adaptive Filtering ## ScriptClip("nf = YDifferenceToNext()" + chr(13) + " \ UnFilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ). \ TemporalSoften( fmin(round(2/nf),6), round(1/nf), round(3/nf), 1, 2) ") AddBorders(16,24,16,24) ## Functions ## function fmin(int a, int b) {return (a < b) ? a : b} |
It doesn't really matter. Personally I would place it right after resizing as it works fastest there since there are the least amount of pixels to process per frame.
EDIT: Why do you have UnDot() before IVTC? You should do the IVTC right after loading the source. |
I checked the behaviour with DebugView and the debug parameter.
:D Which means that you can use ColorMatrix(d2v="path\clip.d2v",mode="rec.601->rec.709") and the plugin will do the conversion if it's necessary. So that's automated processing which is always nice, you'll just have to either leave the mode parameter off (for those encoders that expect MPEG1 coeffs) or use that one which means MPEG2 coeffs are expected. I'll have to ask Wilbert if it was possible to just take the first line and use the information stated there for slightly faster processing. |
Quote:
#ColorMatrix(d2v="path\clip.d2v",mode="rec.601->rec.709") ColorMatrix(d2v="H:\24\24.d2v",mode="rec.601->rec.709") Gives error (loaded into Vdub): Avisynth open failure: ColorMatrix: d2v file is not a dgindex project file! ColorMatrix(mode="rec.601->rec.709" Gives no error I was using old Linear Motion Adaptive script from MS. Didn't know, will change. This script seems to work OK for me. I had difficulties with "jerky" motion for a long time with PVR-250, until changing from "MPEG2 12.0MBit/sec (CBR)" to "DVD Standard Play". Now everything is smooth. I am capturing to a dedicated Western Digital 160MB Ultra DMA 100 drive and it was apparently dropping some frames. Thanks, |
Quote:
Quote:
Doing that you also need to use DGDecode.dll instead of MPEG2Dec3.dll. |
What settings would be useful to use with the HC encoder?
|
Quote:
|
Better yet is to use the automated processing. Use the latest DGIndex/DGDecode -combination and the latest ColorMatrix.
Add one of these lines to your script: ColorMatrix(mode="rec.601->rec.709",d2v="path\clip.d2v") # for CCE, HCEnc, QuEnc, possibly other avcodec based encoders too ColorMatrix(mode="rec.709->rec.601",d2v="path\clip.d2v") # for TMPGEnc The conversion will be done if it's necessary depending on what it says in the d2v project file. If the d2v file contains more than one set of coefficients, you get an error message (I've seen one of those cases myself). Note that the above lines assume that you are encoding to MPEG2. |
Quote:
Is it a guess or a "certain and already tested" statement ? |
I encoded a testclip with the latest HCEnc and it showed no coefficients in GSpot, therefore MPEG2 is assumed. I also tested it by doing a d2v file out of the HC clip. According to DGIndex/DGDecode, it contains MPEG2 coeffs.
|
Thank you :)
|
Thank you. Both Dialhot and Boulder! :)
|
I must to use colormatrix + MAScript or another one, or colormatrix itself replace any other script?
|
ColorMatrix only changes the colors of the video, it doesn't do anything else. You can use it with any other filter.
|
Quote:
|
I've got one more question for you gurus ;).
Can I use ColorMatrix with DVD-RB? If so, how do I define the path to the *.d2v? EDIT: After copying DGDecode.dll to my AviSynth plugins folder both VDub and MovieStacker have stopped working. Is there a conflict between DGDecode.dll and MPEG2Dec3.dll perhaps? |
It's a conflict because both contain the MPEG2Source function.
If you want to use the automation with DVD-RB, you should do a small d2v project of one of the original VOBs and point there in ColorMatrix. Any length will do. |
@Boulder
I don't get what you mean by your explanation :oops: . And what about the DGDecode.dll and MPEG2Dec3.dll, how can I fix my problem? |
Quote:
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.