OT - DeShaker Batch render?

Comments

riredale wrote on 5/21/2007, 6:10 PM
Or for that matter I can always go into the script and manually modify it myself to make two different scripts I can call, each one working with a differently-named log file.

My only other very tiny quibble would be the location of the workfiles. I was told from the perspective of housekeeping to never save anything to a root file on the C drive.
johnmeyer wrote on 5/21/2007, 11:32 PM
My only other very tiny quibble would be the location of the workfiles. I was told from the perspective of housekeeping to never save anything to a root file on the C drive

I've put as much time as I can into this. It's done, but I want to send it to the original author first to see if he has anything to say.

I never put anything on the C: drive either (other than Program Files), but I wanted an install that was dirt easy. If you have any programming skill, you can just edit a few lines in the script file and move everything somewhere else.
douglas_clark wrote on 5/22/2007, 1:31 AM
Download new version 2.2 at http://www.guthspot.se/video/deshaker.htm.

I'll put the changelog in a new thread.

Home-built ASUS PRIME Z270-A, i7-7700K, 32GB; Win 10 Pro x64 (22H2);
- Intel HD Graphics 630 (built-in); no video card; ViewSonic VP3268-4K display via HDMI
- C: Samsung SSD 970 EVO 1TB; + several 10TB HDDs
- Røde AI-1 via Røde AI-1 ASIO driver;

johnmeyer wrote on 5/22/2007, 8:45 AM
[Edit] I guess the script didn't work as expected (works great for me but ...) so I removed the link. I didn't want to waste anyone's time, including my time supporting people that might have problems.

In the end, I created a great timesaving tool for me (one-click deshaking is pretty nice), and I learned a lot more about what you can do with scripts.
briggs wrote on 5/22/2007, 9:53 AM
John,

Many thanks for your work on this. Comes at a perfect time for me!
vicmilt wrote on 5/22/2007, 1:35 PM
Johnmeyer -

The script worked like a dream (best day of the week - thanx!) -

two things:

I could not find the VCF file to alter the various Pass 2 parameters - is it called something else or does it reside somewhere else besides the original folder?

And - having never used "Takes" before... where is that revised "Take 01" stored? Can I get it to use in other edits? Or do I have to re-render it?

I can't imagine how much aggravation you have saved me and many others to come.

v

vicmilt wrote on 5/22/2007, 2:47 PM
So for those of you following this thread, and wondering what all the hoohah is about, here's the proof.

Check out this sample footage -
www.quitwh.fatcow.com/DirectorCameraman/HousesSloMo.wmv

It was shot with a Sony Z1 - stabilized with a Kenlab gyro - handheld out the open door of a tiny R44 helicopter.

The first part of the demo is the raw "as-shot" footage.
The second part is the exact same footage, DeStabilized and then slow motioned in Vegas, 45%.

All the above done with the help of forum members with a SPECIAL thanks to JohnMeyers without whom I would never have had the patience to finish. And his new "auto" software script heralds hours of computer babysitting (which is how I've been working up til this afternoon) totally banished. Now you simply select your "bad" footage and let John's script do the rest - wow!

v
johnmeyer wrote on 5/22/2007, 7:39 PM
I could not find the VCF file to alter the various Pass 2 parameters - is it called something else or does it reside somewhere else besides the original folder?

See my response in the other thread. There is a VDS (VirtualDub Script) file which, if you open it in Notepad, will look a lot like the VCF file. You probably should follow the directions in the other post because if you try to edit the VDS file, you'd have to put your settings in twice (once for the first pass and once for the second). They are identical except for one digit that changes from 1 to 2 (it's the second setting).

And - having never used "Takes" before... where is that revised "Take 01" stored? Can I get it to use in other edits? Or do I have to re-render it?

You can open the "deshake.js" script in Notepad and you'll find lots of instructions. It describes the fact that every one of the "deshaken" video files is stored as an AVI in the "deshake" folder that is created in the folder where you saved the VEG file for your project. Just open that up and look at all those wonderful AVI files!! You can use them in any other project. You can drop any AVI file onto any event (right-click and drag) and it will become a "take."

David, the original author, came up with a way to simply number them sequentially. I couldn't think of any better way. However, I can imagine that trying to find a particular video simply by looking at "0035.avi" might be a chore. I am open to suggestions as to how to automatically name these files in a way that might be more helpful.

I can't imagine how much aggravation you have saved me and many others to come.

As it turned out, I apparently created aggravation because it didn't work for about half the people that tried it. I still can't understand why.

It was shot with a Sony Z1 - stabilized with a Kenlab gyro - handheld out the open door of a tiny R44 helicopter.

I have been looking at RC (radio controlled helicopters) for doing aerial shots. At first I thought that was what you were doing, but I see that the R44 is the real deal. Too bad. I'd still like to rent an RC and see what I can do.
vicmilt wrote on 5/22/2007, 9:38 PM
Ah HA!!

