VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. I was using the following script for TTempSmooth:

    Code:
    ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    The only reason I'm using it is to remove flicker although obviously it denoises as well. It takes an hour longer than I want so I was looking at using TTempSmoothF which is supposed to be faster.

    I was wondering if someone could please tell me in English what the differences are between the 2. I looked at the documentation but it wasn't much help.

    Apparently TTempSmoothF doens't need the strength setting so how does it know what strength to use?
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    The only difference is that TTempSmoothF doesn't have the lmdiff/cmdiff parameters (it is equivalent to TTempSmooth with lmdiff/cmdiff set equal to or greater than lthresh-1/cthresh-1). So it does have the 'strength' parameter (unless you're using an old version - latest is 0.9.4).

    I would try just calling TTempSmoothF with the same parameters you used for TTempSmooth.
    Quote Quote  
  3. Originally Posted by Gavino View Post
    The only difference is that TTempSmoothF doesn't have the lmdiff/cmdiff parameters (it is equivalent to TTempSmooth with lmdiff/cmdiff set equal to or greater than lthresh-1/cthresh-1). So it does have the 'strength' parameter (unless you're using an old version - latest is 0.9.4).

    I would try just calling TTempSmoothF with the same parameters you used for TTempSmooth.
    I'm using 0.9.4. I don't understand from what you said where the strength parameter comes from?

    I looked at the documentation and it doens't mention the strength parameter. This is what I used for TTempSmooth:

    Code:
    ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    Should I just remove the strength parameter when using TTempSmoothF?
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    What I said about the parameters was almost a direct quote from the 0.9.4 help file.
    Here is what it gives as the parameters for TTempSmoothF:
    Code:
    TTempSmoothF(int maxr, int lthresh, int cthresh, int strength, float scthresh, bool fp,
                 int vis_blur, bool debug, bool interlaced, PClip pfclip)
    Quote Quote  
  5. OK thanks. It's weird how it doesn't mention that on the website! You said this:

    The only difference is that TTempSmoothF doesn't have the lmdiff/cmdiff parameters (it is equivalent to TTempSmooth with lmdiff/cmdiff set equal to or greater than lthresh-1/cthresh-1)
    No disrespect but what does that mean in English? I'm just trying to figure out what the difference is between TTempSmooth and TTempSmoothF.
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Basically, it means that when merging corresponding pixels from surrounding frames, they will all be given equal weight in TTempSmoothF.
    In TTempSmooth, pixels with differences between mdiff and thresh get progressively smaller weights as the difference increases.

    This will give somewhat stronger smoothing in TTempSmoothF, but I'm not sure how much difference this makes in practice.
    Quote Quote  
  7. A temporal smoother won't be able to remove flicker without badly damaging the picture otherwise.
    Quote Quote  
  8. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Does this flashing exist on normal playback without the capture setup? That doesn't look like flicker, it's too localized inside the frame. I had a very similar problem when copying a video to an external drive. Turned out to be drive write errors. I got rid of the bad external enclosure, replaced it with a different maker -- no more problems. Had the same problem when capturing to that external enclosure, not just copying.

    Just a suggestion. But it looks like i/o errors.
    Last edited by sanlyn; 21st Mar 2014 at 06:00.
    Quote Quote  
  9. The video has two problems. It has noise (especially visible in the background, largely caused by quantization errors) and it has a flicker of the entire frame (I don't have it here anymore, but it's very obvious in a scope trace). I wasn't sure which holygamer was complaining about.

    I'm talking about the video in this post:
    https://forum.videohelp.com/threads/341188-Still-have-flicker-after-Denoising-with-AviS...=1#post2123866
    Last edited by jagabo; 4th Dec 2011 at 07:46.
    Quote Quote  
  10. Originally Posted by jagabo View Post
    A temporal smoother won't be able to remove flicker without badly damaging the picture otherwise.
    Well then do you know of a filter I could use to remove the flicker without causing artefacts? Or do you know of a good DeBlocking filter I could use to fix the artefacts caused by TTempSmooth?

    I've tried VirtualDub's Deflicker filter in AviSynth but it causes motion trails.

    I've tried TTempSmooth but it leaves blocking artefacts.
    I've tried DeGrainMedian but it just denoises - it doesn't remove the flicker:

    I could use DeBlock() after ttempsmooth but it doesn't get rid of the blocking artefacts caused by ttempsmooth. DeBlock is supposed to get rid of blocking using the deblocking filter of h264 yet it doesn't get rid of the minor blocking caused by TTempsmooth. DeBlock doesn't seem to be anything like the deblocking filter of H264 because I saved the video as M2TS H264 and it got rid of all the blocking.

    I use this to remove the blocking but it doesn't get rid of the blocking artefacts caused by ttempsmooth: Mpeg2Source("I:\New\file.d2v", CPU=6). I don't suppose there's anyway to run the CPU=6 command last is there?
    Quote Quote  
  11. The blocking is from mpeg2 encoding at low bitrates. Even if your script gets rid of it, when you use MPEG2 such low bitrates (I think the example of the export you uploaded was 2Mb/s), you're going to get blocking again

    I could use DeBlock() after ttempsmooth but it doesn't get rid of the blocking artefacts caused by ttempsmooth.
    TTempsmooth doesn't cause blocking artifacts. The artifacts it produces are ghosting trails and blurring of the background

    If you re-read the suggestions made, TTempsmooth was to be applied in addition to other denoisers, but you have to change the settings and strength of the other filters to accommodate, because TTempsmooth also denoises

    IMO, you're overdenoising and eroding the details away. It's a blurry mess. CPU=6 is way to strong for your source.

    Also, you never fixed the levels in your most recent export. All your videos have black level elevated (low contrast, looks washed out)

    And then you want all this in realtime. You're expectations are unrealistic. If you want good results, the high quality filters are SLOW.
    Quote Quote  
  12. At some point you're going to have to face the fact that you can't make DVD quality video out of 3rd generation VHS copies.

    Deblocking filters are designed to remove 8x8 blocks, aligned on mod8 boundaries.
    Last edited by jagabo; 4th Dec 2011 at 10:38.
    Quote Quote  
  13. Originally Posted by poisondeathray View Post

    If you re-read the suggestions made, TTempsmooth was to be applied in addition to other denoisers, but you have to change the settings and strength of the other filters to accommodate, because TTempsmooth also denoises
    Could you please remind me what those suggestions were.

    Jagabo, I know I can't get DVD quality, I just want to remove the flicker, that's all.
    Quote Quote  
  14. Originally Posted by holygamer View Post
    I just want to remove the flicker, that's all.
    What flicker are you talking about?
    Quote Quote  
  15. This test video for example.
    Quote Quote  
  16. I know you're talking about that video. The question is what flicker are you talking about? The whole frame flickers slightly. That can be fixed with DeFlicker as we discussed before. After noise reduction you get posterization artifacts and residual noise that flickers -- especially in the background at the left of the frame. Those will only be fixed with a huge temporal filter. But that will screw up the rest of the picture. For example:

    ttempsmooth(maxr=7, lthresh=50, cthresh=100, strength=8, interlaced=true)
    Last edited by jagabo; 4th Dec 2011 at 11:05.
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    TTempsmooth doesn't cause blocking artifacts. The artifacts it produces are ghosting trails and blurring of the background
    It does cause blocking artefacts! I see square blocks after using TTempSmooth. If I then run the video through CPU=6 again it removes those blocks.
    Quote Quote  
  18. Jagabo, if that doesn't work could I not just use the following which does work and doesn't screw up the picture and then use a deblocking filter that works?

    Code:
     ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    I can't seem to get the Deblock filter to work but if I were to run the file through CPU=6 again it removes the blocking caused by TTempSmooth. But I obviously don't want to process the file twice. So do you know of a deblocking filter that would work?
    Quote Quote  
  19. Originally Posted by holygamer View Post
    Originally Posted by poisondeathray View Post
    TTempsmooth doesn't cause blocking artifacts. The artifacts it produces are ghosting trails and blurring of the background
    It does cause blocking artefacts! I see square blocks after using TTempSmooth. If I then run the video through CPU=6 again it removes those blocks.

    No it doesn't cause blocking artifacts.

    The blocks are already in the source, so it propogates those blocking errors because it is essentially averaging out frames temporally

    If you prefilter the source, you will see it doesn't "cause" blocking artifacts

    AGAIN, you're supposed to use it in conjunction with other filters

    TTempSmooth isn't a deblocking filter. It's a temporal averager that works primarily on the background , not foreground
    Quote Quote  
  20. Originally Posted by holygamer View Post
    Jagabo, if that doesn't work could I not just use the following which does work and doesn't screw up the picture and then use a deblocking filter that works?

    Code:
     ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    I don't see any blocks after that.
    Quote Quote  
  21. Originally Posted by holygamer View Post
    Jagabo, if that doesn't work could I not just use the following which does work and doesn't screw up the picture and then use a deblocking filter that works?

    Code:
     ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    I don't see many blocks after that.

    Maybe you'd be happier with something like:

    Mpeg2Source("Original file Test.d2v", CPU=2)
    AssumeTFF()
    ColorYUV(gain_y=30, off_y=-36)
    Yadif(mode=1, order=1)
    ttempsmooth(maxr=5, lthresh=15, cthresh=40, strength=4)
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    Last edited by jagabo; 4th Dec 2011 at 12:06.
    Quote Quote  
  22. If you test the following script on this video you'll see blocking (or whatever you want to call it) when the guy throws the other guy from the turnbuckle (caused by TTempSmooth):

    Mpeg2Source("704 x 480 =June 30 1997 before avisynth.d2v", CPU=6)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    AddBorders(8, 0, 8, 0)

    This is the video after I use the above script on my original video.

    Just wondering, should cthresh always be double the value of ltthresh? It seems to be those 2 values that when increased, get rid of the blocking.
    Last edited by VideoFanatic; 4th Dec 2011 at 17:33.
    Quote Quote  
  23. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by holygamer View Post
    I just want to remove the flicker, that's all.
    What flicker are you talking about?
    I've been asking the same question. Maybe the OP refers to this sort of thing, which isn't flicker:

    frames 596 (left) and 598 (right): star pattern flare from flash at upper left. In frame 598 at the upper left border you see the guy holding the camera.

    Image
    [Attachment 9938 - Click to enlarge]


    frames 306 (left) and 307 (right): shape of the flash just beyond the wrestler's pink left knee. In frame 598, there's the guy holding the camera.

    Image
    [Attachment 9939 - Click to enlarge]


    frame 179: image brightened by broadcast camera lens flare from flash. Look at the lighting on the people in the audience: there's strong sidelight from the upper left, seen on the sides of their faces. You can see the lighter path of the flash on the floor of the ring.

    Image
    [Attachment 9940 - Click to enlarge]


    Three more samples of star or flare patterns from camera flash all around the auditorium, frames 249,257,458:

    Image
    [Attachment 9941 - Click to enlarge]


    The only other "flicker" I see is fluctuating tape noise in the black background.
    Last edited by sanlyn; 21st Mar 2014 at 06:01.
    Quote Quote  
  24. Yes, the tape noise is what I'm talking about.
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Oh. Those bright flashes aren't tape noise, they're mostly camera lens flare from electronic flahes. Strictly speaking, that's not "flicker". A lot of that tape noise is low-bitrate artifact; much of it is below-zero-black -- meaning that it's "zero" data as far as luma or chroma is concerned. FFT3D is usually pretty good at smoothing out the grain and streaky part, and jagabo and others have shown that Deflicker does well at smoothing brightness fluctuations there. The more filters you add, and the stronger they are, the more you'll affect everything in the image (and the slower the filters will run). With VHS that is less-than-pristine like this, you have to find a middle ground between noise reduction and detail retention. What you think is "detail" in VHS is often mostly noise anyway, especially with darker colors in the spectrum. That's just the nature of anything on tape. Trying to remove 100% of tape noise is like trying to remove 100% of the grain in film: the grain is where the detail is.
    Last edited by sanlyn; 21st Mar 2014 at 06:01.
    Quote Quote  
  26. Originally Posted by holygamer View Post
    If you test the following script on this video you'll see blocking (or whatever you want to call it) when the guy throws the other guy from the turnbuckle (caused by TTempSmooth):

    Mpeg2Source("704 x 480 =June 30 1997 before avisynth.d2v", CPU=6)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    ttempsmooth(maxr=7, lthresh=40, cthresh=80, strength=4, interlaced=true)
    AddBorders(8, 0, 8, 0)

    This is the video after I use the above script on my original video.
    The blocking isn't there after the script. It isn't caused by the script. It's caused by your MPEG encoder. For example, from field 101 (bob()):

    After the script, before encoding (4x nearest neighbor enlargement):
    Click image for larger version

