VideoHelp Forum




+ Reply to Thread
Page 2 of 4
FirstFirst 1 2 3 4 LastLast
Results 31 to 60 of 99
  1. Actually there are some people that prefer the noise/scratches

    I forgot to fix the levels, nice catch jagabo
    Quote Quote  
  2. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thanks for all work and suggestions for fixing the video, guys!
    I was going to do the levels after I got the artifacts/bounce gone, but probably not the noise reduction, so I welcome some advice about that. Poison, please post your clean-up script. The video sample looked good. And thanks for the Removegrain for QTGMC. I had trouble finding the right combo of dll's for an earlier script you posted for me (cleaning up a video with a line of distortion across it), but maybe I'll get it to work this time.

    I'm curious what manono was specifically referring to by "unblending it to the wrong framerate."
    Quote Quote  
  3. Originally Posted by spiritgumm View Post
    I'm curious what manono was specifically referring to by "unblending it to the wrong framerate."
    He was referring to my surprise that SRestore() to 23.976 gave the correct frame rate. I hadn't seen field blending used for 23.976 fps to 29.97 fps before. Unblending to 25 fps would be the wrong frame rate in this case as it would leave a duplicate frame every 24 frames.
    Quote Quote  
  4. MPEG2Source()
    QTGMC(sharpness=0.2)
    Stab(2,5,5)
    Srestore(23.976)
    Trim(3,0) # just to get rid of few bad frames, don't include this in your full video
    RemoveDirtMC(30,false)
    Crop(16,6,-24,-4)
    AddBorders(16,6,24,4)
    AssumeFPS(24000,1001) #to make framerate "perfect"
    Greyscale() #to zap the chroma noise on a b/w film
    SmoothLevels(22,1.1,255,0,255)

    I don't know how to deal with the right border, you might want to crop it some more, it still looks ratty (it's diagonal)

    I used QTGMC to generate a lossless intermediate first. Then applied the other filters on a 2nd stage. There are benefits to doing it this way - if srestore discards a good frame or does a bad decision, you can go back and manually replace with a good frame . Also it is actually faster, the temporal filters really slow down when they have to use slow filters beforehand

    As usual, adjust to your tastes. QTGMC has a lot of variables, and default denoising is quite high (there are noise bypass settings for it), and as I mentioned the contra-sharpening is quite high (I usually set sharpness=0.2 - 0.4 for similar values to TGMC)


    Here are RemoveDirt and RemoveDirtMC, you need mvtools2.x and remove grain (which you should already have for QTGMC)

    function RemoveDirt(clip input, int limit, bool _grey)
    {
    clensed=input.Clense(grey=_grey, cache=4)
    alt=input.RemoveGrain(2)
    return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=6,cthreshold=8, gmthreshold=40,dist=3, dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)
    # Alternative settings
    # return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=li mit,noisy=12,grey=_grey,show=true)
    # return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_ grey,show=false)
    }

    function RemoveDirtMC(clip,int limit, bool "_grey")
    {
    _grey=default(_grey, false)
    limit = default(limit,6)
    i=MSuper(clip,pel=2)
    bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
    fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
    backw = MFlow(clip,i,bvec)
    forw = MFlow(clip,i,fvec)
    clp=interleave(backw,clip,forw)
    clp=clp.RemoveDirt(limit,_grey)
    clp=clp.SelectEvery(3,1)
    return clp
    }
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Wow, I tried your script. I barely get 1 fps on my box!
    Quote Quote  
  6. QTGMC() is very slow unless you use the faster presets.

    QTGMC(preset="veryfast")
    Of course, the faster presets don't work as well. Try a simple bob() instead, followed by a vertical sharpen at the end, Sharpen(0, 0.6).
    Last edited by jagabo; 1st Dec 2010 at 19:08.
    Quote Quote  
  7. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    He was referring to my surprise that SRestore() to 23.976 gave the correct frame rate. I hadn't seen field blending used for 23.976 fps to 29.97 fps before.
    Just wondering what would do this? Does recording the vhs to dvd alter the framerate or blend the fields? In this case, the vhs already had the artifacts and bounce, but I still wonder how a dvd recorder might alter the incoming video (framerate-wise).
    Quote Quote  
  8. I've seen plenty on DVD like this so I'm fairly certain it wasn't done in the capture to DVD recorder but is already in the source VHS.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Thanks for the tip jagabo, I must admit, I'm not that heavily into Avisynth. It took me over two hours to
    find all the parts necessary for the above script and get it working. BUt I finally got a result - interesting exercise!

    I guess QTGMC is the updated version of tempgaussMC - no wonder it's slow. I usually use yadif for casual material,
    but I can see that for serious work, the better de-interlacers are worth the time.

    I'm absolutely amazed at the breadth and depth of the variety of Avisynth filters; I don't know how anybody keeps up with it all !
    Quote Quote  
  10. By the way, I wouldn't normally recommend simple bob() deinterlacing but this video isn't very sharp to begin with and the bouncing frame causes some unusual difficulties that bob() seems to alleviate.
    Quote Quote  
  11. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    is there a specific method for deblending? I'm wondering why Bob was preferable over another deinterlacer. I ask because I think I have more fieldblended video. Some have vertical jitter which I think Stab isn't strong enough to handle (such as this extreme example):
    2.m2v
    Image Attached Files
    • File Type: m2v 2.m2v (5.73 MB, 395 views)
    Quote Quote  
  12. You're right, Stab() doesn't seem to work with that clip. DepanStabilize() does though:

    Mpeg2Source("2.d2v")
    Yadif(order=1, mode=1)
    SRestore(frate=23.976)
    mdata = DePanEstimate()
    DePanStabilize(data=mdata)
    Last edited by jagabo; 21st Dec 2010 at 23:06.
    Quote Quote  
  13. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Looks like Depan needs to between Bob and SRestore, otherwise there's still alot of jitter. Default Method=0 causes the margins to fluctuate too much, so I'm using Method 1. Got the Depan settings elsewhere.
    Bob()
    mdata = DePanEstimate()
    DePanStabilize(data=mdata, cutoff=0.5, damping=0.5, mirror=15, blur=30, method=1)
    SRestore(23.976)
    crop(10,8,-10,-12)
    addborders(10,8,10,12)

    Background noise becomes more noticeable. I added FluxSmoothT(), which seems to help, but I'm not sure if it's also making the picture too soft or if something else is doing that. Is there a better fix for background noise?

    Also have another video which Stab will work better in, but the background noise really becomes noticeable (blinking). I'm using the DirtRemoveMC in all of these videos. Not sure if its a cumulative effect, or the bobing/restoring that's mainly exacerbating it.
    Last edited by spiritgumm; 30th Dec 2010 at 20:15.
    Quote Quote  
  14. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    So is there a way to repeat the effects of functions without doubling/tripling the process time? It seems like I need to run both Stab and Depanstabilize a couples times to fix some vertical jitter. Here are two partial scripts that appear to work well for two videos, but will take 24 hours (with some additional denoise filters).

    bob()
    Stab()
    mdata = DePanEstimate(dxmax=0)
    DePanStabilize(data=mdata, cutoff=1, damping=1, mirror=15, blur=30, method=1)
    SRestore(23.976)

    bob()
    stab()
    mdata = DePanEstimate(dxmax=0)
    DePanStabilize(data=mdata, cutoff=1, damping=1, mirror=15, blur=30, method=1)
    SRestore(23.976)
    mdata = DePanEstimate(dxmax=0)
    DePanStabilize(data=mdata, cutoff=1, damping=1, mirror=15, blur=30, method=1)
    Quote Quote  
  15. Originally Posted by spiritgumm View Post
    So is there a way to repeat the effects of functions without doubling/tripling the process time?
    No. Each instance of a filter is a new filter.

    Do you really need to use both Stab() and DePanStabilize()? I would think you could get rid of Stab(). And you may be able to set DePanStabilize() to a longer window (cutoff and damping?) so you don't have to use it twice. Though field blending may be confusing it when used before SRestore(), and SRestore() may be getting confused by the frame bouncing.

    Are you seeing a shift to green after Stab() and DePanStabilize()? I do. It's especially obvious with black and white video.
    Quote Quote  
  16. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    The display window in AvsP turned green while I was experimenting, but seemed fine with these scripts. If the encode was green, I would see it as such, correct?

    The video for the first script primarily needed Stab for random spots of small constant vertical jitter, and I ran that, but this left larger single jitter every couple seconds. I ran the Stab + Depan last night which was an improvement over Stab alone, though seems like some some vertical movement (someone rising out of a chair) is less smooth than with Stab or Depanstabilize alone.

    The video for the 2nd script (the "bounce" video posted on previous page) has constant jitter (both large and small), and one pass of Depanstabilize wouldnt catch all of it - sometimes I think because there was horizontal panning and Depan was only set for vertical jitter. When I tried leaving it for default to catch both horizontal and vertical, it worked well, but produced occasional major horizontal jitter or slowmotion in horizontal pans elsewhere. So I set both Depans back to vertical-only detection.
    I added Stab because in one scene, there was tiny horizontal jitter which Stab would fix safely, unlike Depan. I know there's a Panning parameter in Depan but I'm not sure how to set it (assuming that was why it creating jitter/slowmo).

    The rest of each script looks something like this - I added FluxsmoothT to smooth out the background which seemed to pulse noticeably after using Stab:
    Sharpen(0, .6)
    removedirtmc(30,true)
    crop(10,8,-10,-12)
    FluxSmoothT
    addborders(10,8,10,12)
    Greyscale()
    smoothLevels(0,1.0,255,0,255)
    Last edited by spiritgumm; 31st Dec 2010 at 11:26.
    Quote Quote  
  17. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    well, tried the 2nd script (in post 44) for my other video and got very unsmooth vertical motion - probably one too many dejitter functions. I guess I could trim the times where there's vertical motion and apply only one dejitter function there.... unless someone can assist me with improved Stab or Depan settings.
    Quote Quote  
  18. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Given the large and small vertical jitters I described, can anyone recommend some payware that would do the job, under $100 and without a steep learning curve (ie not something like Nuke Nodalware)?
    Quote Quote  
  19. is this for the same video ? "2.m2v" ?


    bob()
    Stab()
    mdata = DePanEstimate(dxmax=0)
    DePanStabilize(data=mdata, cutoff=1, damping=1, mirror=15, blur=30, method=1)
    SRestore(23.976)

    sometimes it's better to use srestore first, before applying stabilizing software, because the dupes or blended frames may throw off the algorithm, especially when you use a range of 1 (this means it only looks towards the next frame, and if that's a dupe, it won't detect any x or y translation because it's an identical frame!)


    Given the large and small vertical jitters I described, can anyone recommend some payware that would do the job, under $100 and without a steep learning curve (ie not something like Nuke Nodalware)?

    you can use deshaker for free , or if you want to pay money prodad mercalli does a decent job

    if depanstabilize and stab result in "green tinged" frames , you can use greyscale() if your clips are black and white

    I attached the "2.m2v" deshaker processed clip below , I used adaptive zoom and no borders, but you might prefer the other border options like mirror or fill in with past/future frames
    Image Attached Files
    Quote Quote  
  20. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Hi Poison, thanks for the input and the sample. I've tried several variations of the script, including what you suggested about Srestore, but nothing worked perfectly so I put off doing the videos. I should probably apply filters differently in separate parts (using TRIM).
    The deshaker video looks good except the picture rotates slightly. Is that something which could be corrected, or is it a necessary byproduct?
    Quote Quote  
  21. do you mean rotation on the z-axis ? you can disable rotation detection in deshaker , or set the max rotation correction to zero

    but there is also some intraframe warping - that's not going to be correctable very easily
    Quote Quote  
  22. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I'm not sure - at 5 seconds on, the video looks like it turns slightly, and/or in and out (I guess that's the Z axis).

    Looks like I dont have enough RAM to try Prodad.
    Quote Quote  
  23. you can disable rotation detection in deshaker pass 1

    there might be better settings, as usual adjust the settings until you're happy
    Image Attached Files
    Quote Quote  
  24. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    thanks again. Looks better, though there might be some in/out at the very end.
    Deshaker is a Vdub plugin - can you load an avs script into Vdub and filter it with Deshaker? I think one reason I avoid Deshaker (besides being confused how to use it) was I thought it couldnt be used like that.
    Thanks again for the sample.
    Quote Quote  
  25. Originally Posted by spiritgumm View Post
    Deshaker is a Vdub plugin - can you load an avs script into Vdub and filter it with Deshaker?
    Yes. Deshaker requires two passes. During the first pass it just examines the frames and builds a table with what it finds. During the second pass it does the actual deshaking.
    Quote Quote  
  26. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    the Vdub deshaker 2-pass is independent of the HCenc dvd encode two pass, right?
    Quote Quote  
  27. Originally Posted by spiritgumm View Post
    the Vdub deshaker 2-pass is independent of the HCenc dvd encode two pass, right?
    Yes. You're using HcEnc directly from VirtualDub? Then you need to set up Deshaker's first pass, run a first pass for Deshaker (or use File -> Run Video Analysis Pass), then set Deshaker to its second pass, and HcEnc to its first pass. Save as AVI. Then set HcEnc to second pass and Save as AVI again. Ie, the first pass that HcEnc sees should be the deshaken video, not Deshaker's first pass that shows with all the arrows and stuff.
    Quote Quote  
  28. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I've only used HCenc by loading an avs - never tried Vdub and HCenc together, but I assumed that's what I would do. If there's a better way to link the two to encode to dvd, I'm open to suggestions...assuming I can set up Deshaker properly in the first place.
    Quote Quote  
  29. Originally Posted by spiritgumm View Post
    I've only used HCenc by loading an avs - never tried Vdub and HCenc together, but I assumed that's what I would do. If there's a better way to link the two to encode to dvd, I'm open to suggestions...assuming I can set up Deshaker properly in the first place.
    I've never used it but VirtualDub has a way to use external encoders now. I've seen it referenced here several times.

    http://forums.virtualdub.org/index.php?act=ST&f=3&t=18840&

    Otherwise, you can use VirtualDub as normal and create an intermediate AVI file that's deshaken. Then open that file with a AVS script for use in HcEnc.
    Quote Quote  
  30. Originally Posted by spiritgumm View Post
    thanks again. Looks better, though there might be some in/out at the very end.
    Deshaker is a Vdub plugin - can you load an avs script into Vdub and filter it with Deshaker? I think one reason I avoid Deshaker (besides being confused how to use it) was I thought it couldnt be used like that.
    Thanks again for the sample.
    you can disable zoom and rotation as well in the 1st pass

    jagabo answered the other questions

    Personally I would use the use of lossless intermediates for several stages. If you precede deshaker with a heavy script, it will be very slow, especially if you try to do everything to encode to dvd as well.
    Image Attached Files
    Quote Quote  



Similar Threads

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