VideoHelp Forum
+ Reply to Thread
Results 1 to 27 of 27
Thread
  1. I'm using McTemporaldenoise for some restoration, and have been fiddling with both, it's add grain features and it's gradfun features (both are for dithering). I don't see a major difference between the two, except that if I increase the gradfun significantly, there's a bluish hue on some parts of the picture. So otherwise, what's the difference? I know what adding grain is, but is that significantly more different than using gradfun? What works better for animation?
    Quote Quote  
  2. I use this filter a lot and love it. I have played with this filter, and it's settings so much.

    Using the dithering feature of mctemporaldenoise or dithering in general will harm some details, especially in darker areas of your video. It can, and usually will smudge some of it away or cover it up. If you are not trying to remove banding in your video, I would turn it off all together for best results and better detail retention.

    The add grain actually helps keep some detail after the denoising is finished, or at least makes it appear to have more detail than if you did not use this at all. I recommend keeping that at 0.5 - 0.6. This is used whether or not you have dithering turned on or off.


    (Dithering turned off)
    mctemporaldenoise(sigma=1, sharp=false, radius=1, ecrad=1, AGstr=0.6, GFthr=1.00)

    (Dithering turned on with least amount of detail destruction)
    mctemporaldenoise(sigma=1, sharp=false, radius=1, ecrad=1, AGstr=0.6, GFthr=1.01)
    # This is for when you are trying to remove banding


    Increase the sigma strength for stronger denoising. I would try to stay under a sigma of 3 if you want to keep maximum detail left in tact. 1-2 should be plenty usually, and anything higher gets pretty destructive to detail. But you can use whatever you want since this is yours afterall.

    The suggestions are quality based. If you don't care about the detail in your animation, then feel free to use more damaging settings and raise the sigma number to get a cleaner picture.
    Last edited by killerteengohan; 20th May 2020 at 11:09.
    Quote Quote  
  3. Thanks for that. I'm working with animation, but I'm using a mask to protect dark areas and thin lines. I mention this now since I actually got a response here on this topic.

    What I mean specifically is that when I use McTemporalDenoise to denoise, I'm only using it in light pixels (white, peach, red, yellow, light blue, etc.) while dark pixels and lines are masked off. I'm currently running it at a "high" setting, and, after some testing with AGstr=5.0 (no, that's not a typo, you read correctly, FIVE POINT ZERO- 5.0), I see a nice, subtle grain texture which helps alot with banding and covering up other subtle leftover smudges that McTemp overlooked.

    But then I experimented with Gradfun at the same settings (with AG off, of course) and saw similar results.

    Which leads to my original question - is there a difference between addgrain and gradfun that I'm not seeing with the naked eye? Is there some kind of advantage when working with animated content?

    Is it that Gradfun dithers by producing more pixels which match the color gradients of the surface that it's dithering, while AddGrain just adds a random amount of salt-pepper colored grain?
    Quote Quote  
  4. All Addgrain does is add some artificial grain back into the image after denoising. It does not add a ton of grain unless set overkill like you did at 5.0 and is not meant for debanding.
    (( You will have to save screenshots and zoom in like 400% or higher to even really notice the grain its adding at the 0.5-0.6 setting, unless the source was already super spotless/clean. It's mostly to help recover, or make it look like theres more detail after the denoise process is finished ))
    It has nothing to do with the dithering setting, and is not really for debanding. Its not adding a pattern grain like dithering, its all random. Leave it at 0.5 - 0.8 is recommended.

    If you want the debanding to be stronger, raise the GFthr parameter. GFthr setting of 1.1 - 1.8 should be more than enough and probably overkill at 1.8. The GFthr for high setting you are using is 1.6. I just use the minimal 1.01 because it works fine for me, and is the least harmful to animation detail.

    If you care about the quality and detail of your animation after using mctemporaldenoise, I would change your "high" setting to the default of "low". The default is low, so you can either change high into low or not even specify high or low and it will default to low.
    Using "low" setting, and then raising the GFthr to a higher number should give better quality results than "high" setting when done, and it will be much less destructive to your animation detail in the end.
    Using the high setting is raising the settings for a lot of the other involved filters being used in mctemporaldenoise, which will be more destructive overall because its also using more powerful denoise filter settings. Some of which can possibly add ghosting like artifacts when set too high. Using low will do much less damage. It's up to you.


    It sounds like what you are looking for is somewhere along the lines of this.

    Code:
    mctemporaldenoise(sigma=1, sharp=false, radius=1, ecrad=1, AGstr=0.8, GFthr=1.4)
    
    # Raise sigma for stronger cleaning/denoise. Try to keep under 3, unless detail doesn't matter.
    # Raise or lower GFthr to increase or decrease the dithering strength.
    # Raising AGstr to overkill is on you, and your call. I would leave it alone though. 
    Even the highest default setting for MCTemp does not exceed AGstr 2.4
    Last edited by killerteengohan; 21st May 2020 at 02:53.
    Quote Quote  
  5. Thanks for explaining the differences. Based on my experiments and your clarification on this, I'm going with Gradfun instead of Addgrain. Now, in terms of your concerns about wiping away details on animation, it's a valid one for us cartoon lovers (particularly with older cartoons). Let's face it, some DVD transfers are not that great, but not so bad that they can't be improved upon. For this reason, I created a binary mask combined with line protection (protecting even the most faint line to the best that my eye can see) to give myself more flexibility with the strength levels. So while using MCTemporaldenoise at a high setting is a total detail destroyer, it works wonderfully on non-detailed "flat" surfaces, particularly when the source contains multiple problems with junk (random vertical lines, black smudge, blocking, ringing, etc).

    So on a very grainy/junk-filled source, I run it once through SmDegrain() to target dark areas, which gives me nice results. Then for my second pass, I use this mask to run it through McTemporalDenoise and Temporaldegrain().

    Take a look at my sample masks (white is where the filters would target, while the dark lines are not touched).

    Image
    [Attachment 53485 - Click to enlarge]


    Image
    [Attachment 53486 - Click to enlarge]


    Image
    [Attachment 53487 - Click to enlarge]
    Quote Quote  
  6. Geez, gohan, it wouldn't have dried out your turkey burger if you had given me two words in response to this. I was polite enough to respond to your comments, respond to my B.S. too, ya know?
    Quote Quote  
  7. Originally Posted by Betelman View Post
    Geez, gohan, it wouldn't have dried out your turkey burger if you had given me two words in response to this. I was polite enough to respond to your comments, respond to my B.S. too, ya know?
    Well I would have gladly replied to any questions, had I even logged into my account the past week and seen this. I have not even been on this site for many days now, and never seen anything new posted. The last day I was here was on the 23rd. A little patience, or checking my profile to see when I last logged in would have went a long way. If my profile said I was on, but I have not said a word in the restoration section anywhere, then it probably just auto logged me in because I keep 80+ tabs open in my browser even if I don't use them all at once.
    I do not live on this site, and check it daily. I am also less likely to reply when coming back to statements like this, so please show some patience, or maturity in the future.

    The mask is impressive if you want to leave black lines alone that's for sure.
    If white is where the filter is targeting, your gonna destroy detail for sure.
    If you only care about cleaning those few spaces you mentioned, and you do not mind a detail destroyer that will clean things really well, try this instead of using MCTemporalDenoise and see if you like it more or not.
    Deen("c3d",0,3,2)

    You can also use this good one, but its slow as hell because its a high quality cleaner when used right. It might be much faster on SD. I have only used it on 1080p HD.
    TNLMeans(ax=2, ay=2, az=1, sx=3, sy=3, h=1.1)

    __________________________________________________ __________________________________________________

    Do you have a screenshot of those random vertical lines you were referring to? If they are what I think they are, I know a great way of cleaning them without hurting your detail barely at all, if at all.


    The ringing you don't need mctemporaldenoise to clean it. This will clean it nicely most of the time.
    dehalo_alpha(rx=1.1, ry=1.1, darkstr=0, lowsens=0, highsens=100, ss=1.0) # Great for cleaning white ringing/halo's directly against lines

    or
    hqdering(smoother=deen("c3d",0,5,9,2) # Great for cleaning some light halo's, and cleans darker secondary halo artifacts around light ones. Will also give a slight denoise cleaning as well.

    or combine the two together for really bad ringing.
    dehalo_alpha(rx=1.1, ry=1.1, darkstr=0, lowsens=0, highsens=100, ss=1.0)
    hqdering(smoother=deen("c3d",0,5,9,2)


    Note: Use the dehalo filters right after you resize, and before you denoise for best results. Unless you do all of your filtering before you resize, then just make sure to do before denoising.
    Last edited by killerteengohan; 30th May 2020 at 17:24.
    Quote Quote  
  8. I am also less likely to reply when coming back to statements like this, so please show some patience, or maturity in the future.
    I'm sorry, you're right. I thought you just dismissed the topic altogether. I should have checked your profile.

    If white is where the filter is targeting, your gonna destroy detail for sure.
    How? Yes, white is where my filter is targeting but there's no detail--just flat color. The detail is in the lines, and the lines is what I'm masking. How on earth am I destroying detail on a flat, DETAIL-LESS surface?

    Take a look at the hallway screenshot---even the slightest wood grain on the floor (which is detail) is being masked and thus, protected from the filter. How am I destroying detail with a mask that is covering details?
    Quote Quote  
  9. I would need the original untouched footage to show you that or answer that accurately. If you gave me a screenshot of before you filter and after you filter, I would show the detail loss if I can. Trust me, you cannot protect every single fine detail from DNR, you can only lessen how much it affects it. It would have to be a single color space with no other detail at all to lose in order to not reduce detail levels. You can find that on cheap newer kids shows, but older animation like ghostbusters should have quite a bit of detail in it I would think.

    Take those 3 same screenshots. Make them with no filters at all, then filter them and send both versions of the screenshots for those 3. I will circle and try to show you where the detail is getting lost with an explanation of what to look for. I don't mean show the mask in black and white, I mean show the actual before and after screenshots of the full colored video as it is.

    If there is no detail loss, I will commend you, but I am very certain there will be some, unless the animation for some reason never had any to lose.
    Last edited by killerteengohan; 4th Jun 2020 at 20:56.
    Quote Quote  
  10. You're on!

    I bet you my mask is so good, that you will not find any detail loss at all. From one cartoon fan to another. I'll gather my materials and post them for you over the weekend.

    Oh this is a delight!

    You just made my morning!!!
    Quote Quote  
  11. And by the way, this IS quite the challenge, considering those particular scenes that you see there are, as you can see, full of very fine detail (especially the bridge scene with all the buildings in the background).
    Quote Quote  
  12. Here we are. The before and after for each clip.
    Image Attached Files
    Quote Quote  
  13. Forget it. Don't bother making the comparisons. I already did and lost the bet hands down. Take a look at the before and after in the fine details on the buildings (circled).

    Sigh* It's back to the drawing board for me. And here I thought I had the perfect fine detail mask, and that you were just trying to break my balls.

    The thing is, this video NEEDS this type of filtering. It's junky as all hell!
    Image Attached Thumbnails Click image for larger version

Name:	prefiltered buildings.jpg
Views:	55
Size:	114.4 KB
ID:	53713  

    Click image for larger version

Name:	postfiltered buildings.jpg
Views:	121
Size:	114.8 KB
ID:	53714  

    Quote Quote  
  14. BTW, I added TNLMEANS() to my script and it's very good at removing leftover smudgy junk from the temporal filtration.
    Quote Quote  
  15. Yeah that is seriously obliterated, and that smeared watercolor look is awful lol. It's lost its nice colors, and looks unnatural without any texture detail left. I would certainly pass on the results.

    I tried to tell ya. 14 years experience of working with animation, I know what I am talking about most of the time. You cannot use DNR and not destroy detail on that kind of animation. Its older high detail animation made on film with lots of natural grain and shading on it. You can protect lines all you want, but the texture details are going to take a hit from using any DNR on them in that kind of animation. It's not made like today's cheap kids animation that look completely flat and usually only a single color in most areas that do not blend together.

    It doesnt NEED that type of filtering, that's just what you want for it, is a super clean look. It was not meant to be that way from that particular era in time. Even a nice HD remaster is going to have natural artifacts and grain in it because of the era that animation is from and how they were made.

    If you give an unaltered sample video clip, I could suggest a script I would use if it were for me. But again, there will have to be some detail loss from the cleaning. It wont be nearly as bad as TNLMeans destroying it, but it will lose minimal detail. TNLMeans is for heavy duty artifacts or HD cleaning usually. TNLMeans default settings will destroy lots of animation detail. I honestly have only allowed myself to use it on one thing so far because of the detail destruction it's capable of and how slow it is on HD stuff.

    I'm pretty sure most people would prefer the results of the script I will suggest, more than what I just seen. Just send me a sample video. Use a program called DGIndex, load the vob file into it. Then select a start frame and end frame with the 4 buttons at the bottom right of the program window. (Try to get about 60 seconds worth) Then choose FILE - Save Project and Demux Video. Then just send or attach the .m2v sample video file it generated. (I assume you already know how to do this part because of last attachments, but I was telling how just in case)
    Last edited by killerteengohan; 8th Jun 2020 at 20:52.
    Quote Quote  
  16. Here you go, tough guy. Knock yourself out.
    Image Attached Files
    Quote Quote  
  17. I asked for you to try to get about 60 seconds worth. That's only a measly 11 seconds. More is required for an accurate deinterlace/combing suggestion, especially if there's interlacing in the video. I will make a suggestion for this clip, but I do not promise proper interlacing/combing handling without a longer sample if there is any interlacing/combing in the video.
    Last edited by killerteengohan; 10th Jun 2020 at 21:58.
    Quote Quote  
  18. Are these the random lines you were referring to? Those are usually pretty easy to get rid of.

    Image
    [Attachment 53756 - Click to enlarge]
    Last edited by killerteengohan; 10th Jun 2020 at 21:56.
    Quote Quote  
  19. This is not as clean as you seem to want, but purists and people who appreciate older animation like this will pick this script over what you showed earlier any day. It's not obliterated from overkill DNR, has most of its detail still, and still has some of its natural grain. The compression artifacts you cant do much about without over destructive DNR to try and hide some of it.

    Code:
    DGDecode_mpeg2source("C:\Users\???\Desktop\sample1.demuxed.d2v", info=3)
    checkmate(thr=9, max=9, tthr2=0) # Reduces dot crawl
    ColorMatrix(hints=true, interlaced=true, threads=0)
    tfm(order=1).tdecimate(mode=1,hybrid=0)
    santiag(strv=0, nns=4, nsize=5) # Fixes those horizonal lines/artifacts in the video
    crop( 10, 0, -6, 0)
    LanczosResize(640,480) # Lanczos (Sharp)
    dehalo_alpha(rx=1.1, ry=1.1, darkstr=0, lowsens=0, highsens=100, ss=1.0) # Reduces halo's and white artifacts
    hqdering(smoother=deen("c3d",1,5,9,2)) # Reduces halo's and give a slight cleaning with low amount of detail loss
    mctemporaldenoise(sigma=1, sharp=false, radius=1, ecrad=1, AGstr=0.5, GFthr=1.00) # Denoises the video with minimal detail loss
    mergechroma(awarpsharp2(depth=4, blur=1, type=1)) # Sharpens the chroma and reduced color bleed
    LimitedSharpenFaster(ss_x=1.00, ss_y=1.00, strength=6, overshoot=0, undershoot=0, soft=0, edgemode=0) # sharpens the image
    smoothtweak(saturation=0.92, brightness=0, contrast=1.00, dither=-1, interp=0, limiter=false) # Lowers oversaturation a bit
    Here is a before and after screenshot comparison (Use keyboard arrows or mouse to flip through them)
    https://slow.pics/c/bVAqmCmb


    If you want cleaner video, yet more detail than what you showed earlier with TNLMeans, there is this. I wouldn't want it, but it is cleaner than the previous suggestion, and has much more detail than your earlier sample with TNLMeans obliterating it. It's still quite a bit of detail loss to get it cleaner though.

    Code:
    DGDecode_mpeg2source("C:\Users\???\Desktop\sample1.demuxed.d2v", info=3)
    checkmate(thr=9, max=9, tthr2=0) # Reduces dot crawl
    ColorMatrix(hints=true, interlaced=true, threads=0)
    tfm(order=1).tdecimate(mode=1,hybrid=0)
    santiag(strv=0, nns=4, nsize=5) # Fixes those horizonal lines/artifacts in the video
    crop( 10, 0, -6, 0)
    LanczosResize(640,480) # Lanczos (Sharp)
    dehalo_alpha(rx=1.1, ry=1.1, darkstr=0, lowsens=0, highsens=100, ss=1.0) # Reduces halo's and white artifacts
    hqdering(smoother=deen("c3d",1,7,9,2)) # Reduces halo's and give a slight cleaning with low amount of detail loss
    deen("c3d",0,3,2) # cleans video artifacts
    mergechroma(awarpsharp2(depth=4, blur=1, type=1)) # Sharpens the chroma and reduced color bleed
    LimitedSharpenFaster(ss_x=1.00, ss_y=1.00, strength=6, overshoot=0, undershoot=0, soft=0, edgemode=0)
    smoothtweak(saturation=0.92, brightness=0, contrast=1.00, dither=-1, interp=0, limiter=false) # Lowers oversaturation a bit
    Here is a before and after screenshot comparison (Use keyboard arrows or mouse to flip through them)
    https://slow.pics/c/81vxuQtv


    It sounds like suggestion #2 is what you might prefer out of the 2 suggestions.

    Here is a comparison of both suggestions final results (Use keyboard arrows or mouse to flip through them)
    https://slow.pics/c/nREzxto3

    I know you want it spot free from the sounds of it, but you're never going to get a perfect scrubbed clean version of this kind of animation without the detail destruction you had in your example earlier. I doubt even a released Blu-Ray remaster would DNR it to hell that much.

    Also, this source is not that great to begin with, so there isnt going to be a magical miracle making it today's standard of HD worthy without a remaster or rescan from the source materials that the animators have.
    Last edited by killerteengohan; 10th Jun 2020 at 22:49.
    Quote Quote  
  20. More is required for an accurate deinterlace/combing suggestion, especially if there's interlacing in the video.
    Don't worry about it. It's your typical NTSC retail DVD. I already did the IVTC in my initial script (it's the same as what you did here).

    Are these the random lines you were referring to? Those are usually pretty easy to get rid of.

    Those lines are not what I was referring to. The lines I'm referring to are brief vertical lines that result from bad transfers; but there's a script called "destripe" that takes care of that. However, it needs to only be applied to that part of the video and then cut off. Otherwise, the entire video looks blurred.

    The lines you're referring to here, my friend, you introduced on your very own by adding colormatrix before IVTC. Take a look for yourself (zoom the pic when you open it):
    Image Attached Thumbnails Click image for larger version

Name:	with colormatrix before IVTC.jpg
Views:	58
Size:	733.9 KB
ID:	53759  

    Click image for larger version

Name:	wiht NO colormatrix before IVTC.jpg
Views:	55
Size:	781.0 KB
ID:	53760  

    Last edited by Betelman; 10th Jun 2020 at 22:54.
    Quote Quote  
  21. I don't have any of those lines in my results. Perhaps you have a specific filter or plugin that's need an update or previous unbroken version. Mine is perfectly free of them. I dont have any of those, anywhere at all in the finished scripted video.
    Quote Quote  
  22. I just noticed parts of the script you were using in those examples you showed. It's not because I introduced them with colormatrix. The reason that you are getting them is because you are trying to convert from rec.601 into rec.709 and you took out the interlaced=true parameter which doesn't help. Do not do that with DVD's SD video. DVD, and SD video are not rec.709 colors. Thats for HD. It's not bad transfers causing them, its bad script writing and not knowing what you are doing thats causing them. Take that rec conversion out of colormatrix, and use Colormatrix EXACTLY as I did and they will go away. Or put the interlaced=true back into it. You also don't need the assumetff either. Thats what order in tfm is for.

    You didn't use my script at all. You took pieces from it, then did what you wanted, and then want to complain when its not working right for you.
    Last edited by killerteengohan; 11th Jun 2020 at 05:45.
    Quote Quote  
  23. I don't know why your trying to make your video rec.709, but putting the interlaced=true back in to colormatrix like it should be, will get rid of those when converting. You would only take that out, or change to false if your source was either progressive, or you used it after TFM, which I would not do.
    They are appearing due to your script writing, not the transfer quality. Unless you are going to be scaling this to 720p+ and using flags in the codec settings to tell it to use rec.709, there is no reason to convert to rec.709. All of the colors will be displayed incorrectly on playback if you do this to a 480p video.

    Use it like this if you insist on making rec.709, and those lines will not be an issue for you.
    Code:
    Colormatrix(hints=true, mode="rec.601->rec.709", interlaced=true, clamp=0, threads=0)
    Last edited by killerteengohan; 11th Jun 2020 at 03:28.
    Quote Quote  
  24. Yeah we're done here, thanks.
    Quote Quote  
  25. I cant tell if that's a you've been butthurt by my last reply goodbye, or you got what you wanted out of this and do not need anything more lol.

    Either way, learn from that about colormatrix and you will not have to blur or make any of your frames look worse with that destripe filter. If the source is not progressive, and you are using it before deinterlacing/decombing keep the interlaced=true in it so you do not get those line artifacts you were getting in this thread.

    Your welcome and good luck with the rest, bud.
    Quote Quote  
  26. Don’t mean to interject

    Killerteengohan, i am very new to this i use to use handbrake and realized what a piece of crap it was. I use a mac, so i only have access to vapoursynth. Do you think your first script could be adapted for vapoursynth?
    Quote Quote  
  27. Excuse me Adam but, I have 2 questions for you

    1. What does handbrake have anything to do with any of this (including your question)?

    2. What exactly is it that makes Handbrake a "piece of crap"? I use it all the time and the encodes are gorgeous. Can you elaborate on that?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!