OT:An additional DeShaker tweak

riredale wrote on 6/6/2008, 8:27 PM
I've just finished my latest Tour video, and this time I tried out John Meyer's DeShaker script. Wow! What was once about 7 steps for every single DeShaken clip is now just a matter of selecting a clip (or series of clips) and then hitting the script button.

There are always going to be requests for improvements, of course. It would be nice to be able to access the DeShaker settings in a logical way. It would also be nice to be able to specify other preferences without having to get into the Javascript. Still, what an amazing improvement.

One thing every DeShaker user discovers eventually, however, is that even DeShaker can't work perfectly on all material. There are times where parts of the resulting clip exhibit sudden "jumps" due to large areas of the scene moving in certain ways. For example, one of my handheld shots follows people out of a subway car on the Paris Metro. Everything is wonderfully stable until a large woman crosses my path, which momentarily confuses DeShaker. It makes a couple of jumps until finally settling down again.

One can, if so inclined, go into the settings and tell DeShaker to only focus on a specific portion of a scene, then focus on another portion, and so forth, avoiding the large lady. This works but is fairly labor-intensive. An alternative technique works almost as well and is relatively easy to do:

(1) Isolate the error on the timeline and mark it.

(2) Switch to the original take, double-click on it, and paste it to a new track just above. That new clip will be in sync with the DeShaken one.

(3) Split the DeShaken clip on either side of the glitch and remove the offending portion.

(4) Replace the missing segment with its cousin from the original clip.

()5) Blend the edges to minimize the transitions.

Since there is usually major stuff happening in the field of view when DeShaker flakes out, I've discovered it's relatively easy to substitute back the original clip and dissolve the two transitions relatively transparently. The result is a very smooth video with no obvious glitches.

Comments

Jim H wrote on 6/6/2008, 11:15 PM
Sounds like you got it down... would like to see an example?
johnmeyer wrote on 6/7/2008, 7:29 AM
Look at the first half of the following post for information that is very pertinent to what you are doing:

Deshaking part of a clip
riredale wrote on 6/7/2008, 3:34 PM
Sigh...you're right. I haven't tried it out yet, but in theory one can split just before and just after the offending section. then deshake the first and third chunks. I suspect this will work great.
alfredsvideo wrote on 6/7/2008, 3:42 PM
Where can I buy Deshaker from?
jrazz wrote on 6/7/2008, 4:00 PM
Sorry, it is not available for sale. You can only obtain it freely. :)

Here it is.

j razz
riredale wrote on 6/11/2008, 7:57 PM
Yup, splitting a shaky video just before and just after a trouble spot works fine, making the use of DeShaker even simpler.

One caveat, though--DeShaker works so well, it can be pretty obvious when the resulting video shifts from smooth to shaky to smooth. A little experimentation shows the best places to make the splits.

As mentioned before, all that would be desirable now is a simple way of getting to the DeShaker parameters. John, do you want to play with this further? The most powerful approach would be to somehow call up the actual DeShaker configuration pages--is this possible?

Another improvement would be to be able to easily specify where the DeShaken files should go.

Anyway, I have just finished my latest 2+ hour video project, and I used the DeShaker script dozens of times in it. Neat.
johnmeyer wrote on 6/11/2008, 10:26 PM
John, do you want to play with this further? The most powerful approach would be to somehow call up the actual DeShaker configuration pages--is this possible?Possible, yes. I actually started on this a year ago. You can download and run this script to see the result of that effort:

Deshker Inside of Vegas

The dialog looks very intriguing, but I guarantee you that it doesn't do anything. I never hooked it up because I realized that this actually wasn't the right way to solve the problem of letting you specify deshaker parameters, because it wasn't very interactive. However, before I could code the "right" way to solve the problem, I got fed up and that was the end of it. If someone else ever wants to take up the challenge (I actually did this by building on what someone else had started), then I'm all for it.
robbie75 wrote on 3/10/2009, 3:32 AM
Hallo John, and thanks again for this incredible tool.
I'm trying the deshaker in Vegas Pro 8.1 but when i launch the script it says:

Despite planning for all possible contingencies Deshaker script had the following error:
Error: Value cannot be null.

What am I doing wrong?

This is my edited part in the script inside vegas script folder, all the rest is in c:\ as default

// ***** USER MODIFICATION AREA ****
//
// These six variables can be set by the user (that's YOU)
// (This would be a good place for some simple UI work, so these
// could be set via a dialog box!!)

var VIRTUALDUB : String = "C:\\Deshaker\\virtualdub.exe"; // Set to path where VirtualDub resides.
var DESHAKE : String = "/x /i \"C:\\Deshaker\\plugins\\deshake.vds\""; // Set to path for VirtualDub Deshaker script (that works with this script).
var FILLFRAMES : int = 30; // Set equal to "previous" and "future" frames in Deshaker.
var VegasRenderTemplate : RenderTemplate = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("Default Template (uncompressed)");
var OverrideDeshakerParams : String = "none";
var VirtualDubCompressor : String = "xvid"; // Uncompressed

