Yes, that is true; I have used them both for this purpose.
Two comments:
1. That bad video looks like the result of bad tracking. Since this is MKV, I assume you got it from someone else, but if you have the tape and can do a new transfer, use the manual tracking control. I'll bet you can make it look almost perfect.
2. If you can't re-transfer, then jagabo is correct. However, RemoveSpots requires a LOT of tuning and is not at all easy to use. Therefore, you might want to start with a function I wrote several years ago (see below) and which I just recently used on two projects. It worked absolutely perfectly, removing almost all the horizontal white dropouts. However, my source was a good deal cleaner than yours, and I am quite certain that you will not get results that are as good as what I got. The reason is that you have too many frames where the "dropout" persists for more than one frame. That makes removal quite difficult.
Here's my function. As you can see, it was written for interlaced material, but if your source is progressive (I don't have time to download and test it), this should still work just fine. It is motion compensated, just like RemoveSpotsMC, and might even contain some of the same code (I wrote it so long ago that I no longer remember from who I stole pieces of code.
Code:function Remove_Tears(clip source) { #Create mask ml = 100 # mask scale scene_change = 400 # scene change super = MSuper(source,pel=2, sharp=1) vf = MAnalyse(super,isb=false) # forward vectors vb = MAnalyse(super,isb=true) # backward vectors cf = MFlow(source,super,vf,thSCD1=scene_change) # previous compensated forward cb = MFlow(source,super,vb,thSCD1=scene_change) # next compensated backward sadf = MMask(super,vf, ml=100,kind=1,gamma=1, thSCD1 = scene_change) msadf= sadf.Binarize() # binary inverted forward SAD mask sadb = MMask(super,vb, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask msadb= sadb.Binarize() # binary inverted backward SAD mask msad = Logic(msadf,msadb,"OR") # combined inverted SAD mask msad = msad.Expand() # expanded inverted SAD mask msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask Interleave(cf,source,cb) # interleave forward compensated, source, and backward compensated #DeSpot(show=0,p1percent=10,dilate=1,maxpts=400,p2=12,mthres=18,p1=24,pwidth=40,pheight=12,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=1,ranked=true,extmask=msadi) DeSpot(show=0,p1percent=3,dilate=3,maxpts=400,p2=6,mthres=9,p1=12,pwidth=140,pheight=4,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=-1,ranked=true) SelectEvery(3,1) }
+ Reply to Thread
Results 31 to 60 of 84
-
-
The grotesque anomaly video is one of the worst I've ever seen. It's worth a download just to see how bad it is.
I tried your remove_tears() function and it didn't much to his video (or another much cleaner video I tried). But I had to replace binarize(), logic(), etc. with the mt_ equivalents. And I don't know if the despot() I was using is the same as yours. -
Thank you! I do not have the source, I would never try to capture something like that, and if I did try it the best way possible, then anything, any improvement is welcome on this aberration
Good thing that you returned to be in a good mood,I did not throw it away because this is a rare video of this segment of sports, some improvement would be welcome, if you are terrified, imagine me looking at this tangle of drizzles, I do not have the least idea where to start.
The sample are not good,I think the freezes no have on source, I will load a new segment,
If you like challenges this is your.Last edited by Caiosouza; 21st Nov 2016 at 13:03.
-
I should have looked more closely at the "Remove_Tears" function I posted. It is actually designed for progressive footage. This is really important for your sad clip because if you separate that clip into fields, you will find that while there is no motion between fields, the noise bars are quite different between the even and odd fields. Therefore the fields must be cleaned separately from each other and then reassembled.
Here is a crudely-constructed interlaced version of the function. I also found that because there is so much noise and artifacts from the extremely low bitrate encoding used somewhere along the line, that you have to run a general denoiser first. I've also attached two photos showing before and after on one frame. The user needs to play around with the Despot settings to get the rest of the spots. I think that with the proper tuning that it should be able to get almost all of them.
P.S. Please note that in this badly-constructed code, Despot appears in two places, and if you change the settings on one, you have to make the other match exactly. This is easy to do with a copy/paste operation, but you have to remember to do it. Sorry for the bad coding, but I don't have time to do it right.
Code:function Remove_TearsI(clip source) { #Create mask ml = 100 # mask scale scene_change = 900 # scene change fields=source.SeparateFields() even_fields=selecteven(fields) odd_fields =selectodd(fields) super_even = MSuper(even_fields,pel=2, sharp=1) vfe = MAnalyse(super_even,isb=false) # forward vectors vbe = MAnalyse(super_even,isb=true) # backward vectors cfe = MFlow(even_fields,super_even,vfe,thSCD1=scene_change) # previous compensated forward cbe = MFlow(even_fields,super_even,vbe,thSCD1=scene_change) # next compensated backward sadfe = MMask(super_even,vfe, ml=100,kind=1,gamma=1, thSCD1 = scene_change) msadfe= sadfe.Binarize() # binary inverted forward SAD mask sadbe = MMask(super_even,vbe, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask msadbe= sadbe.Binarize() # binary inverted backward SAD mask msade = Logic(msadfe,msadbe,"OR") # combined inverted SAD mask msade = msade.Expand() # expanded inverted SAD mask msadie = Interleave(msade, msade, msade) # interleaved 3-frame inverted SAD mask Interleave(cfe,even_fields,cbe) # interleave forward compensated, source, and backward compensated even_result_fields=DeSpot(show=0,mscene=99,p1percent=3,dilate=3,maxpts=1000,p2=6,mthres=9,p1=12,pwidth=840,pheight=12,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=0,ranked=true).SelectEvery(3,1) super_odd = MSuper(odd_fields,pel=2, sharp=1) vfo = MAnalyse(super_odd,isb=false) # forward vectors vbo = MAnalyse(super_odd,isb=true) # backward vectors cfo = MFlow(odd_fields,super_odd,vfo,thSCD1=scene_change) # previous compensated forward cbo = MFlow(odd_fields,super_odd,vbo,thSCD1=scene_change) # next compensated backward sadfo = MMask(super_odd,vfo, ml=100,kind=1,gamma=1, thSCD1 = scene_change) msadfo= sadfo.Binarize() # binary inverted forward SAD mask sadbo = MMask(super_odd,vbo, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask msadbo= sadbo.Binarize() # binary inverted backward SAD mask msado = Logic(msadfo,msadbo,"OR") # combined inverted SAD mask msado = msado.Expand() # expanded inverted SAD mask msadio = Interleave(msado, msado, msado) # interleaved 3-frame inverted SAD mask Interleave(cfo,odd_fields,cbo) # interleave forward compensated, source, and backward compensated odd_result_fields=DeSpot(show=0,mscene=99,p1percent=3,dilate=3,maxpts=1000,p2=6,mthres=9,p1=12,pwidth=840,pheight=12,mwidth=7,mheight=5,merode=33,interlaced=false,seg=1,sign=0,ranked=true).SelectEvery(3,1) interleave(even_result_fields,odd_result_fields) weave() }
Last edited by johnmeyer; 21st Nov 2016 at 15:08. Reason: Modified AVISynth function parameters
-
Last edited by Caiosouza; 21st Nov 2016 at 17:59.
-
I don't know what VideoRedo has to do with anything. I also do not understand what you are trying to say.
FWIW, I just tried, and was able to open, in VideoRedo, both your earlier "1996 MX 125.mkv" file as well as the MPEG-2 version, "Grotesque Anomaly 1996 125 MX.mpg." Also, you rendered the MPEG-2 version using the widescreen format, which makes no sense and is the wrong thing to do. -
Last edited by Caiosouza; 21st Nov 2016 at 19:30.
-
I think your MKV file has some significant problems. I know this because, since I cannot import MKV directly into my NLE, I first used ffmpeg to convert your MKV video to an HuffYUV AVI video file. However, about 2/3 of the way through the conversion ffmpeg threw an error. I then used the portion of the video that had converted into HuffYUV AVI, and used that. However, even on that truncated video, some of the frames at the beginning and end of the clip were frozen.
So, it is very possible that your MKV file is non-conforming. What this means is that it may have been created with bad software that didn't create an MKV video that follows the proper specifications.
Someone else will need to answer your aspect ratio question. However, when faced with things like this, I just encode to whatever resolution is standard and accept a slight change in aspect ratio. The difference between the two numbers you quoted will be almost impossible to discern, so my recommendation is to not worry about it.Last edited by johnmeyer; 22nd Nov 2016 at 09:24. Reason: minor typo
-
Didn't you see the scripts I and others posted with two samples earlier? First, you clean up the video (you can forget about cleaning up this disaster, it isn't worth the effort), then resize to 720x576, then encode for a 4:3 display aspect ratio. Is this the first time you've worked with video? Surely you learned something from the previous samples, all of which were the same goofy frame size. They've all been deinterlaced via field decimation, all are over saturated, all have illegal video levels, all are encoded at stingy bitrates, and seem to have come from the same visually disturbed dude.
Last edited by LMotlow; 21st Nov 2016 at 21:26.
- My sister Ann's brother -
Not possible, but definitely non-conforming. Nothing in Avisynth or VirtualDub would open it properly, show all frames, or not freeze at some point. I finally got a fully working Lagarith AVI out of TMPGEnc Mastering Works, of all things. Thanks for the revised script.
- My sister Ann's brother -
FINAL CASE
WellI left the latter for being the most important, I have here a video that was the hardest to get such a rarity, it's not so a bad whole than Grotesque Anomaly , but I need to improve this to put on DVD, the colors seem cold, the brightness ..., levels... maybe, Field lines in a progressive video
I need to make it beautiful, I need to do a miracle here
What filters do you recommend for:
-Improve image quality
-Adjust the colors
-Solve the dirt of field lines
-Maybe a SharpLast edited by Caiosouza; 23rd Nov 2016 at 13:22.
-
I tried one thing that helped with the high motion shots but looked terrible on the still shots. Basically, it just blurring away a lot of the noise and a giant MCTD so you lose fine detail.
Code:LWLibavVideoSource("1996 MX 125.h264") BilinearResize(352,288) RemoveDirtMC(120) McTemporalDenoise(settings="very high") aWarpSharp(depth=5) nnedi3_rpow2(4, cshift="Spline36Resize", fwidth=720, fheight=576) aWarpSharp(depth=5) Sharpen(0.3)
-
-
"RemoveDirtMC"
I get error, I dont have this, download at?
EDIT: Solved.
About colors, how do I solve this grayish aspect?Last edited by Caiosouza; 23rd Nov 2016 at 17:03.
-
Disguising the trash to not lose detail:
Code:DirectShowSource("C:\Users\User\Desktop\Sample 1996 250 World MX.mkv") ColorYUV(gain_y=-48) BilinearResize(352,288) aWarpSharp(depth=5) nnedi3_rpow2(4, cshift="Spline36Resize", fwidth=720, fheight=576) aWarpSharp(depth=5) Sharpen(0.9) SeparateFields() Interleave(SelectEven(), SelectOdd().ColorYUV(gain_y=-256)) Weave() Spline36Resize(width,432).Spline36Resize(width,height) ColorYUV(gain_y=256)
-
Grayish aspect? You mean the first few shots? Most of the video is already over saturated.
-
Last edited by Caiosouza; 23rd Nov 2016 at 18:24.
-
How do you solve what? You want the first few shots to have more saturation? Tweak(sat=x). You should know such obvious things by now.
-
The video for me looks strain, over saturated? It doesn't matter (It really matters but I do not know). But that's what I see.
I know you're trying to make me think, but I do not know what's wrong, I just know it's ugly, if I could identify exactly what's wrong, maybe I could think of something.
At the same time that some colors seem oversaturated, others look faded, such as the sand for example
Look the colors of Grotesque Anomaly sample These would very close be correct
How do I fix these color levels problems etc.
This whole crap you know.
Do the video colors look good to you? If yes why? If not, why?Last edited by Caiosouza; 23rd Nov 2016 at 19:05.
-
It seems more correct? but the red closely to pink...
Code:DirectShowSource("C:\Users\User\Desktop\Sample 1996 250 World MX.mkv") ColorYUV(cont_y=-35) Tweak(sat=0.80,StartHue=80, EndHue=115,coring=false) Tweak(hue=20,coring=false) Levels(12,1.0,255,16,245,dither=true,coring=false) ChromaShift(L=-2,C=2) BilinearResize(352,288) aWarpSharp(depth=5) nnedi3_rpow2(4, cshift="Spline36Resize", fwidth=720, fheight=576) aWarpSharp(depth=5) Sharpen(0.9) SeparateFields() Interleave(SelectEven(), SelectOdd().ColorYUV(gain_y=-256)) Weave() Spline36Resize(width,432).Spline36Resize(width,height) ColorYUV(gain_y=256)
-
The colors are horrible. Do you know the difference between green and red? What color should the dirt be? Wouldn't you say that the pics are overly bright, that highlights are badly clipped, and the colors look washed out?
Gamma is far too high, brights extend beyond RGB 255. Partially fixed with Levels() function.
Gain is still too high (brights clipped) and blue contrast too low. Fixed with ColorYUV().
Video has a strong green color cast, some chroma saturation "glow". Fixed with Tweak().
Too much bleeding from over saturation. Partially fixed with FixChromaBleeding() plugin.
Levels analyzed with Avisynth Histogram("Levels"), saturation analyzed with Histogram("Color2").
Original frames on the left, correction on the right:
Change values to suit your personal preference:
Code:AddBorders(0,2,0,2) Levels(16, 0.75, 255, 16, 235, dither=true, coring=false) ColorYUV(gain_y=-5, cont_u=100) Tweak(hue=12, sat=0.95, dither=true, coring=false) FixChromaBleeding() ## Histogram("Levels") ## Histogram("Color2")
http://avisynth.nl/index.php/ColorYUV
http://avisynth.nl/index.php/Tweak
http://avisynth.nl/index.php/FixChromaBleeding
http://avisynth.nl/index.php/Histogram
More difficult question: What the hell do the makers of these videos think they're looking at? Or they've found ingenious new ways to screw up YUV color. Maybe it's a new fad.Last edited by LMotlow; 24th Nov 2016 at 05:46.
- My sister Ann's brother -
Wow, this was really effective!
You seem to feel very comfortable working with colors, and it works beautifully, just like jagabo works the image, you two should work together!
The only one however was due to the tonality of red that could be closer to the original frame.
Originally not so to bad I believe, but was spoiled by a number of wrong procedures of capture conversion and copying...Last edited by Caiosouza; 24th Nov 2016 at 06:12.
-
Tweak(sat=0.50, StartHue=80, EndHue=115,coring=false)
Be careful when using Tweak like that. It creates discontinuities when there are smooth gradients. Before and after:
[Attachment 39667 - Click to enlarge] -
-
-
Not so. The line "Tweak(hue=12, sat=0.95, dither=true, coring=false)" increases red and reduces green. Positive values for Tweak() move the colors toward red. Read up on the link to the Tweak() function and see for yourself.
You'll never correct all of the color in that video. YUV channels were corrupted a long time ago. They'll never be the same again. Perhaps you could try some color blend modes and adjustment layers in AfterEffects or Premiere Pro to experiment with possibilities. Color in that video is ruined, along with a lot of elements. Probably better to let it stay as-is.Last edited by LMotlow; 24th Nov 2016 at 20:48.
- My sister Ann's brother
Similar Threads
-
MkvToolnix with MkClean :: Sense or Nonsense
By leghorn in forum Video ConversionReplies: 3Last Post: 23rd Oct 2012, 18:45 -
New "Simple Tricks and Nonsense" After Effects tips and tutorials webseries
By dastolidigital in forum EditingReplies: 1Last Post: 30th Jan 2012, 22:06 -
Nonsense description for Lagarith (tools section)
By lordsmurf in forum FeedbackReplies: 4Last Post: 30th Dec 2011, 12:28