VideoHelp Forum




+ Reply to Thread
Page 6 of 10
FirstFirst ... 4 5 6 7 8 ... LastLast
Results 151 to 180 of 280
  1. Originally Posted by sanlyn View Post
    The temporal smoother version is the cleanest
    But that is the type of scene a simple temporal smother works very well on -- no motion, very slow fade in/out.

    Originally Posted by sanlyn View Post
    But why the difference between applying this simple filter on Avisynth's output in one step, as opposed to saving the clip to RGB in one step and then running a second step on the saved clip with a simple temporal smoother or some other filter?
    All you samples used different filters. Why wouldn't they be different?
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by unclescoob View Post
    Can I cut my mpeg in segments using dgindex?
    Yes, dead simple.

    '[' button or HOME key - Mark selection start point.
    ']' button or END key - Mark selection end point.
    File->'Save Project and Demux Video' to create .m2v file (elementary stream) of selected segment.

    Selections must be on keyframes, of course.
    Quote Quote  
  3. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Actually the entire 1-hr 20-min of video looks like that. I did use different filters to draw an image out of that tape (as you probably remember) and clean up more, and FFT3D and Neat Video themselves have temporal smoothing functions. But the question is: if you first correct a little color and convert to RGB, then in a later and separate step apply the same filter(s), it has very little effect except to smooth some grain. So I surmise that using a combo step has something to do with the way frames are fed to VirtualDub from Avisynth (?). Or something like that. I just know that the effectiveness is entirely different when several processes are combined into one -- which is what I ended up doing for the entire video, regardless of the filters used. Test one filter, test another, correct this, correct that, then combine everything.

    It' s clear that many separate filter runs, colorspace conversions, etc., all take a toll on PQ. A detailed explanation isn't really necessary, but it appears to be something of a mystery that combining certain steps rather than using separate steps works better in many situations.
    Last edited by sanlyn; 21st Mar 2014 at 07:53.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Gavino View Post
    Originally Posted by unclescoob View Post
    Can I cut my mpeg in segments using dgindex?
    Yes, dead simple.

    '[' button or HOME key - Mark selection start point.
    ']' button or END key - Mark selection end point.
    File->'Save Project and Demux Video' to create .m2v file (elementary stream) of selected segment.

    Selections must be on keyframes, of course.
    Gosh. Didn't know DGindex could that. Thanks again, Gavino.
    Last edited by sanlyn; 21st Mar 2014 at 07:53.
    Quote Quote  
  5. Originally Posted by sanlyn View Post
    it appears to be something of a mystery that combining certain steps rather than using separate steps works better in many situations.
    But the samples you posted weren't showing that. They were all doing different filter chains. In any case there should be no difference between performing each step individually (saving to lossless intermediate files) and chaining them all together in one pass. The filter chain is just a linear pipeline. Unless AviSynth sometimes handles frames out of sequence?
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I closed that project a while back, would have to search 50 DVD's to find that clip again. Might be more on-topic to get the wrestling clip and, instead of combining steps, use separate steps with the same filters I used earlier. Later today.
    Last edited by sanlyn; 21st Mar 2014 at 07:53.
    Quote Quote  
  7. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    OK, jagabo, conceded in this case. The wrestling clip ain't a good example; the noise problems between this clip and the opera are different. I ran the original script on the wrestler (Deflick + NeatVideo) both ways, combined and as separate steps. The results look identical to me -- the exception being that the combo took 19 minutes, but separate steps took 39 minutes.

    Will try to find that old clip I posted earlier, as the problems are distinctly different.

    Note: As a matter of fact, almost all this arduous work with deflick + Neat Video was a waste of time. After I ran chubbyrain2 to clean the top 60 pixels, VirtualDub's temporal smoother at 4 cleaned the whole thing in 2 minutes ! Only downside was softer image, but a bit of sharpening could fix that.

    There ya go, holygamer (whatever happened to him, anyway?). Sometimes the simplest solution works just as well.
    Last edited by sanlyn; 21st Mar 2014 at 07:53.
    Quote Quote  
  8. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    MCTemporalDenoise masks details, from what I understand, in order to avoid the negative side effects associated with filtering (ghosting, blurring). Am I right? I have to try it this weekend. Oh and thanks for the advice on Mpeg editor. Avidemux, that's right! I haven't used it in about a year and forgot I can edit Mpeg this way! Thanks.
    Quote Quote  
  9. McTemporalDenoise's major innovation is that it's motion compensated. Instead of averaging pixels from the same X,Y coordinate in each frame, it tracks motions and averages from the different locations. This eliminates the smearing that you get with simple temporal filters that only use motion masking.

    For example, here's a frame from a noisy MPG video where the camera was panning down, after some heavy filtering:

    original:
    Click image for larger version

