Deshaker Vegas Script - back again

johnmeyer wrote on 5/22/2007, 8:51 AM
[Edit] OK, I put a newer version of the script back on YouSendIt (link good until April 25, 2008):

Vegas Deshaker Script

Some services seem to be deleting the "EXE" extension from the file. If so, you must rename the file to "deshaker.exe" before you can use it.

I'll add a new post at the end of this thread to describe the changes.


Comments

vicmilt wrote on 5/22/2007, 9:16 AM
Great stuff, John - I stand in absolute awe of you programmer dudes.

I'm going to try it out, immediately, but... will this work with the updated DeShaker 2.2?
I'm trying THAT right now and brother it is FAST!

Re-doing a file that took 2 hours using old Deshaker - and it sez it's only going to take 32 minutes - yikes! And this is with my trusty Pentium 920. I'm getting to the final decision on an upgraded edit system even as we speak. It looks like the Q6600 will be the final winner (unless someone from this site pipes up with a "better plan". The Q6700 got shot down by my builder tech saying the speed increase to money increase just ain't worth it. Again I'll keep the forum up to date on this continuing saga, as I assume everyone will eventually have to take these steps... eventually.

I'll update through the course of today, reporting my results with the new DeShaker integrated with your revised scripting.

v
JJKizak wrote on 5/22/2007, 10:21 AM
Does it matter if you don't have the latest Virtual Dub?

JJK
johnmeyer wrote on 5/22/2007, 12:09 PM
Everything (Deshaker 2.0, scripts, VirtualDub) are in the download. Because this is a three-cornered billard shot, with Vegas, VirtualDub, and Deshaker, and since none of these products makes any pretense at keeping the scripting interface the same from one release to the next, the only way this has any hope of working is to put them all together. I have not tested, and do not expect that this will work with Deshaker 2.2, although it might not be much work to make the changes -- possibly only a few minutes. However, I'll wait and see if anyone really cares before I do any more. So far, the only feedback I got was negative ...

jrazz wrote on 5/22/2007, 12:34 PM
John, Here is some positive feedback for you. I'll be sure to use it and greatful for someone who knows how to do this stuff, like VicMilt said. I too would be interested in this working with the newer version. I would assume that the old tutorial you put out for SD deshaking will work with the new version as well with HDV given the proper tweaks for HD?

j razz
Laurence wrote on 5/22/2007, 1:15 PM
Well, I downloaded it before it was taken off. No it doesn't work for me either, but I expect in the long run it will. This will be one of my favorite Vegas features, so I will be patient and do whatever it takes to get it working on my system!
vicmilt wrote on 5/22/2007, 2:57 PM
Yikes - it worked perfectly for me...
see the other thread.

I just need to find the way to adjust the second pass parameters manually in the script (could not find the VCF file)
johnmeyer wrote on 5/22/2007, 7:24 PM
I just need to find the way to adjust the second pass parameters manually in the script (could not find the VCF file)

1. Find your render template in the case statement area of the script (see code snippet below).

2. Open VirtualDub, load Deshaker, and set BOTH your pass 1 and pass 2 parameters exactly how you want them. Click on OK until you get the main VD screen. Then click on "Save processing settings ..." to save those settings.

3. Open Notepad and then open the VCF file you created in step 2.

4. You will find a line that looks like this:

VirtualDub.video.filters.instance[0].Config("9|1|30|4|0.911585|2|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15");


5. Copy everything between the quotes, including the quotes. Then, replace the equivalent text in the Vegas script, in the section you located in step 1.

I was going to create a dialog, in the Vegas scripting language, that looks identical to the deshaker dialog, so you could change all these settings from within Vegas, without going through this step. However, given that what I thought was a "bulletproof" setup has turned out to be very difficult for people to use makes me glad I didn't take that extra step.

Hopefully you'll get the results you desire. It certainly is about as slick as anything can be to simply select the events you want, make one click of the mouse, and a few minutes (or hours for long events) later have everything inserted as takes. It is a lot of fun to loop the video and then press "T" over and over to do live switching between the original and the deshaken video.

If anyone of the few people that downloaded the package ever figure out why it didn't work (i.e., you end up getting it to work), I'd sure like to know what is causing the problem. I suspect that it is caused by installing in something other than the c:\ directory. If properly installed, this is how it should look:



Good luck!


switch (dHeightProject) {
case 576: // PAL
if (Vegas.Project.Video.PixelAspectRatio < 1.1) { // Normal aspect ratio
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("PAL DV");
DeshakerParams = "9|2|30|4|1.09402|1|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
}
else { // PAL Widescreen
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("PAL DV Widescreen");
DeshakerParams = "9|2|30|4|1.45869|1|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
}
break;
case 1080: // HDV
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("HDV 1080-60i intermediate");
DeshakerParams = "9|2|30|4|1.33333|7|1.33333|7|1440|1080|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|1|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
break;
case 480: // NTSC
if (Vegas.Project.Video.PixelAspectRatio < 1) { // Normal aspect ratio
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("NTSC DV");
DeshakerParams = "9|1|30|4|0.911585|2|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
}
else { // NTSC Widescreen
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("NTSC DV Widescreen");
DeshakerParams = "9|1|30|4|1.21545|2|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|1|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
}
break;
default:
template = Vegas.Renderers.FindByName("Video for Windows").Templates.FindByName("Default Template (uncompressed)");
DeshakerParams = "9|1|30|4|1|0|1|0|640|480|1|2|1|3000|3000|3000|0|4|1|0|2|5|40|300|4|c:\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|99|99|99|15|1|1|30|30|0|0|0|0|1|0|0|10|1|15";
}
johnmeyer wrote on 5/23/2007, 10:02 AM
I put a newer version of the script on YouSendIt (link good until July 17, 2007):

Vegas Deshaker Script
This new version fixes the bug that caused problems when storing VEG files in folders names that contained spaces. Delete your old version.

Other improvements:

1. Now sends each media to VirtualDub in a format based on original media properties, and not on Vegas project properties. This lets you include different format media in the same project (e.g., HDV and DV), and still have them all handled correctly.

2. Progressive video is now handled (although I did not include a preset for 720p HDV, since I don't have access to this video).

3. You can now include your own Deshaker settings by changing the "OverrideDeshakerParams" variable at the beginning of the script. There are six variables that are all placed at the beginning of the script that can be used to alter behavior. If I get time, I'll try to include a dialog to make it easy to set these variables (no promises on that one, though).

4. All rendering is now done using the uncompressed templates. When going from Vegas to VirtualDub, this has the huge advantage that the uncompressed template is the only template in Vegas that adapts to project properties. Thus, by temporarily changing project properties to match the media properties, I can control the properties of the template. This means absolutely nothing to those of you that don't write Vegas scripts, but it turns out that Vegas does not let the script writer control the render templates. Bottom line is that even though I provide a variable in the "user setting" section of the script where you can specify a render template for Vegas to use when sending video to VirtualDub, I would advise you to just let Vegas use "uncompressed." While these files are huge, only one is created for each event, and is deleted immediately after that event is "deshaken." Thus only one uncompressed Vegas file exists at any one time on your hard drive.

5. You can certainly specify a different compressor for VirtualDub to use if you don't want to have the huge disk space penalty of having VirtualDub use uncompressed for its "codec." You'll have to follow the directions in the script for doing that. The other advantage of doing this is that the playback on the Vegas timeline will be faster.

The deshake.js file contains more instructions (open it in Notepad).

I hope this works for all of you this time around.
Nobody wrote on 5/26/2007, 10:57 AM
John,
Thanks for all of your hard work.

I got talked into shooting a wedding this weekend. The bride said that she has friends who will be shooting footage before the ceremony ( people getting ready, etc.) as well as during the reception. As I'll be incorporating this footage into my project, I'm sure your script will be a life-saver.

:-)
DrLumen wrote on 5/26/2007, 12:34 PM
I'm going to try it now. I DL'd it a couple of days ago but haven't had a chance to try it.

I've never tried a deshaker before. This ought to be cool.

intel i-4790k / Asus Z97 Pro / 32GB Crucial RAM / Nvidia GTX 560Ti / 500GB Samsung SSD / 256 GB Samsung SSD / 2-WDC 4TB Black HDD's / 2-WDC 1TB HDD's / 2-HP 23" Monitors / Various MIDI gear, controllers and audio interfaces

Tom Pauncz wrote on 5/26/2007, 3:59 PM
John,
This is absolutely great. Works a treat as distributed, but I cannot get it to work when I try to override the defaults.

Followed the steps to a 'T', by saving the processor setting and copying the string from the .VCF file into the 'deshake.js' file.

I also tried leaving the override section as is, and copying the string directly to the appropriate case block, but either way it fails.

The settings I am trying are the ones from your tutorial from way back when....

Here's the error from the pop-up:

An integer division by zero occurred in module 'Deshaker'...
...while starting filter "Deshaker v2.2" (FilterSystem.cpp:437).

And yes, I have changed the the .VDS file as appropriate for Deshaker v2.2. the failure is the same whether I use v2.0 or v2.2.

Any thoughts would be much welcome.
Cheers,
Tom

Update:
Never mind John. I think I found it. I am using the latest Vdub (1.7.2) and it appears to save the settings with '11' as the first parm. Changing it to '9' as in the script file, fixed it. No idea what the difference is, tho'.
johnmeyer wrote on 5/26/2007, 5:26 PM
Warning to all: the reason I distributed everything (VirtualDub, Deshaker, the VD script, and the Vegas script) as a package is that this is a three-cornered billiard shot. None of these programs makes any representation that the script interface will stay the same from one version to the next. Vegas has broken earlier scripts each and every time they have updated. The VD readme states quite clearly that the VD scripting is unsupported and could radically change or disappear altogether in some future release. The Deshaker plug-in doesn't even know about scripting.

So, if you want to try using different versions of things, go ahead, if you are willing to make the changes necessary (like the setting strings, as you found out.

I don't think there is any advantage to the later version of VD (actually, that is a beta version, so it may have problems; the one I distributed was the latest "released" version as of a week ago). The 2.2. Deshaker will be much faster on multi-CPU or multi-core computers (but otherwise has only a few advantages). It is probably worth updating if you have the CPUs, but it came out literally on the same day I released this script, so I didn't have time to switch.

Finally, to everyone in this thread, make sure you download the latest release which you will find in the updated link in my first post in thread.
ro_max wrote on 5/28/2007, 3:53 AM
John, are you planning to update the script to work with 2.2? Multi-core or multi-cpu support would benefit a lot of people.
CClub wrote on 6/1/2007, 9:11 AM
Any chance of being able to download this whole package still (programs along with script)? I hadn't been following this posting and I would really like to try this system. Thanks.
johnmeyer wrote on 6/1/2007, 11:21 AM
Any chance of being able to download this whole package still (programs along with script)? I hadn't been following this posting and I would really like to try this system. Thanks.

Go back to my first post at the top of this thread and download. I uploaded again, so the link will be good for another seven days. Someday I'll quit being so cheap and rent some permanent space somewhere.
Grazie wrote on 6/1/2007, 3:42 PM
John, yesterday I was out with my newly acquired 2x tele Century adaptor. The kinda glass you HAVE to mount ion a tripod - preferably set in quick drying cement - got the picture? What i DID do to test it, was use my SpiderBrace and my own 5 quid monopod steadying device.

Anyways, I was able to close in on some wild Green Parakeets that frequent London nowadays. And yes the footage was shaky -nice shots, but shaky.

What can I say? Your script and on a further pass these cheerful chappies are quite watchable indeed.

Thanks again John! You HAVE extended my "reach" and allowed me to do shots that would needed me to schlep a tripod about. The 2x is on my Canon XM2 - that's about 40 optical? Yes? Too kewl . ..

It was somebody else hereabouts that said: Hey we are shooting DV? Let's make the most of it! Yeah?

Grazie

johnmeyer wrote on 6/1/2007, 6:11 PM
Glad it's working so well for you. It is always nice to hear such things.
Grazie wrote on 6/1/2007, 9:20 PM
Glad it's working so well for you. It is always nice to hear such things.

Speak as I find . .. speak as I find! ;-)

Serena wrote on 6/24/2007, 11:01 PM
John,

Will you be able to add your script to your DEShaker procedure on the VASST site?
JackW wrote on 6/26/2007, 12:24 PM
Thanks for all your work, John. It's a great plug-in and, as a long-time pool player, I appreciate the "three-corner" approach.

Jack
JJKizak wrote on 6/26/2007, 2:08 PM
After downloading the new script file and trying to open it, it will not open with anything I have to install in V7.0E. I must be missing something as I have Virtual Dub and Deshaker installed.
JJK
winrockpost wrote on 6/26/2007, 3:03 PM
Add a .exe to the file.

I feel in the presence of greatness,,, freakin great work !! ,, playin with it for only a half hour or so on a current project with a couple a short handheld crappy clips i was plannin on running in VD at the usual cumbersome pocess ,, one click ,no crappy no more,

thank you Mr. M
vicmilt wrote on 6/27/2007, 5:23 AM
John -

I've got tons of on-line storage available.

Write me at vicmilt at victormilt dot com and I'll be happy to give you a page for this incredible software -

and thanks again for all your work.

v
Mahesh wrote on 6/27/2007, 9:40 AM
Waiting patiently for the download - hopefully, very soon :)