At last a way to thank you...
two of my Milt Video Library movies are totally directed to RC enthusiasts.
One - Model Helicopters - is a really neat "build and fly" - totally compete although a litte dated.
The other (if you are a "real heli pilot" you will love - "Advanced Heli Flight course" featuring crack pilot Datu Ramel.

Please email land address to [ removed for spam safety ]

It's the least I can do -
FWIW your script worked for me with DeShaker 2.2 (the new one).
Don't know if that helps.

v
johnmeyer wrote on 5/23/2007, 1:21 AM
First, go back and remove your email from the last post, or the spammers will get you!

Second, I found the bug in my script and I now understand why it caused some people problems, but not others. If the path or file name to which you save your Vegas VEG file has any spaces in it, then the VirtualDub script (which is based on an extremely crude scripting language) goes nuts. Normal, "robust" scripting languages don't have this problem and that's why I missed it.

Until I get this fixed (actually it is fixed, but I'm adding a few other things), the few people that downloaded this need to make sure that they save to directories with names like:

e:\myfolder\myproject.veg

or

e:\my_folder\my_wonderful_project.veg

Problem names to be avoided (until I get the fix) would be things like:

e:\my folder\my project.veg

Any space in any folder or file name causes the problem (actually, the file name can have spaces, but not the folder ... )

Thanks for your kind offer. I'll take you up on that one.




MH_Stevens wrote on 5/23/2007, 9:41 AM
Isn't this what happened when the United Society of Believers in Christ's Second Appearing moved to Jamaca?
johnmeyer wrote on 5/23/2007, 9:55 AM
I have put a fixed version of the script back on YouSendIt. Link good until July 17, 2007:

Vegas Deshaker Script

This 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.

[Edit May 25, 2007]

0.7.1 Now keeps the audio with the deshaken video.
Resets PAR to match input PAR (PAL uncompressed widescreen changes PAR to 4:3!)
Resets field order (PAL uncompressed always reverses fields!)
Provides error message if no event selected
Laurence wrote on 5/23/2007, 2:20 PM
Well it's working great for me now! I did the modification for Cineform and Main Concept DV files and saved them under different script file names ("Deshake Cineform" and "Deshake DV").

Now my only issue is with the temporary uncompressed file. It seems like for someone like me who is going to use one exact format of Cineform (Neo HDV at 1440x1080x60i) that I can do a version of this that will smartrender and pass the clip between the applications in this one exact format.

I will probably end up with four variations of the script. One exactly as it is for mixed or unusual formats. One for 1080i Cineform. One for SD NTSC 4:3 and one for SD NTSC 16:9.

I can't express how happy this makes me. There are times when deshaken footage makes all the difference in the world, but I've been avoiding it because of all the timeconsuming steps. This will improve the quality of my work and work experience immensely.
Opampman wrote on 5/23/2007, 2:29 PM
Just tried the new version and it works great! What a great time saver. Great work John and all!
Laurence wrote on 5/23/2007, 2:30 PM
Just to confirm, the clips on the timeline are supposed to be uncompressed right?
johnmeyer wrote on 5/23/2007, 4:16 PM
Just to confirm, the clips on the timeline are supposed to be uncompressed right?

If I understand your question correctly, the answer is no. Put any clip on the timeline you want. That is the whole idea of this. You have an HDV m2t file? Put it on the timeline. You have a NTSC Widescreen DV file? Put it on the timeline. Select whatever events you want, and then let deshaker do its thing. Vegas then renders each event, one at a time, to an uncompressed file that is then read by VirtualDub (more on that below). VirtualDub and Deshaker then do their thing and send a deshaken file back to Vegas. The default is for that file to also be uncompressed, but the notes in the script file (deshake.js) tell you which one line to modify to change that. If you have a lot of deshaking to do, then it might be worthwhile to change the "VirtualDubCompressor" setting to one of the other compressors. There are two example lines in the script file, just below the section which is labeled "***** USER MODIFICATION AREA ****" which show you how to do this.

It seems like for someone like me who is going to use one exact format of Cineform (Neo HDV at 1440x1080x60i) that I can do a version of this that will smartrender and pass the clip between the applications in this one exact format.

If you want Vegas to pass this format to VirtualDub (although I am not sure there is much advantage to doing so, since each uncompressed outgoing file is deleted as soon as that event is deshaken), then edit the VegasRenderTemplate variable in the user mod area. All you need to do is change the FindByName part of the definition. The name you use is the exact name given in the Vegas template area. You can avoid having to type this name by first selecting the template, then selecting the Custom button, and then you can select the preset name at the top of the dialog and press Ctrl-C to copy it. Paste it into the script to overwrite the existing "Default Template (uncompressed)" name.

I can't express how happy this makes me. There are times when deshaken footage makes all the difference in the world, but I've been avoiding it because of all the time consuming steps. This will improve the quality of my work and work experience immensely.

Thank you both for your kind comments. That is why I do this, and it really helps to hear words like that.

Grazie wrote on 5/23/2007, 4:26 PM
Well, this is most odd.

1 - The script goes ahead and does its work. I( see several "windows" with the work going on. OK

2 - Several passes and its done. OK

3 - My original Event has another take added to it - as Take2. OK

4 - But this Take2 is telling me that it is "Media Offline"

5 - I check where the file is residing - it is in the Deshake Folder

6 - I can OPEN and play this file in Windows Media Player

7 - I've checked with G-Spot and it says it is a proper AVI file

8 - The Properties of this AVI, as described in the Vegas Project Media Window are filled out, EXCEPT for: Avg. Video Data Rate; Frame Rate; Field OrderAlpha ( doesn't even say "none"); Pixel Aspect; Frame Size; Colour Depth; Video Format; Date/Time Stamp. - This list is blank.

But it clearly states the correct path AND the name: 00005.avi

And, as I said, I can read it in Windows Media Player.

It is as if it IS there, but Vegas can't see it.

Weird!!

I'm so nearly there . . .

Best regards,

Grazie

Laurence wrote on 5/23/2007, 4:28 PM
I modified that one line by uncommenting the CIneform compression line and commenting the uncompressed one. I still get an uncompressed avi on the timeline.

I hate to complain though. This is such a wonderful thing even as it is. I'm going to use it all the time though and that's why I want to fine tune it.
Grazie wrote on 5/23/2007, 5:10 PM
John Meyer - ROX!!

Success!

What did I do?

Yes I downloaded the NEW version. But I didn't delete first. I installed over. Make a difference? Maybe . . I also deleted the actual folder too!

This time The script takes time to actually CREATE an AVI on the timeline first. Before there appeared what looks as if it was a very fast graphic of the file. Now I actually SEE a rendering file IN the Vegas review. Now THAT didn't happen before! I also notice that the TEMP Video Track has a different naming convention?

So, a "One-Click Grazie-Proof" ( so far! ) solution!

Brilliant Mr M! Brilliant!

One Happy Vegger here.

G



johnmeyer wrote on 5/23/2007, 8:36 PM
I modified that one line by uncommenting the CIneform compression line and commenting the uncompressed one. I still get an uncompressed avi on the timeline.

Ah yes ... One of the breakthroughs in getting this to work was figuring out a way around the limitations of the VD scripting language. If the compressor string is absent, no compression is used. However, you can't pass a blank from Vegas to VD because blanks are used as the delimiter between

The crazy VD scripting language allows you to specify the compression either as a crazy hex number or as a string. I forgot that I changed to a string (any string that doesn't match causes it to render uncompressed). Thus, that long hex number is totally useless.

The good news is that the script doesn't need to be changed in order to do what you want, and the compression setting is actually MUCH easier to figure out.

Just open VirtualDub and specify the compression you want (Video -> Compression). Make sure that you click on Configure and specify the correct settings (the RGB settings have to be set correctly, and you can only determine this by making a few tests). While you are looking at the VirtualDub "Select video compression" dialog, look at the "Video codec information" area. Write down the "FOURCC code." For the Cineform codec on my computer, this is listed as "cfhd".

All you need to do is exactly what you have already done, but in place of that long hex number, put "cfhd" (or whatever you see in your VD dialog).

Thus, the uncommented line should look like this:


var VirtualDubCompressor = "cfhd"; // Cineform
Hope that works for you!

P.S. I have updated all the links to the script in the previous posts so that they now point to a version of the script that contains the instructions above. The previous version of the script works just fine, so if you don't need to manually specify the VirtualDub compressor, you don't need to download anything. The scripts are functionally identical -- just the readme has changed.

johnmeyer wrote on 5/23/2007, 9:11 PM
Graham,

Thanks for your kind words. The latest version of the script (updated readme file) is available in my previous post (or any of the other posts where I linked to the file). The previous version is no longer available.
Laurence wrote on 5/23/2007, 9:26 PM
Yes, that worked! Boy is this cool. Now I'd still like to be able to pass the file to VDub as a Cineform avi rather than uncompressed since I really am only working in this one flavor of hdv (Cineform Neo HDV 1440x1080x60i), though I can see where the current approach would be the only way to work if you wanted to start with m2t clips on the timeline and end up with deshaken Cineform avis.
Laurence wrote on 5/23/2007, 9:28 PM
Also, what would be the correct syntax for setting the VDub compression to the Main Concept DV codec (since I'm sure quite a few of us will want to do exactly that)?
Laurence wrote on 5/23/2007, 9:33 PM
I was just thinking, since Cineform allows standard SD dimensions, and since not everyone has the Cineform codec, the Cineform variation might actually be useful to many people for SD projects as well. Of course they would have to have bought ConnectHD or one of the Neo versions, but it should work in that case shouldn't it?