Frameserving
Introduction
Frameserving is a process by which you directly transfer video data from one program on your computer to another. No intermediate or temporary files are created. The program that opens the source file(s) and outputs the video data is called the frameserver. The program that receives the data could be any type of video application.
Benefits of Frameserving
There are two main reasons that you would want to frameserve a video:
1) Save Disk Space:
Depending the on the frameserving application, you can usually edit/process your
video as it is being frameserved. Because frameserving produces no
intermediate files, you can use a frameserver to alter your videos without
requiring any additional disk space. For example, if you wanted to join
two video files, resize them, and feed them to another video application,
frameserving would allow you to do this without creating a large intermediate
file.
2) Increased Compatibility:
To the video application that's receiving the frameserved video, the input looks
like a relatively small, uncompressed video file. However, the source file that the
frameserver is transferring could actually be, for example, a highly compressed
MPEG-1 video. If your video application doesn't support MPEG-1 files, it's
not a problem because the application is just receiving standard uncompressed
video from the frameserver. This feature of frameserving enables you to
open certain types of files in an application that wouldn't normally support
them.
Furthermore, because the video application is being fed the source video one frame at a time, it doesn't know anything about the file size of the source video. Therefore, if your application has 2 GB or 4 GB limit on input file size, it won't have any effect on your frameserved video. You could feed 100 GB of video via a frameserver to an application limited to 2 GB and it wouldn't cause a problem.
Frameserving Programs
There are three programs that are commonly used as frameservers. Those programs are Avisynth, VirtualDub, and VFAPI. (You can get them all from my Software page.) Each program provides different options and methods for frameserving. The programs also have different levels of compatibility. For example, a video application might not accept a video frameserved via VirtualDub, but it might accept that same video if it is frameserved via VFAPI. Fortunately, you can frameserve from one frameserver to another, if necessary.
Below I will provide a brief description of each frameserving program and basic instructions on how to use them.
Avisynth
Avisynth is a script-based program that acts solely as a frameserver. It offers a wide array of processing features, and it's compatible with most video applications. I've written an entire article dedicated to Avisynth, so visit my Avisynth page for complete information.
VirtualDub
In addition to its already extensive feature set, VirtualDub has a very powerful frameserver. In order to provide maximum compatibility, there are three different modes (clients) that can be used with the frameserver. However, I only recommend using the first two because the third is untested and difficult to set up. If VirtualDub's first two frameserver modes won't work with your application, I suggest frameserving your video with VirtualDub to a VDR file, opening the VDR file with Avisynth (using the AVISource input filter), and then using VFAPI to open and frameserve the AVS (Avisynth) script.
Before I describe how to use VirtualDub's frameserver, it's important to mention that several of VirtualDub's features will not work when frameserving a video. For an up-to-date list of the incompatible features, check out the official VirtualDub Documentation.
AVIFile Client:
The AVIFile frameclient is the standard way to use VirtualDub's frameserver. It is compatible with most applications, and it shouldn't interfere with other software on your computer. To use the AVIFile client, you must do the following:
1) Install the AVIFile client. To do this, run the "AuxSetup.exe" program, which is found in your VirtualDub directory. Click on the "Install handler" and then press OK. A message box should appear to tell you that the installation was successful. You can click OK and Exit the auxiliary setup program. Now that the AVIFile client is installed, you won't need to follow this step in the future.
2) Load your video in VirtualDub and configure as necessary. Next, open your video(s) in VirtualDub and add video filters, cut out unwanted segments, and/or alter any other settings as you see fit. You don't need to set audio and video compression because the frameserved video is sent uncompressed. Remember that some of VirtualDub's features are incompatible with the frameserver, so be sure to read the official VirtualDub Documentation.
3) Start the frameserver. When you have finished configuring your video, click on File -> Start frame server. A window will appear asking for the frameserver name. The default is fine, so just press Start. Now you will choose the name of the signpost you want to save. Choose any filename you desire, making sure to include the .VDR extension, and press Save. A dialog box should appear that provides statistics about the frameserver.
4) Open the signpost file in your video application. Finally, just open the signpost VDR file in your desired video application. In the Open dialog box of the application, you might have to set the file type to *.AVI so it doesn't get confused about the VDR extension. If you type in *.* for the filename, all files, not just those with the AVI extension, will be listed. Then you can select and open the signpost VDR file. If all goes well, your application will open the frameserved video like any other video file. If you have trouble, try enabling proxy mode as described below.
AVIFile Client in Proxy Mode
Some video applications will refuse to accept a file if it doesn't have the AVI extension. To counteract this, you can set the AVIFile to proxy mode. In proxy mode, VirtualDub's handler will take over all AVI requests made by programs on your computer. Sometimes this can cause problems with other applications, even when you aren't frameserving a video. Therefore, you should only enable proxy mode when necessary and disable it when not using it. To use the AVIFile client in proxy mode, do the following:
1) Install proxy support. Go to the "aviproxy" directory, which is found in your VirtualDub directory. Double-click the "proxyon.reg" file, and press Yes when asked if you want to merge the information into the registry. Proxy support is now installed. (Note: proxy mode won't work if you haven't already installed the AVIFile client via AuxSetup.exe.)
2) Load your video in VirtualDub and configure as necessary. The same instructions apply that you used for the AVIFile client in non-proxy mode.
3) Start the frameserver. This time, you'll be saving the signpost with the AVI extension instead of the VDR extension. To begin, click on File -> Start frame server. A window will appear asking for the frameserver name. The default is fine, so just press Start. Now you will choose the name of the signpost you want to save. Choose any filename you desire, but this time you should give the file a .AVI extension. When you have chosen a filename, press Save, and a dialog box should appear that provides statistics about the frameserver.
4) Open the signpost file in your video application. Finally, just open the signpost AVI file in your desired video application. In the Open dialog box of the application, make sure you set the file type to *.AVI. If everything goes okay, your application should open the signpost AVI like any other AVI. If the application can't read the frameserved video, follow the next step and then try using VFAPI.
5) Deinstall proxy support. When you are done using the frameserver, you should disable proxy support. To do this, navigate once again to the "aviproxy" directory. This time, double-click the "proxyoff.reg" file and press Yes when prompted to merge the information. Proxy support is now disabled.
VCM Client:
VirtualDub provides a third option for frameserving, the VCM client. This client actually uses a special video compression codec to frameserve the video. Unfortunately, you have to manually copy a file and edit Windows settings to use the VCM client. You also have to set up a special striped AVI file. Furthermore, the codec is still in a possibly buggy alpha state. For these reasons, I generally don't recommend using the VCM client. VFAPI is easier to set up and works just as well, so I suggest using VFAPI instead of VirtualDub's VCM client. If you really want to use the VCM client, you can read the instructions in VirtualDub's help file.
VFAPI
VFAPI is another excellent frameserving utility. My experience has been that it's the most compatible frameserver you can use. (I haven't yet found an application it won't work with.) If necessary, you can open a frameserved video in VFAPI and then frameserve it again to your desired video application. For example, you could set up Avisynth to resize a video, open the AVS script with VFAPI, and then frameserve the video to your application through VFAPI.
VFAPI works through plug-ins. This means that you can use VFAPI to frameserve from any program with a VFAPI plug-in. Basically, you first save a project file in a VFAPI compatible program. The VFAPI Reader program then converts the project file into a special VFAPI AVI file. Finally, the VFAPI video codec frameserves the video to another application through the VFAPI AVI file.
Below are some more detailed instructions on how to use VFAPI as a frameserver. You can also read the first section of my Windows Media 8 Encoding guide, which offers a step-by-step explanation of using VFAPI with Avisynth.
1) Install the VFAPI codec. You must install the VFAPI codec before attempting to use VFAPI as a frameserver. To do this, navigate to the Codec subdirectory found in the directory where you unzipped VFAPI. Then just double-click the file called "vifpset.bat". If Windows asks you to verify any file installation, be sure to press OK. The VFAPI codec should now be installed. Now that the codec is installed, you won't need to follow this step in the future.
2) Load your video in a VFAPI compatible program and configure as necessary. Examples of some VFAPI compatible programs include TMPGEnc and DVD2AVI. Avisynth will also work if you install the ReadAVS VFAPI plug-in. (You can download the plug-in from my Software page.) Please note that you must have the VFAPI plug-in installed for each of these programs if you want them to work with VFAPI. Whatever program you use, simply load your video(s) and configure the options as you desire.
3) Save a project file. After you have configured your video, you have to save a project file. The exact way to do this will vary from program to program, but usually you just click on File -> Save Project. If you're using Avisynth with the ReadAVS plug-in, an AVS file will act as the project file. Make sure you save the project file with the correct default extension used by your VFAPI compatible program. After you save the project file, be sure to exit the program.
4) Load the project file in the VFAPI Reader Codec program. Navigate to the Reader subdirectory found in the directory where you unzipped VFAPI and double-click the file named "VFAPIConv-EN.exe". Next, click on the "Add Job" button, navigate to the folder containing the project file you created, and open the project file. (Note: if you can't open the project file, it probably means that you haven't properly installed the VFAPI plug-in for your program.) Once you open the project file, a window will appear with some options. You can choose a filename for the VFAPI AVI, but the default is usually fine. You should leave the option boxes checked to permit frameserving of both the video and the audio. When you have chosen a filename, press OK to return to the main window.
5) Create the VFAPI AVI. Now press the Convert button to begin the creation of the VFAPI AVI. A percentage will appear in the options column and count to 100% as the VFAPI AVI is created. When the process is complete, press the Exit button to quit the VFAPI Reader Codec program. Because VFAPI only frameserves video and not audio, the audio from the source file is copied into the VFAPI AVI. Depending on the length of your source video, the audio might make the VFAPI AVI quite large, but it should be nowhere near as large as the source file.
6) Open the VFAPI AVI in your video application. The VFAPI should look like a standard AVI file to your application. Therefore, you simply need to open it like you would open a regular AVI file, and everything should work.