Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Contact info
 
Other projects
   Altirra

Archives

Blog Archive

VirtualDub's command line switches

While I'd like to say that the reason I'm posting this is to republish some info I dropped from the old help file, the real reason is that I want to stem the flow of comments about watermelons. I had no idea that salting watermelon was so common. One of my friends suggested that the salt draws water out and makes the melon taste sweeter, but I buy that about as much as the diarrhea-prevention theory a commenter posted. When I tried it I all I tasted was salty watermelon. Maybe I used the wrong kind of salt.

Anyway, about VirtualDub's command-line parameters....

VirtualDub exposes a few switches on its command line that can be used to automate its behavior. Nearly all of them are centered around running scripts, so you cannot do much that is not scriptable -- in particular, you cannot script capture mode at all. However, you can run jobs automatically, which is how the various front-end apps work.

The switches in 1.5.10 and 1.6.0 are, as follows:

There must not be spaces between the switches and their arguments, but you can quote, like: /s"foo bar.vcf" /p"this one.avi","that one.avi". The command line parsing will be a bit cleaner in 1.6.1, and in addition, I'm adding a facility for passing parameters to a script.

You can also load a video file by specifying it on the command-line, but note that it is not loaded until after the command-line has been parsed -- so attempting to load a file that way and then execute a script using /s will not work as intended.

Render and preview operations can be invoked directly and immediately from a script. However, if an error occurs, VirtualDub will stop and display a dialog. If you are automating a pipeline you should construct a job queue instead and run it with /r. This way the errors are deposited into the VirtualDub.jobs file instead and VirtualDub will proceed to the next job. (This file is always located next to the EXE, so make sure the current user has write access to that folder.) VirtualDub always flushes its job queue to disk immediately before starting a render so if it crashes during an operation, the .jobs file will have the failed job in the In Progress state, which is then changed to Aborted on the next load. Remember that VirtualDub is a GUI application, so if you are starting it from the command interpreter you may need to use start /wait to force cmd.exe to pause.

Comments

This blog was originally open for comments when this entry was first posted, but was later closed and then removed due to spam and after a migration away from the original blog software. Unfortunately, it would have been a lot of work to reformat the comments to republish them. The author thanks everyone who posted comments and added to the discussion.