Tricky Stabilize Question

John222 wrote on 12/30/2013, 11:20 AM
I have some hand held video footage of a singing quartet which includes my daughter. She is on the left.. Unfortunately the clown who taped it didn't leave a lot of room in the frame for stabilization to work. I tried both Sony Stabilize and the Mercali free and both seem to crop inwards evenly from all sides of the frame. There is enough room if I had a packages that would show preference to the left side of the frame.

To make this rant short, is there any tricks I can use to get around this issue. I just need a little stabilization...

Comments

amendegw wrote on 12/30/2013, 11:48 AM
John,

You have several options that may-or-may-not make an acceptable clip.

1) Mercalli Pro allows you to adjust adjust the amount of stabilization to minimize the zoom.
2) Mercalli Pro has a border fill option that builds the border by blurring the edges (I don't recommend this, but mention it - just to be complete).
3) The Virtual Dub/Deshaker stabilizer has a nice feature that rebuilds the borders based on previous & future frames. (search this forum for "Deshaker").
4) A trick I've used with Mercalli Pro Vegas Plugins is to use a still of the first frame of the video event to build my own borders. Details are in the following thread: antishake software for Vegas

None of these options may produce an acceptable result, but they might be worth a try.

Good Luck!
...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

Mark_e wrote on 12/30/2013, 12:03 PM
I've started using Mocha Pro for that sort of thing you could probably track your daughter and then stabilise around that rather than a warp stabiliser. Mocha will also search backwards and forwards in the stabilise module and try and fill any gaps with matching data rather than just resizing everything or a combination of both depending on the scene. Also you can key frame the stabilisation so you take out as much or as little movement as you like.

Only down side is it's expensive :) I got mine in a black Friday deal and got half price upgrade from the hit film version that I had as part of the Sony suite so it wasn't so bad it's worth it just for that as well as all the other tools.

I think the trial is fully featured for 30 days might get you out of a spot, there a webinar about stabilization here http://vimeo.com/82428448 I'm actualy just about to watch it :) most times they go on about exporting to after effects etc but you can render out direct from mocha and use that in vegas it works fine.
Tech Diver wrote on 12/30/2013, 7:18 PM
+1 for Mocha Pro. It is one of my most-often used tools and can easily handle how your stabilization cropping is done.

Peter
John222 wrote on 1/3/2014, 4:56 PM
I looked at Mocha Pro, which looks great, but am I correct it only outputs vector points that I then have to take to another software package?

At this point I'm going to give VirtualDub with the Deshaker plugin a try. Another possibility would be the Legacy point tracker in Adobe After effects. I'm assuming the After Effects trial doesn't leave watermarks or reduced functionality.

A few more questions..

1. Should stabilization be done before contrast and color correction?
2. If I use VirtualDub, what should I output the file as? Avi?
johnmeyer wrote on 1/3/2014, 5:24 PM
1. Should stabilization be done before contrast and color correction?If you use the Deshaker script I wrote years ago, or the more user-friendly "new deshaker" version that put a nice user interface on my work, then all fX, including contrast and color correction, are removed before the deshaking in order to keep them from affecting the results. In fact, all keyframes (like pan/crop) are removed. These are then automatically added back when the deshaken footage is added to your project as a "take" because Vegas applies the same keyframes and fX to each take.

If you don't use the script and instead create the deshaken video the "old-fashioned" manual way, then you definitely want to do everything on the raw video (no fX or keyframes) and then add the result back to the event by "right-click-dragging" the deshaken video onto the event. This will add it as a take, and you can then switch back and forth between the original video and the deshaken video, both of which will have the same pan/crop keyframes and fX applied.

As for what codec to use for sending the video back to Vegas, the answer depends on your source video. For SD video I almost always use the DV codec ("dvsd" is how VirtualDub reports this codec, if you have it installed). You can always use HufYUV, although the files are large. You can also download the free Cineform codec from the GoPro page and use that. It works with SD and HD. The free version doesn't let you use the "ultra professional" presets, but it is still pretty good. From your description of the original video (taken by a "clown") I am assuming that this will be good enough.

Since borders are the main issue, make sure to enable all of Deshaker's border enhancements in the "Pass 2" section: Edge compensation: none (large borders); Use previous and future frames ... checked and set to 30 and 30; Soft Borders checked and set to 10; and Extrapolate Borders checked. The last two don't do much, but can make things look a little better.

If your video has people close to the camera and entering and leaving the frame frequently (as it sounds like you might) Deshaker may still give you some "weirdness" around the borders. This simply cannot be helped because it can't make something out of nothing, even when using adjacent frames. In cases where it fails, you can undo the deshaking and then cut the event into smaller events, stabilizing some of the "sub events" and not stabilizing the events where the deshaking failed in your initial stabilizing attempt. This trick works because Deshaker always leaves the first and last frame of the event unchanged, so you can "b u t t together" stabilized and unstabilized portions of an original event without any jumping where the unstabilized footage ends and the stabilized footage begins (or vice versa).

Byron K wrote on 1/3/2014, 10:14 PM
I have also used the "artificial frame" for stabilizing images from people who've provided me w/ shakey video that was too close to the edge of the frame. Has worked pretty good. I've also just pan cropped the stabilized video w/ the frame of the un edited video in the background w/ gausian blur and that seems to work out pretty well. I've seen this technique used w/ lots of news clip footage.

Not sure about the free Mercalli but the full version allows you to stabilize vertical or horizontal shake.

