VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Jun 2004
    Location
    United States
    Search Comp PM
    I have a capture from VHS that I am trying to deshake/stabilize. It was shot with a tripod mounted camcorder on a spotlight platform. The problem developed when a child hung a hammock from the scaffolding underneath the platform and proceeded to wildly swing back and forth frequently during the show. This translates to frequent shaking of varying intensities in the video. I have deinterlaced the file using QTGMC and rotated a bit in VirtualDub to even out the stage. Efforts to use Deshaker in VirtualDub or the Video Stabilize filter in Vegas Pro 18 have produced what seem to be less than optimal results. You'll note that, although the picture is fairly stable, there are artifacts whose intensity correspond to the original shakiness of that section. There are far more options and parameters in both than I've apparently been able to get my head sufficiently around, so would greatly appreciate suggestions on how to improve. I'm including links to a clip from the deinterlaced file, that file rotated and finally the deinterlaced/rotated/stabilized clip. Thanks in advance for any assistance.

    Deinterlaced Clip
    https://drive.google.com/file/d/1EQuJK6X4gwko5GvyAE8smm1aqMHt_7xR/view?usp=sharing

    Deinterlaced/Rotated Clip
    https://drive.google.com/file/d/1EWrJufYyVO1p_Xk5oGGWEjKm8O53kQnL/view?usp=sharing

    Deinterlaced/Rotated/Stabilized Clip
    https://drive.google.com/file/d/1EQuuGDFTQaV3Sy04TEgXuxkgOEGJKeP1/view?usp=sharing

    Also, if there is hardware that would do a better job I’m open to renting something and capturing again.
    Last edited by RABinMS; 26th May 2021 at 18:26.
    Quote Quote  
  2. Try stabilizing before you rotate.
    Quote Quote  
  3. The deinterlaced video appears to be well deinteralced -- probably with QTGMC.

    The deinterlaced/rotated video appears to use the same deinterlacing algorithm but was poorly rotated -- leaving lots of aliasing artifacts. It looks like it shifted 8x8 blocks rather than working pixel by pixel. <edit> It looks like you used VirtualDub's Rotate2 filter in point mode. Switch to bilinear or bicubic for smoother results. </edit>

    The deinterlaced/rotated/deshaked video looks like it was poorly deinterlaced (many comb and aliasing artifacts), poorly rotated, then well deshaken. Some of the remaining problems are related to those two poorly performed steps. Some are just the nature of deshaking. For example in some frames with lots shaking the picture is motion blurred. Even when you deshake those frame the motion blur will still be there.

    If you're going to deinterlace with AviSynth you might as well rotate it there too, http://avisynth.nl/index.php/Rotate, you'll get better results than the filter you're using now.

    I tried using Depan in AviSynth (with your Deinteralced.avi) to stabilize but couldn't get as stable a picture as you got. But it was free of the poor deinterlacing and rotation problems.
    Last edited by jagabo; 28th May 2021 at 14:30.
    Quote Quote  
  4. Member
    Join Date
    Jun 2004
    Location
    United States
    Search Comp PM
    Thanks much to both of you for your replies. Yes, I deinterelaced with QTGMC and rotated in VirtualDub with the rotation2 filter in point mode. The deinterlaced/rotated and deinterlaced/rotated/stabilized clips both originated from the deinterlaced clip, just with the successive processes added as indicated by the name. Jagabo, I'm assuming that the additional issues you identified with those stemmed from the rotation in VirtualDub, not the deinterlacing, since there was none performed beyond the original done with QTGMC.

    Johnmeyer, I have stabilized before rotating. The results is here:

    Deinterelaced / Stabilized
    https://drive.google.com/file/d/1EactDGBDKa3bW2RO1oAFtVn5OAQYd1QH/view?usp=sharing

    I did notice that in expert mode the Vegas video stabilization filter (what I've used on all of the stabilized clips) includes the option for additional rotation. I included that on another render:
    https://drive.google.com/file/d/1EWxCojDaKy786elFT5bGgB0uRwpCqIhS/view?usp=sharing

    It may well be that either bilenear or bicubic modes in VirtualDub or rotating in AviSynth would produce better results, but welcome you input on that as well. Aside from that I suppose this may be about the best that can be done with this video. It's not ideal, but the source is obviously far from ideal and this is at least pretty stable.

    Looking forward to additional input from you and any others. Thanks again for your comments thus far.
    Quote Quote  
  5. Originally Posted by RABinMS View Post
    The deinterlaced/rotated and deinterlaced/rotated/stabilized clips both originated from the deinterlaced clip, just with the successive processes added as indicated by the name. Jagabo, I'm assuming that the additional issues you identified with those stemmed from the rotation in VirtualDub, not the deinterlacing, since there was none performed beyond the original done with QTGMC.
    I see what's going on. The stabilized video was created from the rotated video (which in turn was made from the QTGMC'd video) and re-interlaced from 60p to 30i, creating new comb artifacts. Here's a crop/zoom from the three videos, side by side, when there's not much shaking:

    Image
    [Attachment 59174 - Click to enlarge]


    The stabilized video has retained most of the aliasing created by the rotation.

    Originally Posted by RABinMS View Post
    It may well be that either bilenear or bicubic modes in VirtualDub or rotating in AviSynth would produce better results
    Definitely.

    <edit>

    Here's the deinterlaced clip rotated and deshaken in AviSynth:

    Code:
    AviSource("Deinterlaced.avi") 
    ConvertToYV12()
    Rotate(-4)
    
    #######################################################
    #
    # Use MDepan() instead of DepanEstimate() for rotation smoothing
    #
    #######################################################
    
    maxstabH=150
    maxstabV=120
    
    vectors = MSuper().MAnalyse(isb = false)
    mdata = MDepan(vectors, pixaspect=1.0, thSCD1=400)
    #mdata = DePanEstimate(last,trust=1.0,dxmax=maxstabH,dymax=maxstabV)
    DePanStabilize(last,data=mdata,dxmax=maxstabH,dymax=maxstabV,rotmax=3.0,method=1,mirror=15,cutoff=0.2,damping=3.0,prev=10,next=10,blur=0)
    
    #######################################################
    
    QTGMC(InputType=2) # cleans up some aliased/flickering edges
    Crop(16,16,-16,-16)
    </edit>
    Image Attached Files
    Last edited by jagabo; 28th May 2021 at 18:58.
    Quote Quote  
  6. Member
    Join Date
    Jun 2004
    Location
    United States
    Search Comp PM
    Thanks so much jagabo! That looks much better. I think that script is what I’ve been looking for. I’ll need to crop a bit more to get rid of the “shaky corners” caused by the shifting frames, but will run it against the (only) deinterlaced file.
    Quote Quote  
  7. You don't have to deinterlace first, just use QTGMC to deinterlace in the same script, before rotating.
    Quote Quote  
  8. Member
    Join Date
    Jun 2004
    Location
    United States
    Search Comp PM
    Thanks for the continued input jagabo. Sorry, but I didn't explain that I had already deinterlaced the entire footage and the clip I posted to start was just a short except from that deinterlaced file. I had started running your script against that larger file and "think" it would have given me the same results. But given my earlier missteps and just to be safe, I pasted the deinterlace script into your script prior to the rotation step and am now running that against the original interlaced capture.
    Quote Quote  



Similar Threads

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