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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st March 2006, 23:52   #201  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
TMPGEnc converts it to RGB24 for you. Thus TMPSource also delivers RGB24. TMPGEnc uses fcc coefficients (=Rec.601) for the YV12->RGB24 (and vice versa) conversion.

Code:
TMPsource("yourtprfile")
converttoyv12()
converts it back to YV12 using the same (ie Rec.601) coefficients. Ok, that's good and we don't have to worry about this conversion to RGB in between.

So the script:
Code:
TMPsource("yourtprfile")
converttoyv12()
ColorMatrix(d2v="xxx.d2v")
should be correct when encoding to XviD/DivX.
Wilbert is offline   Reply With Quote
Old 2nd March 2006, 21:01   #202  |  Link
jackiehcs
Registered User
 
Join Date: Nov 2005
Posts: 19
I see, thanks.
jackiehcs is offline   Reply With Quote
Old 15th March 2006, 10:18   #203  |  Link
Ginsonic
Registered User
 
Join Date: Feb 2006
Location: Austria
Posts: 44
Quote:
I'd meant to send it to Wilbert to take a look, but I've been busy the last month or so and haven't had the time to finish it. I did finally sit down today and finished the asm routines and made the d2v option able to work with sources that have multiple colorimetry types... so maybe in the next couple days.
Knock, knock Is there any news ?
Ginsonic is offline   Reply With Quote
Old 16th March 2006, 17:10   #204  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
colormatrix partly obsoleted

I did some research, and bbmpeg can set the coefficients in advanced settings. Now you just set it the same as your source. If you have dvb/s or hdtv, set rec709, for cap set rec601, and for properly made xvid set rec601.

Only one problem, bbmpg is an older program and we need to increase the motion vector length, and apply some good matrices.

I found that freeenc (based on libavcodec) has no option for color coefficients.

Ideally we need the option in restream, to set the whole stream to a coefficient.

There is one more problem of different coefficients in one stream, and the only solution so far is colormatrix. Use the coeff. of the main movie in the bbmpg settings, and use colormatrix with hints to convert 601->709 when 601 appears.
jmac698 is offline   Reply With Quote
Old 16th March 2006, 17:40   #205  |  Link
Inc
Squeeze it!
 
Inc's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 472
Quote:
Originally Posted by jmac698
I found that freeenc (based on libavcodec) has no option for color coefficients.
IF theres an option in the Libavcodec XXXcontext settings to set the coefficients for the encode then this could be integrated in FreeEnc or Qenc as both are open source.
Inc is offline   Reply With Quote
Old 16th March 2006, 17:54   #206  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,862
ffmpeg research

I see nothing in
http://ffmpeg.sourceforge.net/ffmpeg-doc.html#SEC9
relating to color coefficients. Any other ideas?
Also
http://mplayerhq.hu/~michael/ffmpeg-...ncContext.html
Has a lot of info, I don't think it's there but I'm not sure.
jmac698 is offline   Reply With Quote
Old 29th March 2006, 01:57   #207  |  Link
Hans Ohlo
Registered User
 
Hans Ohlo's Avatar
 
Join Date: Apr 2003
Posts: 123
i read trough most parts of the thread. since a hdtv transport stream i recorded showed nothing in gspot i had to determine which coefficents were used. so i loaded the avs script into virtualdub took a screenshot and did the same with the mpeg in mpc. then i compared. i found that when i used colormatrix the result was more a match. now after encoding with x264 and nero digital avc the colors were to bright and i have to do the encode all over again. isnt there a way to determine for shure if to use colormatrix or not?
Hans Ohlo is offline   Reply With Quote
Old 29th March 2006, 09:47   #208  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Quote:
i found that when i used colormatrix the result was more a match. now after encoding with x264 and nero digital avc the colors were to bright
This might be a playback issue. What are you using to play it?
Wilbert is offline   Reply With Quote
Old 30th March 2006, 12:24   #209  |  Link
Hans Ohlo
Registered User
 
Hans Ohlo's Avatar
 
Join Date: Apr 2003
Posts: 123
Quote:
Originally Posted by Wilbert
This might be a playback issue. What are you using to play it?
CoreAVC (0.0.0.4 alpha)
Hans Ohlo is offline   Reply With Quote
Old 1st April 2006, 21:59   #210  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Quote:
i read trough most parts of the thread. since a hdtv transport stream i recorded showed nothing in gspot i had to determine which coefficents were used. so i loaded the avs script into virtualdub took a screenshot and did the same with the mpeg in mpc. then i compared. i found that when i used colormatrix the result was more a match. now after encoding with x264 and nero digital avc the colors were to bright
I guess the same happens when you don't use ColorMatrix?
Wilbert is offline   Reply With Quote
Old 2nd April 2006, 07:06   #211  |  Link
Hans Ohlo
Registered User
 
