Processing: Frameserver

VirtualDub

VirtualDub help - Processing: Frameserver

The frameserver feature allows other programs to pull video directly from VirtualDub's rendering pipeline. This allows video to be filtered through VirtualDub and then processed by another application without the need to write an intermediate file to disk.

Starting the frameserver

The frameserver is built into VirtualDub and is accessible through the File > Start frameserver menu command. This command starts a frameserver in the system with the currently loaded video and filtering settings. After the frameserver is started, other applications can connect to it.

Not all features in VirtualDub work while the frameserver is active. The following processing features do work:

  • Most video filters.
  • Video frame rate adjustment.
  • Video frame rate conversion.
  • Range selection and the edit list.

The following features are disabled when the frameserver is active:

  • Video filters that have a lag — most notably the temporal smoother. The filter will function, but there will be a delay in the video.
  • Video compression.
  • Inverse telecine (3:2 pulldown removal).
  • Audio compression.
  • Audio filters.
  • Audio conversion.
  • Audio volume adjustment.
  • Audio interleaving (most are not applicable).

Video is always sent from the frameserver in 24-bit RGB format for maximum compatibility.

When the frameserver is started, VirtualDub will ask you for a name to use for the new frameserver, as well as to save a signpost file. The name is used to distinguish frameservers on the system; the signpost file tells the client driver which frameserver to connect to. The signpost file, which normally uses the .vdr filename extension, is used as input to the client application and contains the frameserver name.

Note Although the frameserver name contains the name of the computer, connections across the network are not currently supported.

Connecting a client application through the AVIFile driver

The best way to connect a client to VirtualDub's frameserver is through the AVIFile driver. AVIFile is a older programming API in Windows that allows programs to extract audio and video from media files, such as AVI. As it is extensible, VirtualDub ships with an AVIFile driver that extends such programs to read their data directly from the frameserver rather than from a file on disk.

Note It can often be difficult or impossible to tell whether an application uses the AVIFile APIs to read media files, and is thus compatible with this connection method; often the only way to tell is to try. However, this method is very similar to the connection method used by the Avisynth scriptable video processor, so applications which are Avisynth compatible will usually work with VirtualDub's frameserver as well.

To install the frameserver, use the auxsetup program that comes with VirtualDub. This will copy the driver to Windows' system folder and add entries to the Windows Registry to enable its use in AVIFile. This tool can also be used to remove the driver. On Windows NT/2000/XP, you must be running as a local administrator to install or uninstall the AVIFile driver.

Once the AVIFile driver is installed, AVIFile-based applications should be able to connect to the frameserver simply by opening the .vdr file that was created when the frameserver was started. VirtualDub is itself capable of doing this, so opening a second instance is a way to test the frameserver connection.

After an application is connected and has started pulling audio and video data, the activity totals on the frameserver dialog will increment as data is transferred.

Installing the AVIFile driver in proxy mode

Some applications use the AVIFile API are still not able to use the frameserver because they require the .avi filename extension or otherwise prevent non-AVI drivers from being used. In this case, enabling a special mode of the VirtualDub AVIFile driver called proxy mode can help. To do this, install the proxyon.reg file that comes with VirtualDub; this adds additional entries in the Windows Registry to remap the AVI entry as well. Use the proxyoff.reg file to undo this.

Note Proxy mode works by forcing all AVI files through VirtualDub's driver, which then attempts to proxy through all real AVI files to the regular Windows driver. Although attempts have been made to ensure this is as compatible as possible, there may occasionally be applications that do not work properly when proxy mode is enabled. It is recommended that proxy mode be enabled only when required to use the frameserver, and disabled in all other cases.

Once proxy mode has been enabled, renaming the .vdr signpost file to use the .avi filename extension will allow additional applications to function.

As an additional bonus, when proxy mode is enabled, the AVIFile driver will tunnel through any file that begins with the nine characters #avisynth through to the Avisynth scriptable video processing tool. The additional compatibility unlocked by proxy mode is thus also extended to Avisynth.

Installing and using the 64-bit frameserver and frameclient

Use of the frameserver and frameclient with 64-bit programs, including the 64-bit version of VirtualDub, requires special procedures.

The 32-bit version of VirtualDub, and the 32-bit frameserver/frameclient libraries, will work without modification under Windows x64 Edition. However, frameserving with 64-bit programs involved requires the 64-bit versions of the frameserver/frameclient libraries to be installed. Doing this currently requires manual steps:

  • Copy vdsvrlnk64.dll and vdremote64.dll to the Windows\System32 folder.
  • Install the frameserver64.reg patch into the Registry.

Once this is done, the 64-bit programs can interact with the frameserver system. This includes crossing data between 32-bit and 64-bit applications. In addition to frameserving between 64-bit applications, it is also possible to frameserve from 64-bit VirtualDub to a 32-bit application, as well as from 32-bit VirtualDub to a 64-bit application.