Caption vs Text Command Marker

Radiohead303 wrote on 9/8/2004, 4:12 PM
I use a script to insert command markers into projects, using the command,

MarkerCommandType.Text which produces a "TEXT" type command marker. I understand Vegas 4.0d recognizes the "CAPTION" parameter (whereas earlier versions did not). However, if I change the script to MarkerCommandType.Caption, Vegas doesn't recognize the property.

Anyone know what I'm missing here?

Thanks

Comments

rcampbel wrote on 9/9/2004, 8:19 AM
I just pulled up my copy of Vegas 4.0e and inserted a Command Marker. There is not a CAPTION command in the list. The closest is a WMClosedCaption which inserts a Window Media closed caption.

What are you trying to do with the command marker?

Randall
Radiohead303 wrote on 9/9/2004, 9:45 AM
Thanks for your reponse.

We use a custom command called "Caption" (it's not one of the pre-defined commands in vegas but it works similar to "text") to pass along information about the track to scripts in an embedded windows media player using streamed .wma or .asf files.

Right now, we use our vegas script to insert a command marker with the "text" command, then we have to go through the events window and manually replace the word "text" with the word "caption". I was hoping we could eliminate this step by having the script write the command "caption" (not "WMClosedCaption" which is something different).

I thought that we could define a custom command type, but perhaps it will only "see" the pre-defined command types in vegas. Thoughts?

rcampbel wrote on 9/9/2004, 10:51 AM
In just looking at the API, it looks like you should be able to do this. If you have an existing marker, then you could use the SetCommand method as follows:

commandmarker.SetCommand(new MarkerCommandType("caption"), "caption parms...");

Are you trying to set the CommandType property? If so, that property is read only. So, you need to either use SetCommand or construct a new CommandMarker as follows:

new CommandMarker(timecode, new MarkerCommandType("caption"), "caption parms...");

Again, I haven't tried this, but this is what the API would indicate should work.

Randall
Radiohead303 wrote on 9/9/2004, 2:02 PM
Randall,

Perfect! The line
new CommandMarker(timecode, new MarkerCommandType("caption"), "caption parms...");

created a new command called "caption" and it worked perfectly.

Thank you very much for your assistance!

Dave Rahn