Here's a Short MPEG2 video sample.
I can fix the first part of the video with Tweak & RGB Adjust. The 2nd part was from another video but it seems to have a weird tint that I can't fix with RGBAdjust. Any suggestions as to how I can remove the tint? I assume ColorMill will work but I'm unable to use it as it doesn't work well in multi threaded mode.
+ Reply to Thread
Results 1 to 30 of 56
-
Last edited by VideoFanatic; 26th Dec 2012 at 20:35.
-
Tint? I think you just want to fix the levels and decrease the saturation. You can fine tune it yourself but this gets the two segments fairly close.
Code:Mpeg2Source("Tint (ECW Hardcore TV November 14 2000).d2v")#, CPU=6, Info=3) p1=Trim(0,246).ColorYUV(off_y=5, gamma_y=50, cont_u=-60, cont_v=-60) p2=Trim(247,0).ColorYUV(off_y=-40, gain_y=90, cont_u=100, cont_v=100) Return(p1+p2)
Last edited by jagabo; 26th Dec 2012 at 22:21.
-
Try rgb equalizer(RGB EQ) in hue mode with 5 sliders, it's on this page towards the end http://www.engon.de/audio/vhs4_en.htm
It's like colormill but more powerful because you can work on the whole range of rgbcmyk or very specific ranges , ex: in between the darks and mids hence why i recommend 5 sliders minimum.
CMYK is good too but very simple*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
I didn't realise before but I can actually get the same contrast and brightness results using Tweak Cont & Bright. Thanks though.
However there still seems to be a blurry brightness haze over the 2nd part of the video. How can I get it to look like the first part or at the least, how can I remove that haze?
I'll give RGB EQ a try another day. -
-
It doesn't look quite right. Here's what I've done so far:
Code:setmtmode(5,9) Mpeg2Source("J:\2 = New\1 = Test files\Tint\Tint (ECW Hardcore TV November 14 2000).d2v", CPU=6) setmtmode(2,0) filtered=Tweak(Hue=-10, Sat=1.0, Bright=10, Cont=1.0, Coring=False) ReplaceFramesSimple(last,filtered,Mappings="[0 246]") filtered=ConvertToRGB32(interlaced=true). RGBAdjust(1.0, 1.0, 1.3). converttoyv12(interlaced=true) ReplaceFramesSimple(last,filtered,Mappings="[0 246]") filtered=Tweak(Hue=-10, Sat=1.5, Bright=-30, Cont=1.2, Coring=False) ReplaceFramesSimple(last,filtered,Mappings="[247 395]") filtered=ConvertToRGB32(interlaced=true). RGBAdjust(1.0, 1.0, 1.2). converttoyv12(interlaced=true) ReplaceFramesSimple(last,filtered,Mappings="[247 395]") Crop(10,0,-10,-6) AddBorders(18,2,18,4, $000000)
-
You're joking, right? The source is pretty messed up, but if mine 'doesn't look quite right', yours looks 'quite wrong'.
Of course, there are some 'artistic' decisions to be made, and if you like the mat to be blue rather than the source's blue-green, then fine. But in your second half the contrast is way too low. Also, I think you tried to keep the original black levels (perhaps to be fixed later), judging by the 'Coring=False' you added to your Tweak settings, but in your conversions to RGB and back you wound up clipping them anyway. -
Can't say you aren't trying, anyway, although the steps taken here won't correct the bright part or or the "tint" problem. Any kind of histogram would tell you where the "haze" is coming from and what the color imbalance is, as well as the fact that the imbalance is not linear across the spectrum. Also, no one seems to have noticed that in the original source, frames 245 and 246 are duplicated as frames 247 and 248. The join at frame 247 is with a piece of video having different videos and a slightly different viewing perspective.
Likely there's no way to make an exact levels or colors match. The washed-out clip that was joined is apparently from, a different tape, not with just zero contrast but with a totally different color balance. Both sections have oversaturated but extremely uneven Reds (so saturated, it's bleeding red badly), and too much midrange blue -- so adding more blue and leaving Red overcooked doesn't solve the problem.
Re-worked frames 244 and 245 (I deleted the 2 duped frames). Skin tones are similar in both frames, but look how far out of whack the extremes are. Blacks in the early part of the clip are crushed, brights in the latter part were clipped long before it was joined to the first part.
Used ColorYUV for the basic levels and color balance, then tweaked considerably in VirtualDub...but more RGB tweaking definitely needed.
Code:# ************ FIRST PART ********* # Imported: QTGMC-3.32.avs, daa3.avs # LoadCPlugin: yadif.dll MPEG2Source(vidpath+"TintECWHardcore.d2v") Trim(0,244) ChromaShift(c=-2) ColorYUV(off_y=22) ColorYUV(cont_v=-50) Crop(8,0,-4,-4) SmoothLevels(0, 1.0, 255,6,235) AddBorders(8,2,4,2) Daa3() QTGMC(preset="faster",SourceMatch=3, Lossless=2, TR2=2) Vinverse() AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave() ConvertToRGB32(matrix="Rec601",interlaced=true) Crop(2,0,0,0).AddBorders(0,0,2,0)
Code:# *********** SECOND PART ********* # Imported: QTGMC-3.32.avs # MPEG2Source(vidpath+"TintECWHardcore.d2v") Trim(248,0) ColorYUV(cont_y=75,off_y=4) ColorYUV(cont_v=-20) Tweak(coring=false,cont=1.4, Sat=1.8) SmoothLevels(0,0.90,255,12,235) Crop(8,0,-4,-4).AddBorders(8,2,4,2) QTGMC(preset="faster",InputType=1) Clip1=last Clip1.AssumeTFF() Clip2=Clip1 Clip2.AssumeTFF() Clip3=Interleave(Clip1,Clip2) Clip3 AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave() ConvertToRGB32(matrix="Rec601",interlaced=true) Crop(2,0,0,0).AddBorders(0,0,2,0) return last
Last edited by sanlyn; 5th Jan 2013 at 06:17.
-
Thanks, I'm trying it now. Where do I find the DAA3 plugin? Also I usually just do ConvertToRGB32(interlaced=true). What is the reason for having ConvertToRGB32(matrix="Rec601",interlaced=true)?
-
The color matyrix for different display conversion and encoding is briefly explained in VirtualDub's documentation on the "ConvertTo..." functions. http://avisynth.org/mediawiki/ConvertToRGB. Because you'll be workin and encoding for TV display you want to use the Rec601 color matrix when converting YUV ->RGB. If you don't convert to RGB at all, you don't even need "Convert". But I use it anyway to check for levels and chroma that would be out of bounds for RGB 16-240 TV display.
Daa3 is a mod of the original daa(). It's a function, not a plugin. Found it on Doom9 somewhere. I wish some of this useful stuff wasn't so difficult to locate, but it often is. Daa3 attached. It's for anti-alias.Last edited by sanlyn; 21st Mar 2014 at 09:59.
-
Is DAA3 better than the AA function of McTemporalDenoise? I don't usually use the AA McTemporalDenoise function because it doubles the encoding time.
The ConvertToRGB page says this:
Code:matrix: Default "Rec601", scaled to TV range [16,235].
- "PC.601" : Uses Rec.601 coefficients, keep full range [0,255].
- Rec709" : Uses Rec.709 coefficients, scaled to TV range.
I downloaded SmoothAdjust script as that seems to be the updated version of SmoothLevels and I named it as an avsi file. I tried to load your first script but AvsPmod gave this error window:
Traceback (most recent call last):
File "AvsP.pyo", line 7419, in OnMenuVideoRefresh
File "AvsP.pyo", line 11037, in ShowVideoFrame
File "AvsP.pyo", line 11506, in UpdateScriptAVI
File "pyavs.pyo", line 167, in __init__
File "avisynth.pyo", line 117, in Invoke
WindowsError: exception: access violation reading 0x00000000 -
Daa3 is better in some respects (it doesn't soften as much as some other AA filters and is usually faster). MCTD uses SangNom. Running a separate AA is faster.
It does make a difference. Almost all standard def video and tape use some form of Rec601. Rec709 is for HD. "601" and "709" are similar, the main difference being with red + green saturation. If your source is Rec601, that's what you use. If you're going from SD to HD (which I don't think works that well), you still need Rec601 if that's your source matrix. Whether or not your encoder wants 601 or 709 depends on what you're encoding for.
If your target is PC or 'net, the color matrix used is PC601. PC video uses RGB 0-255, TV video uses RGB 16-235 for both SD and HD. I use the matrix parameter just to be sure that VirtualDub and its plugins don't make unwarranted assumptions about the source.
If you process video on a PC using a PC601 color matrix it will look more contrasty on a PC. It will look strange on TV. All high-end NLE's and video production software + hardware, as well as photo apps like Photoshop Pro, are always set for the appropriate color matrix to correctly process and display what they're doing. Also note that various kinds of histograms, vectorscopes, waveforms, etc, are furnished with those applications, as well as with Avisynth and VirtualDub plugins. Without those 'grams and 'scopes, you're shooting blind.
I don't know what those errors mean. There are many reasons why I gave up on AvsPmod. You have just cited one of them. SmoothLevels was used to help retrieve some of the crushed and clipped detail, and to smooth luma and chroma to help prevent banding.Last edited by sanlyn; 21st Mar 2014 at 09:59.
-
The problem was I didn't install the SmoothAdjust plugin correctly. I've installed it correctly now but I'm getting this error:
Code:Script error: there is no function named "Yadif". (QTGMC-3.32.avsi, line 721) (QTGMC-3.32.avsi, line 510) and it says there's an error in this line in my script: QTGMC(preset="faster",SourceMatch=3, Lossless=2, TR2=2)
The ConvertToRGB page says this:
matrix: Default "Rec601", scaled to TV range [16,235].
PC.601" : Uses Rec.601 coefficients, keep full range [0,255].
Rec709" : Uses Rec.709 coefficients, scaled to TV range.
The first line says the default is Rec601 which is scaled to TV range. Yet the Rec709 line says that's scaled to TV range. Is that a typo because both lines say they are for TV? Which do I use?
Last edited by VideoFanatic; 20th Jan 2013 at 13:50.
-
You have to load it in the script. And not normally either. One way is this:
LoadCPlugin("C:\Path\ToYadif.dll")
Note the 'C'. Had you read the included doc you might have come across this:
Must be loaded with Load_Stdcall_plugin("yadif.dll") or LoadCplugin("yadif.dll") (not LoadPlugin !). Do not use autoloading. -
Thanks Manono it's working now. Sanlyn:
The ConvertToRGB page says this:
matrix: Default "Rec601", scaled to TV range [16,235].
PC.601" : Uses Rec.601 coefficients, keep full range [0,255].
Rec709" : Uses Rec.709 coefficients, scaled to TV range.
The first line says the default is Rec601 which is scaled to TV range. Yet the Rec709 line says that's scaled to TV range. Is that a typo because both lines say they are for TV? Can you quote the part I should use in my script?
Surely it won't matter if I specify a matrix or not because after ConverttoRGB I'm using converttoyv12(interlaced=true)? Anyway I tried specifying matrix="Rec601" and also not specifying anything and both videos looked the same.
I also tried using Daa3() and I didn't see any difference to the ring ropes on another video I have.
Can someone please explain to me what Coring=False does in Tweak? I just thought I should always have it for some reason.
Last edited by VideoFanatic; 20th Jan 2013 at 17:52.
-
They are both scaled to TV range, but the colors are slightly different.
https://forum.videohelp.com/threads/329866-incorrect-collor-display-in-video-playback?p...=1#post2045830
In general, rec.601 is used for standard definition video, rec.709 for high definition video. PC.601 and PC.709 are used in special cases. Some codecs let you specify which to use to playback with the correct colors. Many players ignore the flags and always use rec.601.
It will matter if your source was PC.601, rec.709, or PC.709.Last edited by jagabo; 20th Jan 2013 at 19:02.
-
OK so if my source was TV footage then should I just specify rec.601 since it's standard definition?
On a separate issue when I do the following I noticed that it lowered the quality of my video slightly. Is that normal?:
ConvertToRGB32(interlaced=true) RGBAdjust(1.0, 1.0, 1.1, 1.0, 0.0, 0.0, 0.0, 0.0, 1.00) converttoyv12(interlaced=true)
I tried using Daa3() on THIS short video sample and I didn't see any difference to the ring ropes. I also tried the AA function of McTemporalDenoise but that also made no difference.
-
Last edited by jagabo; 20th Jan 2013 at 19:05.
-
I use DAA3 to tighten up some of the darker figures in the background (it smooths, then gently resharpens). There's not so much aliasing as there is some combing and mosquito noise. Another good anti-alais is Santiag(). But if you don't see anything bothering you, try no AA at all. QTGMC cleans some that anyway. I didn't notice a lot of noise on the ring ropes after QTGMC.
@jagabo: some odd things happening when I try to correct a post, too. I'm assuming it'll clear up.Last edited by sanlyn; 21st Mar 2014 at 10:00.
-
Last edited by jagabo; 20th Jan 2013 at 22:04.
-
It's not so much aliasing I see but shimmering on the ropes. I tried this but I still see it:
Code:McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast") Vinverse() SeparateFields() SelectEvery(4,0,3) Weave()
Is DAA3 safe to use on any type of video such as VHS to DVD conversions?
Where can I get the Santiag script? Does that slow the encoding time down?Last edited by VideoFanatic; 21st Jan 2013 at 18:16.
-
Is DAA3 safe to use on any type of video?
Where can I get the Santiag script? Does that slow the encoding time down? -
Last edited by sanlyn; 21st Mar 2014 at 10:00.
-
OK I tried Santiag but I can still see the ropes flashing (not sure what to call it). Is there anyway to fix that? Also is there an alternative to Santiag because that doesn't work at all in multi-threaded mode.
Referring back to post 8: https://forum.videohelp.com/threads/351958-How-to-remove-tint-with-Avisynth?p=2210620&v...=1#post2210620 and the following adjustments you made for the 2nd part of the video:
Code:ColorYUV(cont_y=75,off_y=4) ColorYUV(cont_v=-20) Tweak(coring=false,cont=1.4, Sat=1.8) SmoothLevels(0,0.90,255,12,235)
Also is there any particular reason why you used ColorYUV twice like the above instead of just once?Last edited by VideoFanatic; 21st Jan 2013 at 19:48.
-
-
Agreed. AA filters won't stop that kind of shimmer. It's from bad playback, bad transfer, and a lot of other mistakes in earlier processing. QTGMC helps some of it, but if the priority seems to be speed over more thorough filtering. QTGMC at "ultra fast" won't accomplish much. It's the slower and repair modes of QTGMC and other plugins that are designed for heavier work, and they don't run at high speed. In any case, there's only so much one can get from this extent of video damage.
Last edited by sanlyn; 21st Mar 2014 at 10:00.
-
Your code is incorrect. I outlined the error in BLUE, above.
Code:ColorYUV(cont_y=75,off_y=4) ColorYUV(cont_v=-20) Tweak(coring=false,cont=1.4, Sat=1.8) SmoothLevels(0,0.90,255,12,235)
But I don't understand your question about the ColorYUV and other values. The values I used are posted in the script in #8.Last edited by sanlyn; 21st Mar 2014 at 10:00.
-
OK I'm getting confused here. Referring back to post 8: https://forum.videohelp.com/threads/351958-How-to-remove-tint-with-Avisynth?p=2210620&v...=1#post2210620 and the following adjustments you made for the 2nd part of the video:
Code:ColorYUV(cont_y=75,off_y=4) ColorYUV(cont_v=-20) Tweak(coring=false,cont=1.4, Sat=1.8) SmoothLevels(0,0.90,255,12,235)
Tweak(Hue=-10, Sat=1.5, Bright=-30, Cont=1.2, Coring=False)
RGBAdjust(1.0, 1.0, 1.2)
If I hadn't used the above then what would your values be for the script at the start of this post? Also should I put your line like this instead of having 2 ColorYUV statements?: ColorYUV(cont_y=75,off_y=4, cont_v=-20)Last edited by VideoFanatic; 22nd Jan 2013 at 05:54.
-
It will be slightly faster as a single call to ColorYUV(). Where you have to be careful is when two operations change the same channel:
Code:ColorYUV(off_y=20, cont_y=100)
Code:ColorYUV(off_y=20).ColorYUV(cont_y=100)
Last edited by jagabo; 22nd Jan 2013 at 06:39.
Similar Threads
-
How to remove or smooth away tape header noise with Avisynth?
By VideoFanatic in forum RestorationReplies: 3Last Post: 20th Oct 2012, 21:18 -
how to remove logo by avisynth scripts and filters?
By poluhale2 in forum EditingReplies: 15Last Post: 8th Oct 2012, 08:31 -
Remove an opaque logo using Xlogo in Avisynth
By AlanHK in forum User guidesReplies: 34Last Post: 4th Oct 2012, 23:17 -
Color/tint brightening with avisynth?
By darkdream787 in forum DVD RippingReplies: 8Last Post: 18th May 2012, 12:48 -
Avisynth filters to remove mosquito noise without softening
By AlanHK in forum RestorationReplies: 8Last Post: 7th Jan 2010, 23:49