Wait for Vegas to Catch Up on Still Capture?

2G wrote on 3/17/2013, 9:34 PM
I have a script that takes several snapshots of various places in the video and saves the jpgs. No problem with the capturing and saving. The problem is that this is not a particularly fast machine, and the media is 5D mov which is inherently slow processing in Vegas. The cursor moves to each of the places and grabs the frame. But the problem is that Vegas has not caught up when it takes the snapshot and has not updated the image with the current cursor location. I end up with three or four jpgs of the same frame. I know the cursor is going to the correct spot. I'm watching the cursor timecode indicator while the script is running.

Basically, I need some way to hold off on the snapshot until Vegas has caught up with rendering the image at the new cursor location so I'll get the correct image.

I've tried Vegas.UpdateUI(), Vegas.WaitForIdle(). I've even tried Thread.Sleep(1000). The snapshot method returns a render status. I tried to see if it might return something other than 'render complete' if it took the snapshot too early. But that didn't seem to make any difference either.

Am I missing something? It would seem to me that inherently, Vegas would not take a snapshot at a specified timecode location until the image at that location was ready for capturing.

I'm sure this may not be an obvious problem on a fast machine with a fast GPU and less complex source media than 5D mov. But I've got to play the hand I'm dealt on this. And it is not working the way I have it coded now.

Is there some magic method call that I'm not aware of that says "wait until the image/preview has caught up before proceeding"? (I thought that was what UpdateUI() did. But apparently not).

Thanks.

Comments

No comments yet - be the first to write a comment...