VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Aug 2007
    Location
    Isle of Man
    Search Comp PM
    Hi All,

    I'm looking for the simplest way to deshake a handycam video file. The main challenges I'm facing with this file are:
    1. The file contains multiple segments. Some stable ones shot in landscape mode from a tripod, and shaky hand-held ones shot at high zoom levels. I would prefer not to apply deshaking to segments that don't need it. As far as I know (most) VirtualDub filters can't be applied to multiple range selections. It seems that selectively applying deshaking would require multiple passes, intermediate files or chained frameservers in VirtualDub, or multiple trims in Avisynth. I do favour VirtualDub's linear editing , but would make the trims in Avisynth if a professional result requires it.
    2. The source file contains interlaced YV12 video and I would like to avoid colourspace conversions as far as possible. Again, I understand that VirtualDub filters operate in the RGB32 colourspace only.
    Given these challenges, which VirtualDub or Avisynth image stabiliser/deshaker would you recommend for this job?

    It also appears that deinterlacing is recommended before deinterlacing. Assuming that the final product also requires resizing, what workflow would you then recommend?

    Thanks,
    Francois
    Quote Quote  
  2. Originally Posted by fvisagie View Post
    Given these challenges, which VirtualDub or Avisynth image stabiliser/deshaker would you recommend for this job?
    No way to tell without a sample. Maybe something as simple as AviSynth's Stab, maybe something more complex.
    The source file contains interlaced YV12 video and I would like to avoid colourspace conversions as far as possible. Again, I understand that VirtualDub filters operate in the RGB32 colourspace only.
    So, a VDub solution doesn't interest you?
    ...or multiple trims in Avisynth.
    No, no trimming is necessary, although you'll need to know the first and last frame number for each section being stabilized. ReplaceFramesSimple, part of stickboy's RemapFrames filter, can easily filter different parts of a video without using Trim at all:

    http://avisynth.org/stickboy/

    Assuming that the final product also requires resizing, what workflow would you then recommend?
    bob/stabilize/resize/reinterlace
    Quote Quote  
  3. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    This is just my opinion, based on my limited experience:

    The choice is simply whether depanstabilise (AVIsynth) or deshaker (VirtualDUB) does a better job of deshaking your video. Lots of parameters to twiddle before you can be sure, but I usually find that one works far better than the other, depending on the actual shaking I'm trying to remove.

    Once you see which one is better, use that. The difference in deshaking abilities dwarfs the AVIsynth vs VirtualDUB workprocess differences - you'll just have to put up with those for the sake of getting decent deshaking (unless you're lucky enough to get decent deshaking with both).

    Cheers,
    David.
    Quote Quote  
  4. Originally Posted by 2Bdecided View Post
    The choice is simply whether depanstabilise (AVIsynth) or deshaker (VirtualDUB) does a better job of deshaking your video.
    Yes, I agree. That's what I meant by 'maybe something more complex'. There aren't all that many choices for stabilizing videos. I always prefer using Stab if possible, because it doesn't require much 'twiddling'. Serious work requires one or the other you mentioned.
    Quote Quote  
  5. Member
    Join Date
    Aug 2007
    Location
    Isle of Man
    Search Comp PM
    Originally Posted by manono View Post
    No way to tell without a sample.
    Good to hear from you again, Manono. Here's an example of one of the more extreme cases of camera shake:
    http://www.mediafire.com/file/qcx3ix71kbh9ovp/Sony_DCR-TRV330_PAL_DV_Sample.avi

    Maybe something as simple as AviSynth's Stab, maybe something more complex.
    In theory, would Stab() still require prior deinterlacing if it already does this?
    Code:
    function Stab (clip clp, int "range", int "dxmax", int "dymax") 
    {
    ...
     
    temp  = clp.TemporalSoften(7,255,255,25,2)
    inter = 
    Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp)
    mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxmax,dymax=dymax)
    DePan(inter,data=mdata,offset=-1)
    SelectEvery(2,0) }
    So, a VDub solution doesn't interest you?
    I would prefer to use VirtualDub!

    Originally Posted by 2Bdecided View Post
    Once you see which one is better, use that.
    I'll evaluate both Avisynth's and VirtualDub's options, thanks David.

    How do you suggest sharp scene transitions be handled? Process the segments either side separately, or also just suck it and see?
    Quote Quote  
  6. - you can use vdub filters inside an avs script (better results generally)
    - you can work on sequences in avisynth ( trim or applyrange )
    - you can have a pretty good color accuracy, yv12>rgb matching using pointresize (jmac's solution)
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  7. Stab() would require deinterlacing but it won't work for that video. It's for very small shakes, only a few pixels, like you get with film projector bounce.
    Quote Quote  
  8. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Don't these filters have proper scene detection built in? I'm sure it's worked for me.

    As for the scenes that don't need deshaking, I'd chop the file up, or use trim, or use applyrange, or....

    I would not deshake the scenes that don't need it. waste of time, reduction in quality, and possibility of getting extra unwanted movement due to "correction".


    It's inevitable that you need to deinterlace interlaced video to deshake it. Where you don't, it's because the deshake filter is deinterlacing and re-interlacing internally. And despite what it says in the manual, I don't think it does a very good job of deinterlacing - so using a better deinterlacer like QTGMC can give visibly better results. It depends how much shaking and bluring there is of course - but I had a video with fast shutter speed and lots of shaking (so sharp but juddery) and better deinterlacing helped a lot.

    Cheers,
    David.
    Quote Quote  
  9. Member
    Join Date
    Aug 2007
    Location
    Isle of Man
    Search Comp PM
    Hi everyone,

    Just to report back that the project has been a great success! A huge, sincere, Thank You to everyone for their contributions to this thread (and elsewhere on this forum where I picked up valuable info too). I am absolutely thrilled with the outcome and very grateful for your help.

    In case you're interested, for now I went with VirtualDub and Deshaker instead of Avisynth and DePan. Mainly because I'm more au fait with VirtualDub I tried that combination first, and it worked brilliantly enough for me to continue with it. I wanted to slightly sharpen the result, but that messed things up somewhat when reinterlacing was included. So after sharpening I left the output at double framerate progressive and it looks great.

    Speaking of VirtualDub and Deshaker, of course huge Thanks to Gunnar for Deshaker and Avery and the rest at VirtualDub too. Your efforts are sincerely appreciated. VirtualDub's well-thought-out functionality, accuracy and speed never cease to amaze me, and as far as Deshaker's cleverness and achievements are concerned, I honestly cannot say how very much impressed I am.

    Best regards,
    Francois
    Quote Quote  



Similar Threads

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