Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#21 | Link | |
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
You need to use it in case your source is: MPEG2 default or SMPTE 240M standard (both set of coefficients are approximately the same).
The other set of coefficients are approximately the same and equal to the MPEG1 coefficients. It doesn't really matter what your target is. If you use VDub or AviSynth, these matrix coefficient info is lost, and mpeg1 coefficients will be assumed during playback (at least for DivX/XviD/TMPGEnc/QuEnc, not sure about CCE). Quote:
Perhaps you can make an avs script, encode it to MPEG2 with CCE, and post the coefficients for me? |
|
![]() |
![]() |
![]() |
#22 | Link |
Registered User
Join Date: Jul 2004
Posts: 6
|
Hmn, interesting. The source DVD is NTSC interlaced. Color coefficient is S170 (SMPTE 170M) according to GSpot.
I re-encoded to D1/2 size using KSVCD template. Encoded with tmpgenc the result video has FCC coefficient. Encoded with CCE, no coefficient present. script: Mpeg2Source("D:\TietNhonQuy_DVD\TietNhonQuy_01.d2v") ColorMatrix() # crop(8, 0, -32,0) GripCrop(352, 480, source_anamorphic=false) GripSize(resizer="LanczosResize") dgbob(FOrder(),mode=1 ) convert60ito24p(2,0) DegrainMedian(mode=1) converttoyuy2() # Detect field order function FOrder(clip c) { fo= GetParity(c)? 1:0 return fo } |
![]() |
![]() |
![]() |
#23 | Link | |
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
Quote:
|
|
![]() |
![]() |
![]() |
#24 | Link |
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
I put up a new version (v1.4). Changelog:
* Added a mode parameter (default is mode="mpeg2->mpeg1" which gives the same output as older versions). In case you captured something or you have a XviD/DivX (both are encoded mpeg1 coefficients), and you want to encode it to mpeg2 using CCE (which assumes mpeg2 coefficients): ColorMatrix(clip, mode="mpeg1->mpeg2") * Added rgb=true, which converts to RGB24 using mpeg2 coefficients. The following converts a YV12/YUY2 stream to RGB24 using MPEG-2 coefficients (which might be useful if you want to convert DVD to mpeg2 using TMPGEnc): ColorMatrix(clip, rgb=true) It should give the same results as ColorMatrix(clip, mode="mpeg1->mpeg2") ConvertToRGB24() |
![]() |
![]() |
![]() |
#25 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,812
|
Is rgb=true the default in the new version? The filter was slower than usual with just ColorMatrix(), adding rgb=false fixed that.
I'd also like to clear some things up, is this the correct way: 1) DivX/XviD clip to MPEG-2 in CCE : ColorMatrix(mode="mpeg1->mpeg2") 2) MPEG-2 capture (no coeffs shown) to MPEG-2 in CCE : ColorMatrix()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#26 | Link | |||
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
Quote:
Btw, rgb=true is the same as ConvertToRGB(matrix="rec709") which should be faster. I didn't know that when adding that option ![]() Quote:
Quote:
ColorMatrix(mode="mpeg1->mpeg2") |
|||
![]() |
![]() |
![]() |
#28 | Link |
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
I put up a new version. In the previous ones, the used coefficients were slightly wrong. Although the difference is not noticable in practice
![]() btw, I corrected the naming convention. MPEG-2 coefficients are called Rec.709 and MPEG-1 coefficients Rec.601. Thus ColorMatrix(clip, mode="Rec.709->Rec.601") (default) ColorMatrix(clip, mode="Rec.601->Rec.709") I advice you to use the internal ConvertToRGB(clip, matrix="Rec.709") instead of ColorMatrix(clip, rgb=true). Output is identical (thx IanB), but the former is faster. Last edited by Wilbert; 30th October 2004 at 16:56. |
![]() |
![]() |
![]() |
#29 | Link |
Registered User
Join Date: Jul 2003
Location: Connecticut
Posts: 99
|
ColorMatrix and Gordian Knot
@Wilbert,
I recently used your filter on a Mpeg2 to Xvid conversion using AviSynth and VDubMod. The difference, to my eyes at least, was remarkable. I have wondered why past encodes were "less bright" than I expected and needed to be adjusted. I took a look at the AviSynth plugins that come with Gordian Knot. I did not see ColorMatrix among them, which surprised me given the discussion in the current thread and the following threads: http://forum.doom9.org/showthread.ph...0&pagenumber=3 http://forum.doom9.org/showthread.php?s=&threadid=81191 Does Gordian Knot handle this problem another way or not at all? Thanks for your work on this! Happy New Year! North |
![]() |
![]() |
![]() |
#31 | Link | ||
Registered User
Join Date: Jul 2003
Location: Connecticut
Posts: 99
|
Quote:
I just sent a PM to len0x about this. I tried using LumaFilter in DGDecode to adjust the "brightness". From DGDecode html, Quote:
North |
||
![]() |
![]() |
![]() |
#32 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,812
|
The original problem is not actually the brightness, it's that the colors are off slightly.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#33 | Link |
I'm afraid we've to stop
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
|
Hm... Am I right in understanding that every DVD source needs to be converted to a proper color matrix before encoding into MPEG4?
*Edit* remark about RGB removed
__________________
Gordian Knot Family: Gordian Knot: website, download Auto Gordian Knot: Website and download, tutorial, FAQ Last edited by len0x; 2nd January 2005 at 16:22. |
![]() |
![]() |
![]() |
#34 | Link | |
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
Quote:
|
|
![]() |
![]() |
![]() |
#35 | Link | |
Registered User
Join Date: Jul 2003
Location: Connecticut
Posts: 99
|
Quote:
Thanks. When you don't know that the underlying problem is a color problem, it looks like a problem with brightness, which can lead to unsatisfactory attempts to correct it. North |
|
![]() |
![]() |
![]() |
#36 | Link | |
I'm afraid we've to stop
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
|
Quote:
Btw, do you have XML description of the filter? (I can add it to GK then)
__________________
Gordian Knot Family: Gordian Knot: website, download Auto Gordian Knot: Website and download, tutorial, FAQ |
|
![]() |
![]() |
![]() |
#37 | Link | ||
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,370
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#38 | Link | |
I'm afraid we've to stop
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
|
Quote:
__________________
Gordian Knot Family: Gordian Knot: website, download Auto Gordian Knot: Website and download, tutorial, FAQ |
|
![]() |
![]() |
![]() |
#39 | Link |
Registered User
Join Date: Jun 2002
Posts: 38
|
ColorMatrix does virtually the same as BT709ToBT601 from http://mywebpages.comcast.net/trbarry/downloads.htm, or?
Steve56 Last edited by Wilbert; 17th January 2005 at 10:23. |
![]() |
![]() |
![]() |
Tags |
colormatrix |
Thread Tools | Search this Thread |
Display Modes | |
|
|