Hans Ohlo's Avatar
 
Join Date: Apr 2003
Posts: 123
Quote:
Originally Posted by Wilbert
I guess the same happens when you don't use ColorMatrix?
no, i did a reencode without colormatrix and the colors are ok. strange is what i described before...
Hans Ohlo is offline   Reply With Quote
Old 20th April 2006, 03:48   #212  |  Link
jellysandwich
Registered User
 
Join Date: Mar 2004
Posts: 247
Quote:
Originally Posted by Wilbert
1) 1) I709 (= Rec.709 coefficients)
2) FCC (almost the same as Rec.601)
3) I470 (= Rec.601 coefficients [an updated version of Rec.470-6, but coefficients are exactly the same])
4) S170 (= SMPTE 170M; exactly the same as Rec.601)
5) S240 (= SMPTE 240M; almost the same as Rec.709)

If the boxes remain "black" then the used coefficients are not present in the header, and the default (which is Rec.709) should be assumed.
I'm confused about this whole ColorMatrix thing. If the boxes are black, then I should assume Rec.709 was used, and I should use ColorMatrix (Megui x264)?

js
jellysandwich is offline   Reply With Quote
Old 20th April 2006, 14:24   #213  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Quote:
I'm confused about this whole ColorMatrix thing. If the boxes are black, then I should assume Rec.709 was used
Yes, indeed.

Quote:
and I should use ColorMatrix (Megui x264)?
Yes again.
Wilbert is offline   Reply With Quote
Old 20th April 2006, 17:20   #214  |  Link
Hans Ohlo
Registered User
 
Hans Ohlo's Avatar
 
Join Date: Apr 2003
Posts: 123
Quote:
Originally Posted by Wilbert
Yes, indeed.


Yes again.
yep but in my experience in 90% of the time this is wrong and the colors (especially red) are to bright...
Hans Ohlo is offline   Reply With Quote
Old 20th April 2006, 17:22   #215  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Quote:
yep but in my experience in 90% of the time this is wrong and the colors (especially red) are to bright...
Could you upload a 10 frames vob somewhere showing this problem?
Wilbert is offline   Reply With Quote
Old 20th April 2006, 20:16   #216  |  Link
Hans Ohlo
Registered User
 
Hans Ohlo's Avatar
 
Join Date: Apr 2003
Posts: 123
it is no vob it is from mpeg2 high def ts streams.
Hans Ohlo is offline   Reply With Quote
Old 20th April 2006, 20:56   #217  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Ok, could you cut it with some tool and upload 5-10 frames from that?
Wilbert is offline   Reply With Quote
Old 2nd May 2006, 04:11   #218  |  Link
HOLiC
Registered User
 
Join Date: Jan 2006
Posts: 32
Hi, I have a quick question!
Is it necessary to use colormatrix right after source, before ivtc?
(I just remebemer someone saying that filter won't do anything if it didn't come right after the source..)

I'm trying to encode something using "tivtc mkv-vfr" method and I can't use colormatrix, since I keep getting an error about clip being not matched, or something like this:

Quote:
Avisynth Open failure:
TFM: crc32 in input files does not match that of current clip...
So, I placed colormatrix after ivtc, and it seems to work fine:

Quote:
mpeg2source()

TFM(mode=1,input="tfm.txt")
oldcount=framecount
tdecimate(mode=5,hybrid=2,input="tdec.txt",tfmIn="tfm.txt",mkvOut="timecodes.txt")

colormatrix(mode="Rec.709->Rec.601")

oldfps=framerate
averagefps=(float(framecount)/float(oldcount))*oldfps
assumefps(averagefps).Nicefps()
I'm just worried that if I do it like this, the filter won't do anything...
I would appreciated it if someone would confirm this.
Thanks in advance!!
HOLiC is offline   Reply With Quote
Old 2nd May 2006, 09:31   #219  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,312
Quote:
Is it necessary to use colormatrix right after source, before ivtc?
(I just remebemer someone saying that filter won't do anything if it didn't come right after the source..)
Only if you use hints.

Quote:
I'm trying to encode something using "tivtc mkv-vfr" method and I can't use colormatrix, since I keep getting an error about clip being not matched, or something like this:
I'm not sure. Perhaps tritical can comment?
Wilbert is offline   Reply With Quote
Old 2nd May 2006, 10:20   #220  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,387
It's a special function of the tfm 2-pass file, it errors out if you don't use exactly the same filters before tfm as you did on the first pass. tdec has the same check. Colormatrix should have no effect, but tfm's trying to protect against random changes that render the stats useless.

To disable the check, all you have to do is remove the "crc=" section from the beginning of the stats files. (Leave the other info though!)

Colormatrix will still have an effect where it is now, though. It just won't be able to use hints to decide when it actually needs to be used, it'll just affect every frame (which is usually correct).
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Reply

Tags
colormatrix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.