Ok, here's an idea. Long story short, I've spent the day (re-)exploring the programmng options for plugins. I have a thread over in the video thread, but I'm switching to ths forum because its about scripts. If you don't want to use DirectX6 and C++, the Sony SDK is an uphill battle. 1.5 yrs ago, Sony said they would try and update the SDK to C# and more recent DirectX, but it hasn't happened. (Not a slam: Demand has been low and they've been busy.) Lots of forums posts of people getting their toes wet with C# then drowning. Not something you can get productive in a week or two. I've looked at this several times but the initial hurdle is too great so I always blow it off. Sounds like I'm not alone. Too bad.
Scripting is simpler in comparison, however afaik you can't develop keyframeable plugins and so forth. You can create and specify motion keyframes, though, right?
I've been thinking about plugins because I'm annoyed at deshaker for VirtualDub and want an alternative: I love deshaker, but it resamples the video even if you're only moving in X and Y, which softens the video.
It just occurred to me: A darn good way to implement deshaker for Vegas is not to recreate a second avi file. Instead, a tool could analyze the video file then use scripting to insert a keyframe that performed the correcting X and Y shift, Zooming and Rotation. IOW, one keyframe per frame :-! Pretty cool, huh? Beats the manual keyframing I know some of us have done :-)
In fact, its possible to use the existng VirtualDub deshaker to perform the correction calculations (it generates a text log file with all the corrections), then use that as the input to the script.
So here is roughly the idea:
1) Select your clip(s) and run the script.
2) For each clip, launch VirtualDub, load deshaker and run in pass 1 mode.
3) Read the Deshaker.log file. This is a text file giving an X, Y, Zoom and rotation for each frame. (Actually two values per frame for interlaced video.)
4) Fit these values to a "dampening curve" based on settings in the script. These are the X, Y, Zoom and Rotation values that correct for the shaking in the original clip.
5) For each frame in the clip, insert a keyframe with the calculated X, Y, Zoom and Rotation values.
Long term improvements might be:
a) Replace VirtualDub deshaker in step 2 wth your own video clip analysis tool.
b) Deshaking messes up the edges of the video. The above approach can either leave these edges empty or can zoom the video to fill the screen (with softening, of course). VirtualDub deshaker also allows you to blend in previous and future frames to fill in the empty spaces and it does a fine job.
c) The script needs a form to allow the user to specify various settings for the corrections, i.e., "smoothing factors" for the X, Y, Zoom and Rotation. You could also turn off certain corrections like Zoom and Rotation, e.g., if you were shooting from a tripod. Ultimately you'd want these values themselves to be keyframeable.
------------
The idea seems pretty straightforward to me. Pretty doable and pretty useful. The only serious bit of new coding is converting the calculated camera movements with dampening to the actual adjustments in the motion keyframe.
Scripting is simpler in comparison, however afaik you can't develop keyframeable plugins and so forth. You can create and specify motion keyframes, though, right?
I've been thinking about plugins because I'm annoyed at deshaker for VirtualDub and want an alternative: I love deshaker, but it resamples the video even if you're only moving in X and Y, which softens the video.
It just occurred to me: A darn good way to implement deshaker for Vegas is not to recreate a second avi file. Instead, a tool could analyze the video file then use scripting to insert a keyframe that performed the correcting X and Y shift, Zooming and Rotation. IOW, one keyframe per frame :-! Pretty cool, huh? Beats the manual keyframing I know some of us have done :-)
In fact, its possible to use the existng VirtualDub deshaker to perform the correction calculations (it generates a text log file with all the corrections), then use that as the input to the script.
So here is roughly the idea:
1) Select your clip(s) and run the script.
2) For each clip, launch VirtualDub, load deshaker and run in pass 1 mode.
3) Read the Deshaker.log file. This is a text file giving an X, Y, Zoom and rotation for each frame. (Actually two values per frame for interlaced video.)
4) Fit these values to a "dampening curve" based on settings in the script. These are the X, Y, Zoom and Rotation values that correct for the shaking in the original clip.
5) For each frame in the clip, insert a keyframe with the calculated X, Y, Zoom and Rotation values.
Long term improvements might be:
a) Replace VirtualDub deshaker in step 2 wth your own video clip analysis tool.
b) Deshaking messes up the edges of the video. The above approach can either leave these edges empty or can zoom the video to fill the screen (with softening, of course). VirtualDub deshaker also allows you to blend in previous and future frames to fill in the empty spaces and it does a fine job.
c) The script needs a form to allow the user to specify various settings for the corrections, i.e., "smoothing factors" for the X, Y, Zoom and Rotation. You could also turn off certain corrections like Zoom and Rotation, e.g., if you were shooting from a tripod. Ultimately you'd want these values themselves to be keyframeable.
------------
The idea seems pretty straightforward to me. Pretty doable and pretty useful. The only serious bit of new coding is converting the calculated camera movements with dampening to the actual adjustments in the motion keyframe.