// Use one of the following lines instead of line above, for other VirtualDub codecs.
//var VirtualDubCompressor = "cfhd"; // Cineform
//var VirtualDubCompressor = "dvsd"; // MainConcept DV
//var VirtualDubCompressor = "hfyu"; // HuffYUV
//var VirtualDubCompressor = "xvid"; // XviD
//
// **** END USER MODIFICATION AREA ****


Thanks for your help. It's very important for my job to have this thing working.
farss wrote on 3/10/2009, 3:16 PM
Seeing as how no one else has chimed in....
John, as they say, left the building some time ago.

I have used Deshaker following his advice but not inside of Vegas. I simply rendered the portion of the video that needed smoothing out to an uncompressed AVI and processed that in VDub. Other codecs such as Huffy should work without eating up so much disk space as well.

Bob.
wm_b wrote on 3/12/2009, 11:37 AM
I'm trying to figure out how to change the temp directory where the deshake.avi is rendered. The C drive on my laptop doesn't have much space and only the smallest clips can be deshaken before the drive fills up.

I've looked at the script file and can't find a clear place to make that change. Someone has to have run into this. Any ideas?

Thanks, William
JJKizak wrote on 3/12/2009, 3:14 PM
Place the script into notepad then change this file from: var TMPFILE: String=objEnv("TEMP")+ "\\deshake.avi";

To this line
var TMPFILE: String= "E:\\temp\\deshake.avi";

You can substitute for the letter "E" whatever drive you want.
I'm not sure about the quotes as this website changed them to actual quotes.
To get it to work in Vista 64 bit change the 12 scripts drives to read:
D:\\visvirdub\\deshaker.log which appears in very long strings so you are only changing a portion of that string.

And substitute whatever drive you want at the beginning letter.

JJK
tonyatl wrote on 3/16/2009, 6:12 PM
What am I doing wrong? Im running Vegas 8, I downloaded Deshaker and put the .js file in my script menu folder. I highlighted a clip and ran deshaker. It starts rendering when it gets to the end of the clip for the first pass. Im assuming that because 50 percent of the time is still there. It goes black and I get
error the system cannot find the path specefied

What am I doing wrong thank you :)
JJKizak wrote on 3/17/2009, 6:11 AM
tonaytl:
If your running Vista the log files must be changed in the script or the second function in the Deshaker will go black. Check the previous threads for how to do.
JJK
tonyatl wrote on 3/17/2009, 6:04 PM
Im running xp pro Im sorry I didnt mention that.
AtlantaJoe wrote on 3/17/2009, 6:21 PM
I'm running Vegas Pro 8.1 (64bit) on Vista and had to edit DESHAKER.JS to finally get it to work. Also, had to SAVE the project before running the script. Otherwise, the script didn't appear to pickup the name correctly.

BEFORE:
var VegasRenderTemplate : RenderTemplate = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("Default Template (uncompressed)");

AFTER:
var VegasRenderTemplate : RenderTemplate = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("Project Settings");

tonyatl wrote on 3/17/2009, 9:24 PM
now it wont even go that far. I select a area and it says no video events selected. is there a deshaker for idiots section. lol
AtlantaJoe wrote on 3/18/2009, 3:03 PM
Are you using version 8.1 ?

Also, if it is a new project, try saving it first. I had to do that.
tonyatl wrote on 3/18/2009, 5:24 PM
vegas 8.0 32 bit
Kevin Mc wrote on 5/6/2009, 4:51 PM
Is there any way to have the deshaker output compressed AVI files? I have a large project with many shaky clips and need to process much video. The output files are quite large as uncompressed AVI's.

I did install the Panisonic codec ~ but cannot see it in VirtualDub's Save or Export options, or figure out how to access it as part of my default settings ~ or if it can even be set as the default output codec??

Me>|<Brick wall

Any help would be greatly appreciated.

Andy E wrote on 5/6/2009, 10:23 PM
There's a line in the old deshake.js that reads:


var VirtualDubCompressor : String = "0"; // Uncompressed


Change that to read:


var VirtualDubCompressor : String = "dvsd";


Alternatively download my updated script from here:

http://homepage.ntlworld.com/a.edmiston/deshaker.htm

and stick dvsd in the VirtualDub Compressor box.

Don't worry about too much about the initial uncompressed renders out of Vegas - the files are temporary and will be deleted anyway.
Kevin Mc wrote on 5/7/2009, 2:50 PM
Thank you Andy! I hadn't realized someone had picked up where John M. left off. Thanks for that!!! I'm trying the new code now. Much appreciated.

--Kevin