View Full Version : Pls Help me with this chroma problem
qwerty1983
21st August 2013, 09:50
Hello, please have a look at this sample clip (720x576, interlaced, dvb-t)
Forget the fact that it has the wrong aspect ratio (16:9 instead of 4:3).
https://mega.co.nz/#!fBMTWBDL!XGdrqVGOqjs6lt3p2duKZmdcHtM0q3uzJhS-SLfGlh8
Look at the pictures. Frame-by-frame the colour changes.
http://img278.imagevenue.com/loc581/th_071716466_frame_x_122_581lo.jpg (http://img278.imagevenue.com/img.php?image=071716466_frame_x_122_581lo.jpg) http://img134.imagevenue.com/loc19/th_071718862_frame_x1_122_19lo.jpg (http://img134.imagevenue.com/img.php?image=071718862_frame_x1_122_19lo.jpg)
What causes this problem? How can i fix it? Thanks in advance.
raffriff42
21st August 2013, 16:26
Try temporal smoothing (http://avisynth.nl/index.php/TemporalSoften) in the chroma channel? Assuming this occurs in a rapidly repeating pattern.
LemMotlow
22nd August 2013, 18:26
What causes this problem? How can i fix it? Thanks in advance.
Don't know what caused the problem. Overall the sample is oversaturated, mostly with hot reds, and
the U channel looks crippled. You gave no processing info, so it's anyone's guess.
Original frames, Even (left), Odd (right);
http://forum.doom9.org/attachment.php?attachmentid=13659&stc=1&d=1377191747
http://forum.doom9.org/attachment.php?attachmentid=13660&stc=1&d=1377191822
It's not possible to make alternate frames look alike by filtering them together. I filtered Odd and Even frames separately,
corrected them as well as I could, then used ColourLike to make them match more closely.
http://forum.doom9.org/attachment.php?attachmentid=13661&stc=1&d=1377191905
The script used a drop of cnr2 to clean up some rainbows, but doesn't address the low-bitrate artifacts which will be
difficult to repair. The frames I called Odd frames have slightly different luma levels, so a deflicker plugin
would be handy after frames are interleaved. I tried DeFlicker in VirtualDub, which seemed to do the trick.
sample_o1_i trial encode - interlaced(~6.5 MB): http://www.mediafire.com/download/y0c423zuda8hq9z/sample_01_i.mkv
sample_o1_Qi trial encode - interlaced QTGMC(~6.5 MB): http://www.mediafire.com/download/9m642c7v1nmnz2g/sample_01_Qi.mkv
# --- Avisynth plugins:
#-SmoothAdjust.dll
#-ColourLike_25Aug05.dll
#-cnr2.dll
#-- Set a "vidpath" variable to the path of the source video. --
#-- Customize the value of the path string for your system. ----
vidpath="E:\forum\chroma\"
#-- Open the video with the method of your choice.--
i1=AVCSource(vidpath+"00-sample.dga")
#-- Color-correct Odd frames and save the histograms --
o1=i1.SelectOdd()
o1
ColorYUV(cont_v=-100)
ColorYUV(Autowhite=true)
ColorYUV(off_v=10,cont_u=-120)
SmoothTweak(hue1=-10)
WriteHistogram(vidpath+"o_hist.txt",1)
o2=last
#-- Color-correct Even frames and save the histograms --
#-- This routine makes Even frames look closer to the --
#-- Odd frames in color, but they won't match exactly. --
e1=i1.SelectEven()
e1
ColorYUV(cont_v=-100)
ColorYUV(autowhite=true)
ColorYUV(cont_u=-150,off_v=5)
SmoothTweak(hue1=-5)
WriteHistogram(vidpath+"e_hist.txt",1)
e2=last
#-- Use ColourLike to match color/levels in Odd & Even --
e3=e2.colourlike(vidpath+"e_hist.txt", vidpath+"o_hist.txt")
#-- interleave even/odd ---
Interleave(e3,o2)
Cnr2("xxx",4,5,255)
return last
StainlessS
22nd August 2013, 18:32
I think that very same clip / same problem was posted before, maybe 1+ years past.
LemMotlow
22nd August 2013, 19:29
I usually check previous user posts if I intend to reply. Just didn't do it this time. Will make a note of it. I saw similar post on another forum, but different video.
ED: Oops, just found same topic March 2013 (http://forum.doom9.org/showthread.php?p=1622876#post1622876). But the video link is dead and no sample pics.
StainlessS
22nd August 2013, 21:06
Dont know if by same OP, just that the 1st post pics look familiar to me (I dont know the movie).
(seems longer than a few months ago).
qwerty1983
22nd August 2013, 21:32
Thank you raffriff42 and especially LemMotlow. StainlessS i'm sorry if i broke some rule. I have posted another clip (LemMotlow's link) with the same problem. Noone has posted this before, it's from some old tv-series.
LemMotlow thank you very much for your time. What if i also used 'ColorYUV(levels="TV->PC")'. Is it a good idea? Is your 'sample_o1 trial encode' consisting of only the odd frames? Did you use any deinterlacer?
LemMotlow
22nd August 2013, 21:52
Thank you raffriff42 and especially LemMotlow. StainlessS i'm sorry if i broke some rule. I have posted another clip (LemMotlow's link) with the same problem. Noone has posted this before, it's from some old tv-series.
LemMotlow thank you very much for your time. What if i also used 'ColorYUV(levels="TV->PC")'. Is it a good idea? Is your 'sample_o1 trial encode' consisting of only the odd frames? Did you use any deinterlacer?
TV->PC depends. You already have rather dense blacks. IF you want TV display, the target output for luma/chroma is RGB 16-240 (TV range). PC range is RGB 0-255. PC range will look rather "raw" on a TV. TV display assumes the incoming signal has NTSC-PAL values and will expand RGB 0 blacks to below zero, which looks really ugly on most TVs.
The posted mkv is interlaced, with all frames. The odd frames looked best after color correction, so I brought the even frames as close as I could and then made the even frames even closer to the odd frames with ColourLike. It was necessary to correct both sets of frames: ColorLike doesn't work too well if the two inputs are so dissimilar that manipulating the histogram in the "different" frame creates distorted colors. At least, that's been my experience with that plugin.
qwerty1983
22nd August 2013, 21:57
The posted mkv is interlaced, with all frames.
That's weird. When i play the clip with vlc or mpc there are pairs of identical frames (as if the clip is progressive). It's flagged as interlaced though.
StainlessS
22nd August 2013, 22:09
StainlessS i'm sorry if i broke some rule.
I only meant that the problem may have already been solved.
LemMotlow
22nd August 2013, 22:26
Let me check the mkv I posted. I made one version with QTGMC to try to see if it would clean up a bit. Back in a moment.
ED: Oops, you're correct. I made 4 versions, trying to clean up some low bitrate noise. Not entirely successful (need more time to play with that), but in the process I posted the wrong mkv. (What? Moi? Wrong version??). The post has been corrected. And just for good measure I threw in a link for a QTGMC re-interlaced version that also used awarpsharp2 to try to clean up some edge artifacts. Looks as if all that previous encoding grunge will require more work. This time around, I changed the version names.
sample_o1_i trial encode - interlaced http://www.mediafire.com/download/y0c423zuda8hq9z/sample_01_i.mkv
sample_o1_Qi trial encode - re-interlaced QTGMC http://www.mediafire.com/download/9m642c7v1nmnz2g/sample_01_Qi.mkv
QTGMC/reinterlaced looks a little smoother. Both looked better in Media Player Classic and even Windows Media Player (surprise!). I've never been a great fan of VLC, but that's just me. I also tried some progressive versions, but fast motion didn't play as as well IMO.
raffriff42
23rd August 2013, 14:12
LemMotlow, that looks really good; I learned a few things! Simply doing TemporalSoften has a bit of motion smearing, and turns cuts into mini-dissolves.
TemporalSoften(1, 30, 120, mode=2).Tweak(sat=0.60)
LemMotlow
23rd August 2013, 15:29
TemporalSoften is an excellent filter, but you can't throw it at everything. There is some motion smear in the original clip from the low bitrate previous encode. Compression artifacts are very difficult to deal with. I used QTGMC at a fairly "fast" setting and re-interlaced, because some of that motion noise didn't play well as progressive video. Slower QTGMC settings can smooth out more of that garbage without too much detail loss. A purely temporal smoother in itself will likely make that motion smear look a bit worse. Avoid over filtering; sometimes you just have to live with some residual low bitrate defects. Strong smoothers or degrainers will generate block noise and banding in those smooth wall textures. It will take some experimentation.
My own mkv might look somewhat more snappy with more saturation, but be careful with that: I'm familiar with the video series from years back, and it did have that "soap opera", somewhat soft low contrast look to it.
ED: Apparently a remark that I typed during this post was erased somehow (I hate laptop touchpads -- the cursor bounces everywhere), so I re-type it here to bring your attention to it:
I don't care for autocolor or autogain filters. But occasionally they help, even if one always has to backtrack and correct their decisions. Most of time, however, auto filters do exactly what you don't want them to do.
:rolleyes:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.