Quantcast Avisynth: Colormatrix - Page 2 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #21  
03-02-2005, 08:55 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
03-02-2005, 09:10 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
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.
Where does line occur in script:

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}
Reply With Quote
  #23  
03-02-2005, 09:16 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #24  
03-02-2005, 09:28 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
I checked the behaviour with DebugView and the debug parameter.



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.
Reply With Quote
  #25  
03-02-2005, 09:30 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
EDIT: Why do you have UnDot() before IVTC? You should do the IVTC right after loading the source.
Edit: Do I just delete the UnDot() line?

#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,
Reply With Quote
  #26  
03-04-2005, 01:49 AM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Edit: Do I just delete the UnDot() line?
Just put the "undot" line after the "decimate" line.

Quote:
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!
To use this option you need to create the D2V project with DGIndex, not with DVD2AVI.
Doing that you also need to use DGDecode.dll instead of MPEG2Dec3.dll.
Reply With Quote
  #27  
04-28-2005, 02:40 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
What settings would be useful to use with the HC encoder?
__________________
AudioSlave
Reply With Quote
  #28  
04-28-2005, 03:25 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audioslave
What settings would be useful to use with the HC encoder?
The better is to encode a min of video without colormatriw and to copmare a snapshot with the original source.
Reply With Quote
  #29  
04-29-2005, 05:40 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #30  
04-29-2005, 06:00 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
ColorMatrix(mode="rec.601->rec.709",d2v="path\clip.d2v") # for CCE, HCEnc, QuEnc
I guess this is the part audioslave wanted to know.
Is it a guess or a "certain and already tested" statement ?
Reply With Quote
  #31  
04-29-2005, 06:21 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #32  
04-29-2005, 06:25 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you
Reply With Quote
  #33  
04-29-2005, 06:44 AM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you. Both Dialhot and Boulder!
__________________
AudioSlave
Reply With Quote
  #34  
04-29-2005, 01:33 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
I must to use colormatrix + MAScript or another one, or colormatrix itself replace any other script?
Reply With Quote
  #35  
04-29-2005, 02:42 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
ColorMatrix only changes the colors of the video, it doesn't do anything else. You can use it with any other filter.
Reply With Quote
  #36  
04-29-2005, 05:06 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
ColorMatrix only changes the colors of the video, it doesn't do anything else. You can use it with any other filter.
And preferably just after the load of the source.
Reply With Quote
  #37  
05-01-2005, 11:39 AM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
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?
__________________
AudioSlave
Reply With Quote
  #38  
05-01-2005, 12:05 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #39  
05-01-2005, 12:24 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@Boulder
I don't get what you mean by your explanation .
And what about the DGDecode.dll and MPEG2Dec3.dll, how can I fix my problem?
__________________
AudioSlave
Reply With Quote
  #40  
05-01-2005, 01:01 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audioslave
@Boulder
I don't get what you mean by your explanation .
And what about the DGDecode.dll and MPEG2Dec3.dll, how can I fix my problem?
Remove one of the two
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Onde encontrar o ColorMatrix ?? vipdf Conversão e Codificação de Vídeo (Português) 3 11-22-2004 11:46 AM
Redimensionamento correto e ColorMatrix (filtro/testes) ginoboy Conversão e Codificação de Vídeo (Português) 33 10-30-2004 02:12 PM




 
All times are GMT -5. The time now is 11:17 AM  —  vBulletin © Jelsoft Enterprises Ltd