If you have a short clip of the shakey video maybe you can post and I can see if Mercalli can work.
John222 wrote on 1/3/2014, 10:45 PM
I can't get virtualDub to recognize my .mts file. I've installed directshow, haali and ffdshow.
PhillB wrote on 1/4/2014, 2:46 AM
This may sound a little obvious, but make sure you create a sub clip of the footage you want to stabilize and loose any wild camera movements from the start or end etc. which will improve the crop. Remember by default Vegas tries to stabilize the whole clip not just what you see on your timeline.
Alternatively if you have Hitfilm, Mocha is very good at stabilization.
John222 wrote on 1/4/2014, 6:12 AM
My clip is only 3 minutes long.
PhillB wrote on 1/4/2014, 6:21 AM
Hi John,

The point is that you usually trim the clip on the timeline as part of your edit, but when you stabilize Vegas selects the whole clip which can mean you end up with a large amount of crop because its trying to stabilize footage that your not even using using that may contain large movements.
Grazie wrote on 1/4/2014, 6:27 AM
I'd be happy to have a go using Mercalli SA Pro 3.

Grazie

John222 wrote on 1/4/2014, 10:04 AM
Thanks Grazie. But I just got VirtualBub / Deshaker to work. Still tweaking a few setting, so lets see how this works out.
Grazie wrote on 1/4/2014, 10:11 AM
Excellent!

G
NormanPCN wrote on 1/4/2014, 2:56 PM
This may sound a little obvious, but make sure you create a sub clip of the footage you want to stabilize and loose any wild camera movements from the start or end etc.


Nice tip
John222 wrote on 1/4/2014, 3:18 PM
Deshaker worked great without any apparent loss of border on any side. I used the 30 frame preview setting. Now I'm playing around with the audio sync issue. I made a 30 frame black clip and appended it after the first pass and it got the sync pretty close but not perfect. Right now I'm trying the other option of adding 1000ms delay to the audio. I'll see how that works out all little later.
Grazie wrote on 1/5/2014, 1:20 AM
Good for you! - Anne Isabella Ritchie, the daughter of William Makepeace Thackeray, in "Mrs. Dymond" includes this line:-

" . . . if you give a man a fish he is hungry again in an hour; if you teach him to catch a fish you do him a good turn."

Grazie


WillemT wrote on 1/5/2014, 3:46 AM
@ John

I do not know which version of VirtualDub or Deshaker script you use, and whether you use one of the Vegas scripts or not.

However, the last few versions of VirtualDub and Deshaker will automatically compensate for the 30 (or other) frame offset and deliver a final clip with timing the same as the original. No need to add black frames at the end of the source either.

Willem.
John222 wrote on 1/5/2014, 8:48 AM
I am using Deshaker 3.0 64 and VirtualDub 1.10.4 _AMD64

Audio is slightly delayed. When I manually sync, this is how much it's off...

http://i1072.photobucket.com/albums/w370/jetta4sale2/Deshaker1.png
WillemT wrote on 1/5/2014, 10:02 AM
@John.

I use the 32bit versions of VirtualDub (used to be 1.10.2 but have just updated to 1.10.4 and it seems to work fine) and 3.0 for Deshaker. (My VD plugs are all 32bit). I use the Canopus codecs between Vegas and VirtualDub.

I do not include the audio and only process the video when using Deshaker. I also use a Vegas script (a modified version of the original John Meyer script) which returns the "deshaken" event as a take to the original timeline event. From what I can see it is a frame for frame (deshaked) version of the original hence the original audio should still be in sync.

I just did a check by manually rendering an AVI event including the audio and processing it with VirtualDub and Deshaker, then checked the resultant event to the original. I cannot see any audio shift between the Deshaked and original events.

The audio shift you show is definitely not a 30 frame one, hence I do not know what causes it.

Willem.

John222 wrote on 1/5/2014, 11:16 AM
I tried it video only and then replaced the audio. Same out of sync problem by 100 to 130ms.
WillemT wrote on 1/5/2014, 12:31 PM
I cannot explain the sync problem. As I said my test has the frames and audio identical to the original event for both the Vegas script and manual deshake with audio.

Edit: Just tried it with the 64bit versions. All audio still in sync.

Willem.
John222 wrote on 1/6/2014, 8:54 AM
I think I'll re-install both VirtualDub and Deshaker and try this over again. Deshaker is perfect for this close cropped event. But, I'm seriously considering Mercalli 2 Pro for all my other needs if I can't solve this sync problem with Deshaker.

Anyone know if you can upgrade from Mercalli Free to Mercalli 2 Pro for $99. You can do it from the Mercalli Easy version, but not sure about free.
Grazie wrote on 1/6/2014, 9:23 AM
John222: " . . . .seriously considering Mercalli 2 Pro for all my other needs if I can't solve this sync problem with Deshaker. "Again, the offer is still there . . Least ways getting me to pass it thru Merc, you can convince yourself if Merc can come thru for yah? I have both Merc Pro2 and 3.

I can invite you to drop it in a DropBox.

Grazie



John222 wrote on 1/7/2014, 9:27 AM
Thanks Grazie, but reloading the software did the trick. Deshaker did a pretty good job stabilizing it and an excellent job preserving the borders.

I also installed the trial version of Mercalli V3 SAL and I'm very impressed with it. However, for this clip deshaker worked best to preserve the borders. But for everything else Mercalli is a win. I found a good price on BH Photo, so I plan to buy it next month when my trial runs out.