Name:	org.png
Views:	700
Size:	688.8 KB
ID:	10143

    VirtualDub's Temporal Smoother at 6:
    Click image for larger version

Name:	TS6.png
Views:	707
Size:	756.7 KB
ID:	10144

    McTemporalDenoise(settings="medium"):
    Click image for larger version

Name:	mctd.png
Views:	788
Size:	567.1 KB
ID:	10145

    Notice how Temporal Smoother has smeared the background and lost a lot of detail, and it still has more noise than MCTD.

    Or a few frames earlier in the shot where the camera is still but the woman's head is moving down:

    original:
    Click image for larger version

Name:	org2.png
Views:	719
Size:	738.0 KB
ID:	10146

    Temporal Smoother 6:
    Click image for larger version

Name:	ts62.png
Views:	643
Size:	1,014.7 KB
ID:	10150

    McTemporalDenoise(settings="medium"):
    Click image for larger version

Name:	mctd2.png
Views:	757
Size:	605.1 KB
ID:	10152

    This time the backgrounds are similarly filtered but TS6 has mangled the woman's face.

    I uploaded the wrong image once and now can't get rid of the unneeded thumbnail below...
    Image Attached Thumbnails Click image for larger version

Name:	mctd2.png
Views:	1112
Size:	1.27 MB
ID:	10148  

    Last edited by jagabo; 17th Dec 2011 at 07:42.
    Quote Quote  
  10. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    I cannot get MCTemporalDenoise to work, for some reason. It loads, but it's not even touching my video. I have all required plugins, and the actual script. I used a simple script, as advised MCTemporalDenoise (settings, "medium). I am using AvsPmod. Everything loads, as I stated but nothing is happening. I copied my source script and pasted it on the MCTemporalDenoise script.

    What gives?
    Quote Quote  
  11. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Oh and by the way, here is a sample of my cartoon, as I said I'd post. Suggestions are appreciated. I've been using NeatVideo in conjunction with Virtualdub's Temporal Cleaner and Avisynth's Temporal Cleaner. Both do a good job, but if MC can give me the same results without the slight blur/ghosting...this would be great. Based on your samples jagabo, it seems like there's hope.

    master, if you're reading this, I wasn't able to load it in the email, for some reason videohelp doesn't give me that option in PM emails. Unless there's something I'm missing. As you can all see, there's not just grain and dirt, but some flickering. Now here's the tricky part about this: Not all scenes in this episode are this flickery. So I hope MCTemporalDegrain is adaptive.
    Image Attached Files
    Quote Quote  
  12. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Hi guys. Attached is the same sample, but cleaned. I first did IVTC and some color desaturation with "Tweak" in Avisynth.

    I then loaded the video into Virtualdub. I used some reasonable settings with Virtualdub's TemporalCleaner, then made a noise profile AFTER doing some pre-filtering with Temporal Cleaner. In other words, the NV noise profile was based on the grain left over by Temporal Cleaner. I sharpened with Neat Video's sharperner, and voila. Now if you'll notice, the background behind the secretary is still "nervous". Temporal smoother can take care of that, at low settings. But if MCTemporalDegrainer can do it all, AND avoid blurring, this would be great.

    What do you guys think?
    Image Attached Files
    Quote Quote  
  13. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by unclescoob View Post
    I cannot get MCTemporalDenoise to work, for some reason. It loads, but it's not even touching my video.
    Probably a simple script error.
    Did you actually call MCTemporalDenoise as well as including the function definition?
    See jagabo's example script at post #143.

    If you still have problems, post your script here.
    Quote Quote  
  14. Originally Posted by unclescoob View Post
    I used a simple script, as advised MCTemporalDenoise (settings, "medium).
    settings="medium"
    not
    settings, "medium"
    And the video needs to be deflickered before denoising. I'd deshake it too.
    Last edited by jagabo; 18th Dec 2011 at 11:15.
    Quote Quote  
  15. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    [QUOTE=jagabo;2128375]
    settings="medium"
    not
    settings, "medium"
    That's how I originally did it. But AvsPmod wouldn't allow it unless I put "settings," instead of "settings="


    Originally Posted by jagabo View Post
    And the video needs to be deflickered before denoising. I'd deshake it too.
    what's a virtualdub deflicker script?
    Quote Quote  
  16. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by unclescoob View Post
    Originally Posted by jagabo View Post
    settings="medium"
    not
    settings, "medium"
    That's how I originally did it. But AvsPmod wouldn't allow it unless I put "settings," instead of "settings="
    That should give an error, as it will look for a nonexistent variable called 'settings' in your script.
    Post your complete script - there's something strange going on.
    Quote Quote  
  17. Try something like this:

    Code:
    LoadVirtualDubPlugin("G:\Program files\VirtualDub\plugins\deflick.vdf","DeFlick") 
    import("C:\Program Files (x86)\AviSynth 2.5\plugins\Stab.avs")
    
    Mpeg2Source("sample1.d2v", CPU=2) 
    TFM(d2v="sample1.d2v") 
    TDecimate() 
    Stab(dxmax=2, dymax=2)
    Crop(10,2,-6,-2)
    ConvertToRGB32()
    DeFlick(8, 0, 0, 10, 0) #window size, softening, interlaced, sc threshold, show sc
    ConvertToYV12()
    McTemporalDenoise(settings="very high")
    AddBorders(8,2,8,2)
    Image Attached Files
    Quote Quote  
  18. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    jagabo, thanks for the script. But for some reason, my computer is not allowing me to open your file.

    Gavino, here's my script:

    MPEG2Source("video/path.d2v", cpu=6)
    TFM()
    TDecimate()
    Tweak(hue=0.0, sat=0.8, bright=0, cont=1.0, coring=true, sse=false)
    ConvertToYV12()
    function TemporalDegrain (settings,"high")
    {
    NR2 = (HQ>=2) ? NR2.HQDn3D(1,1,4,1) : NR2 # Temporal filter to remove last bits of dancing pixels

    # Contra-sharpening: sharpen the denoised clip, but don't add more than what was removed previously.
    # Here: A simple area-based version with relaxed restriction. The full version is more complicated.
    s = NR2.minblur(1,1) # Damp down remaining spots of the denoised clip.
    allD = mt_makediff(o,NR2) # The difference achieved by the denoising.
    ssD = mt_makediff(s,s.removegrain(11,-1)) # The difference of a simple kernel blur.
    ssDD = ssD.repair(allD,1) # Limit the difference to the max of what the denoising removed locally.
    ssDD = SSDD.mt_lutxy(ssD,"x 128 - abs y 128 - abs < x y ?") # abs(diff) after limiting may not be bigger than before.

    NR2.mt_adddiff(ssDD,U=2,V=2) # Apply the limited difference. (Sharpening is just inverse blurring.)

    output = last
    return(output)
    }


    # From Didee's MCBob script
    function MinBlur(clip clp, int r, int "uv")
    {
    uv = default(uv,3)
    uv2 = (uv==2) ? 1 : uv
    rg4 = (uv==3) ? 4 : -1
    rg11 = (uv==3) ? 11 : -1
    rg20 = (uv==3) ? 20 : -1
    medf = (uv==3) ? 1 : -200

    RG11D = (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=u v2)
    \ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegra in(20,rg20),U=uv2,V=uv2)
    \ : mt_makediff(clp,clp.removegrain(11,rg11).removegra in(20,rg20).removegrain(20,rg20),U=uv2,V=uv2)
    RG4D = (r==1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2 )
    \ : (r==2) ? mt_makediff(clp,clp.medianblur(2,2*medf,2*medf),U= uv2,V=uv2)
    \ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U= uv2,V=uv2)
    DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
    clp.mt_makediff(DD,U=uv,V=uv)
    return(last)
    }
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Considering the other plugins available, I wouldn't bother with Neat Video here. It won't accomplish anything.
    Last edited by sanlyn; 21st Mar 2014 at 07:54.
    Quote Quote  
  20. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by unclescoob View Post
    function TemporalDegrain (settings,"high")
    I don't know where you got those functions from, but you have not got MCTemporalDenoise.
    Download MCTemporalDenoise.v1.4.20.avsi from this page:
    http://avisynth.org/mediawiki/MCTemporalDenoise
    and any needed plugins from the list of required filters.

    Put the .avsi and the needed plugins in Avisynth's plugin folder.
    Then you can just call MCTemporalDenoise(settings="medium") in your script.
    Quote Quote  
  21. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Sanlyn, did you look at my cleaned-up sample? If so, what do you think?

    Gavino, thanks. Will do.
    Quote Quote  
  22. I got AviSynth's DeFlicker() to work almost as well as VirtualDub's. You can replace the ViritualDub DeFlicker (and remove the colorspace conversions around it) in my earlier script with:

    ColorYUV(off_y=-16)
    DeFlicker(percent=95, scene=7)
    ColorYUV(off_y=16)
    Dropping the black level temporarily keeps the black level from pumping.

    And you can replace McTemporalDenoise() with TTempSmooth(maxr=5, lthresh=20, cthresh=25, strength=6). That works about as well on still areas but not so well on moving areas, especially panning shots. It's much faster though.
    Last edited by jagabo; 18th Dec 2011 at 19:24.
    Quote Quote  
  23. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Cool, Jag. I'll try that. Question regarding your previous file attachment: Was that my video that you tried the script on? If so, I'd like to see it. Can you post it as an mpeg? I couldn't open that for some reason. I really tried.
    Quote Quote  
  24. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Jag, tried it. You're right, it works on still areas, but it's causing major ghosting on the moving images. Any idea on what argument I should adjust? I'll experiment on my own, but if you can give me an idea, I'll try that as well.
    Quote Quote  
  25. Originally Posted by unclescoob View Post
    Question regarding your previous file attachment: Was that my video that you tried the script on?
    Yes. You can play h.264 in MKV?

    Originally Posted by unclescoob View Post
    If so, I'd like to see it. Can you post it as an mpeg? I couldn't open that for some reason. I really tried.
    M2V attached. This uses the same script as the MKV with VirtualDub's DeFlicker and MCTemporalDenoise().

    Originally Posted by unclescoob View Post
    it's causing major ghosting on the moving images.
    You mean with TTempSmooth()? I wasn't seeing any ghosting in the sample clip. Are you seeing it in some other part of the video?

    Originally Posted by unclescoob View Post
    Any idea on what argument I should adjust?
    I had to turn the lthresh and cthresh values up high to keep noise from coming through. High values like that will cause ghosting in low contrast areas while moving. You can try lowering them but then some of the brightest and darkest noise spots will show. Turning down maxr and strength will cut down on the ghosting too. But that will allow more noise through.
    Image Attached Files
    • File Type: m2v hc.m2v (11.24 MB, 334 views)
    Quote Quote  
  26. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by unclescoob View Post
    Originally Posted by jagabo View Post
    settings="medium"
    not
    settings, "medium"
    That's how I originally did it. But AvsPmod wouldn't allow it unless I put "settings," instead of "settings="
    That's because you're pasting a function definition into your script, thinking that's how you use the function. It's not.

    There are lots of functions built into AVIsynth. e.g. tweak, bob, etc. You use these by "calling" them with parameters to do something to your video. e.g.
    MPEG2source("myvideo.d2v")
    tweak(sat=1.2)

    There are lots of other functions written by people which you can use. They aren't built into AVIsynth. So before you can use them, you have to introduce them to AVIsynth. You can either put them in your script, or in a file called something.avsi in your avisnyth/plugins folder, or import them.

    function TemporalDegrain (....
    + lots of lines of AVIsynth code, ending with }
    defines a new function called "TemporalDegrain"

    Once AVIsynth knows about TemporalDegrain, then somewhere in your script you can call that function, e.g.
    temporaldegrain(settings="high")
    or whatever.

    A function definition, in itself, will do nothing to your video. You're just teaching AVIsynth a new trick - you're not asking it to do anything to your video.

    There are excellent introductory guides on AVIsynth.org.

    Cheers,
    David.
    Quote Quote  
  27. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by unclescoob View Post
    I cannot get MCTemporalDenoise to work, for some reason. It loads, but it's not even touching my video. I have all required plugins, and the actual script. I used a simple script, as advised MCTemporalDenoise (settings, "medium). I am using AvsPmod. Everything loads, as I stated but nothing is happening. I copied my source script and pasted it on the MCTemporalDenoise script.

    What gives?
    Originally Posted by unclescoob View Post
    jagabo, thanks for the script. But for some reason, my computer is not allowing me to open your file.
    You might have all the plugins, but you might be missing a couple of files used by FFT3D, etc., that should be in your System32 folder. The attached zip file has everything required for MCTemporalDenoise, including:
    1. documentation for all the plugins.
    2. Files for System32.
    3. the plugins and function scripts.

    The MCTemporalDenoise "avsi" is the complete script. Copy it into your Avisynth plugins folder. An avsi loads automatically when you open an avisynth script, just as your .dll plugins do if they're in the plugins folder. All you have to do is call it with the same line jagabo used earlier:

    Code:
    McTemporalDenoise(settings="very high")
    I don't know what's going on with AvsPmod. I generally use it only for YUV color correction testing. If I have a script with problems in AvsPmod, I run it in VirtualDub to see if the script will just run, period.

    Originally Posted by unclescoob View Post
    Cool, Jag. I'll try that. Question regarding your previous file attachment: Was that my video that you tried the script on? If so, I'd like to see it. Can you post it as an mpeg? I couldn't open that for some reason. I really tried.
    I played all the m2v and mkv files in VLC player, no problems. http://www.videolan.org/vlc/download-windows.html

    Originally Posted by unclescoob View Post
    Sanlyn, did you look at my cleaned-up sample? If so, what do you think?
    Still some flicker and block noise. Red is oversaturated, too much blue in the darks and dark grays but not enough in the midtones. I think the scripts from jagabo and Gavino are on track, they seem about right. Every shot in this clip has a different color balance and levels. The link below is an mpg made with jagabo's exact script. I added some color correction in VirtualDub with a gradation curve and built-in levels control. I set levels somewhere in the neighborhood of NTSC, you might want to fiddle with levels for strictly-PC.

    http://dc399.4shared.com/download/p4m7k1zd/sample1.mpg
    Last edited by sanlyn; 21st Mar 2014 at 07:55. Reason: replace zip attachment, possibly corrupt
    Quote Quote  
  28. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Meanwhile, another mystery. . .

    These are the first 6 frames (0 thru 5) of the "sample1.m2v" download, unprocessed. Opened directly in VirtualDubMPEG2.

    Image
    [Attachment 10186 - Click to enlarge]


    Below, this is what those same frames look like loaded via Avisynth. It doesn't make any difference whether or not I apply any filters. These were loaded from .d2v using exactly the same script jagabo posted, with no changes. I also tried loading it into VirtualDubMPEG and recompressing straight to AVI, but as soon as I open it with AviSource in Avisynth I get the same results. I don't think the problem is DGIndex, I tried other .d2v's with no problem.

    Image
    [Attachment 10187 - Click to enlarge]


    On top of that I get this error from VirtualDub at the end of processing with the script:

    Image
    [Attachment 10188 - Click to enlarge]


    Downloaded the .m2v again, scrolled through with DGindex preview, reinstalled VirtualDub and Avisynth, checked the related plugins, etc., etc., ad nauseam. Same problem, but only with this .d2v .

    Anyway, I deleted frames 0 to 4 in the final MPEG posted above.
    Last edited by sanlyn; 21st Mar 2014 at 07:55.
    Quote Quote  
  29. Originally Posted by sanlyn View Post
    Meanwhile, another mystery. . .

    These are the first 6 frames (0 thru 5) of the "sample1.m2v" download, unprocessed. Opened directly in VirtualDubMPEG2...

    Below, this is what those same frames look like loaded via Avisynth...
    That's quite common with trimmed MPG files. I think it has something to do with open GOPs. Just trim the first few frames away.
    Quote Quote  
  30. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Thanks, jagabo. Yep, I figured it was the clip. Never saw it before, doesn't happen any other time. I clipped off the weird frames. What was really odd was that frame 2 in the "bad" frames is actually another 7 or 8 or frames down the line. I kinda guessed something was wrong with that first frame group.
    Last edited by sanlyn; 21st Mar 2014 at 07:56.
    Quote Quote  



Similar Threads

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