Name:	before.png
Views:	740
Size:	63.8 KB
ID:	9946

    After MPEG encoding (4x nearest neighbor enlargement):
    Click image for larger version

Name:	after.png
Views:	765
Size:	65.0 KB
ID:	9945
    Last edited by jagabo; 4th Dec 2011 at 17:37.
    Quote Quote  
  27. Originally Posted by jagabo View Post
    The blocking isn't there after the script. It isn't caused by the script. It's caused by your MPEG encoder.
    Sorry I gave you the wrong ttempsmooth code before. This is what I used on my original video:

    Code:
    Mpeg2Source("704 x 480 =June 30 1997 before avisynth.d2v", CPU=6)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    ttempsmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
    AddBorders(8, 0, 8, 0)
    I'm using HC Encoder at 9000 Bit Rate Constant Quantization. The m2v file it produces has blocking (or whatever you want to call it) when the guy throws the other guy from the turnbuckle (caused by TTempSmooth). That's before I even convert it to MPEG 2. You can see it more clearly if you watch in full screen in Windows Media Player.
    Last edited by VideoFanatic; 4th Dec 2011 at 17:55.
    Quote Quote  
  28. The more noise and motion (the more pixels change from frame to frame) you have in a video the more macroblock artifacts you will get in MPEG encoding.

    Even with your updated script I see very little blocking after filtering, before encoding. Post a sample PNG frame that shows the blocking (before encoding) you are talking about. At least give a frame number.
    Quote Quote  
  29. So do you want me to post a screenshot before I process the file in HC Encoder? How do I do that? Anyway here's a shorter version of the clip. If you look on the left-centre you'll see the blocking.
    Quote Quote  
  30. Originally Posted by holygamer View Post
    So do you want me to post a screenshot before I process the file in HC Encoder?
    Yes.

    Originally Posted by holygamer View Post
    How do I do that?
    Open your AVS script with VirtualDubMod. Seek to a frame that shows blocking. Select Video -> Snapshot Source Frame, then save as PNG.

    Or open your AVS script with VirtualDub, seek to the frame you want, select Video -> Copy Source Frame to Clipboard. Open a image editing program, paste the clipboard to a new image. Save as PNG.

    Originally Posted by holygamer View Post
    Anyway here's a shorter version of the clip. If you look on the left-centre you'll see the blocking.
    I don't see any significant blocking after the script.
    Quote Quote  



Similar Threads

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