I have one source, it has a bit changed color (Source 2), but it is the better source in some other aspects. That's why i want it. But i wan't to change the color to the color, the other Source has (DVD Source).
Does anyone have an idea, how to do that ?
Here are some pictures: https://imgsli.com/MTc2ODM4/4/5
And here is the second source: https://uploadnow.io/f/Tjtz11N
The pictures are already upscaled, but the videos are the original input-sources of the pictures.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 43
Thread
-
-
In general (or if you're using models that shift the colors slightly)
automatic but less accurate: colourlike, or matchhistogram plugins in avisynth/vapoursynth . Commercial programs like Nuke (matchgrade), AE (RE:VisionfX) have automatching plugins as well
manual: resolve
-----------------
But your main issue in this specific case is a 601/709 mixup . In general "SD" video uses Rec601, "HD" video uses Rec709 by convention . Media players will typicall use 709 to convert to RGB (for viewing) for HD. Best practice is to encode using colorimetry flags as well (flag it properly)
Make sure you're using 601 for SD, 709 for HD for conversion to RGB if you're using RGB machine learning upscaling. When upscaling YUV, use colormatrix or simlar to shift 601=>709
If you're coming from RGB upscale (that was properly converted to RGB using 601 earlier in the workflow), then going to your final YUV distribution format, use 709 to convert RGB to YUV and everything will be ok
1 DVD reference, converted to RGB using 601 matrix, then upscaled.
[Attachment 70850 - Click to enlarge]
2 video viewed in RGB using rec709 (this is how it would look normally)
[Attachment 70851 - Click to enlarge]
3 video with 601 to 709 shift, then viewed in RGB with 709 matrix.
[Attachment 70852 - Click to enlarge] -
Ah ok, i get it, somehow.
But im a bit confused now. Is the video "source 2" now in 601 or in 709 ? The "source 2" is not a edited version of de dvd. It's a own source (they have no same origin).
So could you explain me, what conversion i have to do for the "source 2" video? From what to what ?
Sorry, im unsure
Edit: So both versions does not change color when upscaling. But the Source 2 has already a changed color.Last edited by Platos; 8th May 2023 at 10:11.
-
For Source 2, it's YUV420P10 . You would shift in YUV from 601 to 709 using colormatrix or similar. The person did not account for "SD color" vs. "HD color", and they did not flag the colorimetry either
e.g. for avs Source 2.mkv
Code:z_convertformat(colorspace_op="170m:709:709:l=>709:709:709:l")
-
If you're still lost, Source 2.mkv was upscaled, but it still has "SD color". ie. It uses 601 matrix, same as the DVD . But a typical playback chain will display it using 709 (convert it to RGB for display using 709 matrix) , so it will appear "wrong" . Some mediaplayers and devices will playback SD (=<576 height) using 601, HD(>576 height) using 709. Others will take precedence by reading colorimetry "flags" (these can be set during encoding, or sometimes in container. Encoding in bitstream is better, because if you remux, you can sometimes lose container flags)
So if you flag the colorimetry as "601" some media players/device will obey the flags, but some will not . Best practice for "HD" (>576 height) , is to use 709 matrix for actual colors , and flag as 709 matrix as convention (HD uses 709) - this has the highest chance of playing properly across all software/hardware under all situations -
Just as a complement to what suggested, maybe you can give GamMatch a try. I had good results "equalizing" captured videos between them, or matching a capture to a DVD.
https://forum.doom9.org/showthread.php?t=176004
https://forum.doom9.org/showthread.php?t=173695&page=12
https://forum.doom9.org/showthread.php?t=173695&page=13 -
Yeah, im still lost
But when i check the details of "source2" with mediainfo it shows me BT.709 matrix, not 601.
So why does it not work, when i use colormatrix from 601 to 709?
Edit: But i got it working now with hybrid:
In NVENC->Misc i had to deactivate "matrix", then in color-matrix use bt470bg and then in the Filtering-Tab of Vapoursynth using Color->Colormatrix with Rec. 601/470bg/470m to Rec. 709.
[Edit2: I dont need to do sth in filter-tab. It will get automaticly correctet in hybrid, if i do the first thing in NVEnc-> Misc setting. I can do that on the fly, while upscaling or so. The upscaled video will then be fixed]
Now the color is like in the dvd.
Thanks @ lolo, but got it working now.Last edited by Platos; 8th May 2023 at 11:40.
-
Thanks @ lolo, but got it working now.
-
Yeah i will maybe someday need it, so all inputs are nice to see.
And thanks to poisondeathray too!!
I even see the colorchange already in thumbnail lol. Or at least im thinking it xD -
-
Hmm wait, should i rather fix the color before upscaling or after upscaling ?
Edit: I dont have to use filters. I only have to "flag" (i guess it's called like that) in hybrid unter Nvenc->Misc from BT.709 to bt470bg, that's it. The rest will automatly be fixed, when i reencode (doesnt matter if i upscale or not, it will be fixed).
Ahh ok. Yeah glad i have the dvd'sLast edited by Platos; 8th May 2023 at 11:42.
-
-
Hm, but i dont know, how else i can do it . So you mean i have to use the color-matrix filter in vapoursynth. You mean that? Like i wrote in my first solution before i edited it ?
-
You can do whatever you want... I'm just warning you there are some scenarios it will definitely not playback with the correct colors. If it were me, I would do it properly. 709 actual color, 709 flags - this has the highest chance of proper playback everywhere
If you look at any retail BD release of DVD releases (not referring to ones that have been re-graded, or re-mastered), 99.999% of them change the actual colors to 709, not just change a flag - It's standard practice for "HD" . Not referring to just anime or cartoons - this happens with live action film / video retail BD releases too. Any Hollywood movie, any "indie" studio release, any documentary relase, any music concert release, any animation studio release... ie. ANY commercial release. 709 actual colors, 709 flags for "HD" . 601 actual colors, 601 flags for "SD" .
Not sure what hybrid is using, but I wouldn't use the original "colormatrix" filter, because it's 8bit. It's less precise and there will be more rounding errors, slightly less accurate colors (easy to verify loss of color accuracy with things like colorbars) -
That's what i want to do. So color matrix does not only do the flag thing, it also do actual color (but 8bit), right?
Because i dont know another option in hybrid. And i dont know, if its using 10bit or 8 bit.
Can i apply color matrix after upscaling ? Then the upscaled version has no loss in colors ("only" wrong color). But then i can shift it to the right, afterwards. Bad idea? -
I don't use hybrid, you have to ask selur
When are using typical ML filters, the vapoursynth versions work in RGB float (or half float) this is high precision, no quality loss. If you convert to RGB correctly in the first place, all you need to do is convert to YUV for your end distribution format using 709 matrix:
DVD (or SD source) => Convert to RGB float using 601 matrix => Apply ML filters + whatever filters => RGB to YUV420P10 using 709 matrix for end distribution format (and flag it as 709 when you encode) . There is no additional color matrix filter applied, it's just applying the filters "correctly" , flagging correctly in the 1st place
If you had an already existing source, that is HD, but uses 601 colors (regardless of flags) , then you would need to apply a matrix conversion and re-encode to change the actual colors. Otherwise you could just change the container flags without re-encoding (The actual colors would be wrong, but the flag would be correct for the wrong SD colors - that would be good enough for some players) -
Hmm im quite confused now xD
Because i never did sth like that and i never have problem with hybrid. Does hybrid this automaticly, selur (maybe you read that) ?
And if you read it: When i go to NVEnc->Misc settings, uncheck "matrix" and go to color-matrix and take the bt470bg insteat of 709, this only does "flag" the file to be bt470bg ? To really "convert" it's color i would need to go to vapoursynth->color->matrix-> color matrix and take "from Rec.601/470bg/470m" to "Rec.709". Right ?
Otherwise im totaly lost, why it did not change color all the time, because it never did. -
You have to double check with selur, but for NVEncC, the --colormatrix is just a flag , likely that's what it refers to
--colormatrix <string> undef, auto, auto_res, bt709, smpte170m
bt470bg, smpte240m, YCgCo, fcc, GBR
bt2020nc, bt2020c, derived-ncl, derived-cl
ictco, 2100-lms
default: undef
--vpp-colorspace [<param1>=<value>][,<param2>=<value>][...]
Converts colorspace of the video.
params
matrix=<from>:<to>
bt709, smpte170m, bt470bg, smpte240m, YCgCo, fcc, GBR,
bt2020nc, bt2020c
Higher quality and faster when you are upscaling from a SD / DVD source will be doing the workflow I suggested above. If you use a colormatrix filter afterwards, it's a 2nd filter (slower),and less accurate
You shouldn't need color matrix unless it's a pre-existing video with the wrong color -
It is a pre-existing Video with wrong color.
But anyway: How can i test, if the color (not only flags) are really the "right" color? Then i could just test if it works or not.
But at the end i have to wait, if selur can tell us, what color-matrix in Hybrid does or what have to be done to make sure, that the color really changes and not only the flags.
Because i would prefer to do it with hybrid. Command-lining is always only last hope for me. -
If it's just for personal use, you can flag it without re-encoding, and you already verified it worked ok on your setup
You can test it if you control the RGB conversion matrix for display (601 vs 709), with a known YUV input video such as colorbars, or your DVD source . When you "see" something on a display such as monitor, tv - it's been converted from YUV video to RGB somewhere. There are different ways to convert the same YUV video to RGB for display (not just 601 vs 709 , there can be other factors, but matrix is the most important and common distinction)
It's not "command line" as in command prompt, you can do it with avisynth (avspmod to preview) , or vapoursynth (vsedit to preview), or vdub2 to preview either
eg. in avs
Code:ConvertToRGB24(matrix="Rec601")
Code:ConvertToRGB24(matrix="Rec709")
Code:clip = core.resize.Bicubic(clip, format=vs.RGB24, matrix_in_s="170m")
Code:clip = core.resize.Bicubic(clip, format=vs.RGB24, matrix_in_s="709")
-
Ok, how can i "control the RGB conversion matrix for display"?
But i noticed another "problem": When i cut a video with avidemux without reencoding, the color looks different. So the dvd source i uploaded here was a avidemux cut of the original dvd source. But i chose "copy" on avidemux video-settings, so no reencode. But the color looks now different (to be faire, on the original the color looks a bit bad in my opinion, or its the contrast idk).
(The thing is, i worked the whole time with avidemux-cuts, so i did not recognized that).
I did now a screenshot of the "real" untouched (and uncutted) dvd source. And i also did a screenshot from an upscale (from hybrid) which i have done with these whole 20min "real" untouched dvd source (but without higher the resoltion). And then, the color looks exactly like in my avidemux-cuts (like the one i uploaded here in my first post). I did additional another upscale but with higher up the resoltion to 720p and it looks also the same like the avidemux-cut from post 1.
But why does the color looks different to the uncutted dvd original? Is that even a color-difference or is this only a contrast-thing or sth like that ?
[Here the two pictures in a slider-compare: https://imgsli.com/MTc3MTQ4]
Here are two pictures of these two files (and a mediainfo of the uncutted dvd source): https://uploadnow.io/de/share?utm_source=4BkW147
Here is a media info of the upscaled (but no higher resolution) one and also an upscaled one, which has really a higher resolution: https://uploadnow.io/f/cswbdvw
(i dont know if "upscale" is the correct word, when i using an upscale-model without higher the outputresolution).
So i can't upload the whole 20min vid here (also because of copyright i guess). But that's why i uploaded the mediainfo pictures.
Maybe i have to open up a new question for hybrid-specific ? -
According to the mediainfo data, both flags are tagged as bt470.
Hybrid does take the color information from the input using MediaInfo, if the input lacks those it guesses.
NVEnc's VUI infos are only tags, they do no conversion. Hybrid does not support NVEncCs
Read the tool-tips of options before blindly enabling and disabling them.
If your content is wrongly flagged, you should tell that to Hybrid to assume the correct color matrix (Filtering->Misc->Overwrite input color matrix).
Otherwise, Hybrid will take this wrong information as basis for any yuv<>rgb conversions and the tagging.
If you plan to mix content, you should be sure they use the same luma levels (tv vs. pc) and the same color matrix.
Hybrid support ColorMatrix conversions through ColorMatrix and TimeCube.
(Hybrid does not support "--vpp-colorspace" option for NVEncC, but you can add it using the NVEnc->Misc->Addition.)
Cu Selur
Ps.: as a side note: instead of opening xy different threads, why not stick with one?users currently on my ignore list: deadrats, Stears555 -
Ah ok, thank you very much. I have tooltips always enabled and read the stuff there, if available.
An ok, yes thank you.
What is the difference betwen "Filtering->Misc->Overwrite input color matrix" and going to nvenc/misc uncheck "matrix" and choose the colori want on "color matrix" ? So what does that do actually, when i change that ? Or why did it work? I red the tooltips, but i just tried out.
Ok, if the color-flag from mediainfo is not wrong, do i have to care about color changing or does hybrid do the stuff for me? Or do i have to do always that what poisondeathray said?:DVD (or SD source) => Convert to RGB float using 601 matrix => Apply ML filters + whatever filters => RGB to YUV420P10 using 709 matrix for end distribution format (and flag it as 709 when you encode) .
Sry, when i ask so much, i just get really confused about these color-things.
And about threads: When i dont open up a new thread for each topic, all will see a title which has nothing to do with my actual problem (the title from the first problem). -
What is the difference betwen "Filtering->Misc->Overwrite input color matrix" and going to nvenc/misc uncheck "matrix" and choose the colori want on "color matrix" ? So what does that do actually, when i change that ?
The other lets Hybrid know that the input flag is wrong.
Or why did it work?
Ok, if the color-flag from mediainfo is not wrong, do i have to care about color changing or does hybrid do the stuff for me? Or do i have to do always that what poisondeathray said?
Hybrid does not automatically change the color matrix without the user telling it to.
So when my source has wrong color, then i can go to color matrix in "filter->Vapoursynth->color>matrix" and change it from the bt470bg (in my example) to rec.709 if my output will be 720p+ ?
Or do i just have to flag it correctly in "Filtering->Misc->Overwrite input color matrix" and hybrid does the rest ?
b. If you want a color matrix conversion use ColorMatrix or TimeCube.
Sry, when i ask so much, i just get really confused about these color-things.
You should start looking at the generated scripts to see what happens.
You should not assume Hybrid does magic and knows what you want to do,...
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Ok, thanks i will try it.
It's just i did now exactly nothing about this color-stuff. I did not know, that there is a color-matrix, flags and players which interprate color differently. So i never thought i have to do sth. I assumed the color stays the same, when i dont change it manually. -
If you stay the whole time inside the same color space (YUV or RGB) nothing would change.
If you do a YUV<>RGB conversion somewhere, color matrices are important.
Most ai stuff works in RGB, so unless your input is also RGB the input color matrix is important.
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Hy guys :
I have another color-story
This time i tried already with the knowledge, i got from this thread, but i can't get it work and im not sure, what the problem is.
I have this time 3 sources. The first is orginal bluray and a "source 2" and a "source 3". I want to use source 3, but want to have the color form the bluray. But in mediainfo it does not show me any information about colormatrix (i dont see it).
I did following in hybrid with source 3:
In Filtering-Misc i overwrote the input color matrix to "rec.601/470bg/470m" and in Vapoursynth-color--matrix-colormatrix i choose from "rec.601/470bg/470m" to "Rec.709".
When i do that, the color from source 3 is now exactly like source 2. Quite similair to bluray, but not the same.
So because i don't know, whatthe colormatrix of the bluray is, i have to ask here again. And im also not sure, if the problem is even about colormatrix or sth else. So my question is, what is the colormatrix of the bluray and how do i see that in mediainfo ? And is the problem a colormatrix-problem or is it sth else? Because then i try what lollo said in post #6. Or maybe there is a different solution.
Here are 5 Files. The bluray, source 2 & 3 (untouched) and an upscaled source 2 and an upscaled and color-corrected source 3 (as i explained above).
https://uploadnow.io/f/wVjpyln
Edit: Voices are different, if you hear close. But that's only because of different language.
Edit2: I cant' mask it with the bluray, because the bluray has different intros/outros and then the actual content of the episode does not start at the same time.
But is it possible with hybrid to "detect" gamma-level and then i can just globally adjust it?Last edited by Platos; 14th May 2023 at 08:30.
-
Update: I found out, that not source 3 is wrong, it is source 2.
That does not mean Source 3 is same as bluray, because i had to fix it too, but it was no colormatrix-problem (so at least i think that, but if you say it is, then tell me). I could make the style from source 3 quite similair to bluray, when i use in vapoursynth-color-basic "levels" with 1.05 gamma and "tweak" with 0.85 saturation (that's the most important) and -5 brightness. I have to final-check the settings, but now it looks like the bluray. But at the end, im not sure, if the bluray is "right", because it's quality is quite bad. So at the end i take that, what i like most.
It works also, when i only use 0.85 saturation, but with 1.05gamma and -5 brightness it's even more close to bluray. But as i said, i have to decide, what style i want, because the bluray is made bad, so... -
I have an update again (final one). It is even more complicatet. But i have one question now.
What i said above is not wrong, but i found out now, that the bluray itself is wrong in color. I had to search a scene with the girl which has pink hair. Because her hair is very sensitive to colorchanges. And there i could see her hair in the bluray does NOT have the right color (because i know it).
So but i could fix that too (in source 2 und 3 and bluray). I will explain my results:
For making it easier, always when i say now "color-matrix change" i mean always that: "In Filtering-Misc i overwrote the input color matrix to "rec.601/470bg/470m" and in Vapoursynth-color--matrix-colormatrix i choose from "rec.601/470bg/470m" to "Rec.709"."
And when i say "color-change" i mean always that: "i use in vapoursynth-color-basic "levels" with 1.05 gamma and "tweak" with 0.85 saturation (that's the most important) and -5 brightness.".
- Source 2 with "color-matrix-change": Does nothing, because i guess it is already the "right" one. But actually color is still wrong.
- Source 3 with "color-matrix change": Looks exactly like Source 2 now. Color is still wrong.
- Source 3 with "color change": Now it looks very similair to the bluray (only similair, because it's a question of the right values there)
- Bluray with "color-matrix-change": Now this looks right (lol).
Questions: Problem is now, i was not able to make source 2 or 3 looking like the bluray with "color-matrix-change" with a matrix-change. Does anyone has a clue, if it is possible ?
Anyhow: How do i now made Source 2/3 looking like the bluray with "color-matrix-change" ?
It worked for me, when i make the "color-change" with source 2. It also worked, when i first do the "color-matrix-change" with source 3 and then i use the "color-change". It looks now 98% the same like the fixed bluray (in my eye).
And btw: I fixed the Bluray as i quotet above. But when i use 1440p on upscaling, hybrid choose automaticly rec. 2020 (i could force it to be 709 manually). But when i let it on Rec.2020, it has also the wrong color. So i have really to force it to Rec.709. I think this whole series is produced often with wrong colors (depends on region). At the end, i actually can't say, what color now the "right" one is. But it just looks wrong for me, when i don't do it like that.
That was now a big "research" lol. The last one was easier.
Edit: In another scene it does not look right. strange, have to do more research. No, it works. Just had a mess with my files and edited color on wrong file xD. It's fine nowLast edited by Platos; 14th May 2023 at 14:58.
-
I haven't read most of this thread but this transforms the YUV values from source2 to closely match the Bluray file's YUV:
Code:s2 = LWLibavVideoSource("Source 2.mkv").Subtitle("s2") s2 = s2.ColorYUV(gain_y=-5, off_y=-4, gamma_y=12, cont_u=-50, cont_v=-50)
Last edited by jagabo; 15th May 2023 at 07:13.
Similar Threads
-
Transferring chroma/color from one source to another?
By killerteengohan in forum RestorationReplies: 7Last Post: 16th Apr 2022, 10:27 -
why formatfactory dont use . ass font color .. they use thier own color-
By maload in forum SubtitleReplies: 2Last Post: 8th Apr 2022, 02:54 -
Keeping accurate color between source, avisynth/virtualdub and re-encode
By mrwhitethc in forum Video ConversionReplies: 3Last Post: 29th Mar 2022, 16:26 -
big color gradient 8bit vs 10bit X265 encode from 8bit source PLZ help
By kamyar in forum Newbie / General discussionsReplies: 0Last Post: 21st Apr 2021, 04:51 -
Help needed ASAP with color issue (Background same color as shirt talent)
By marciano999 in forum EditingReplies: 0Last Post: 13th Jul 2020, 10:40