9
How to frameserve (dvd2avi / VirtualDub / Avisynth / VFAPI)
| User comments | Printer-friendly version of this page | Guide made by Truman |

How to frameserve (dvd2avi / VirtualDub / Avisynth / VFAPI)

What's Frameserve?

Frameserve means that you create a direct video "link" from a video editor application to a standalone mpeg encoder so you don't need to create a temporary video file.

Popular frameservers

DVD2AVI....can open MPEG-2 files, so it can open .vob files that you copied from DVD to HDD.

VirtualDub...is a video editor and frameserver. It can open e.g. AVI, MPEG-1, AVS. Earlier versions can open .asf and .wmv too.

Avisynth....is a video editor and frameserver similar to VirtualDub but without a GUI. That's why it is not very newbie friendly and unfortunately not that popular as it should be. It is by far the fastest frameserver when it comes to DVD to (S)VCD conversion, because it works with YUY2 colourspace as well, while VirtualDub and VFAPI work with RGB colours only. Avisynth is able to read every video file type, that you can play with windows media player or a dvd player, also it reads dvd2avi projects and VirtualDub signpost files. Avisynth comes with a whole lot of filters and plugins as you can use all VirtualDub filters. It is also used to connect Adobe premiere, FlaskMPEG, DVDx and similar tools with a standalone MPEG encoder, so you do not need a encoder plugin.
Definitily my favorit.

VFAPI...is actually not a frameserver. VFAPI acts like a regular video codec, but it is rather an AVI wrapper or however you like to call it. VFAPI wrapps dvd2avi projects, VirtualDub and Avisynth scrips as well as TMPGEnc. projects and Aviutl (another video editor) projects to a "pseudo" avi. These avis you can open in every MPEG encoder or video editor. Sometimes you may want to use VFAPI to connect different frameservers.

Used tools

Note, that I am currently running windows2000. Some tools / methods may behave different if you are running a different OS.

DVD2AVI 1.76
Avisynth 1.05
VirtualDub 1.4.10
VFAPIconv 1.04b

support utils

MPEG2DEC (Avisynth plugin)
avs_patch
read_avs.dll

Installation hints

DVD2AVI. No installation needed, just copy it to any dir. Make sure, dvd2avi.vfp (VFAPI plugin) is copied to the same directory. I suggest to use the latest official release, that is v.1.76.



VirtualDub. Copy it to any dir. Double click on Auxsetup.exe and install the handler.



Leave the proxy mode (VDaviproxy subdir) alone, you may need it later.

Avisynth. Copy Avisynth to any dir. Copy Avisynth.dll to c:winntsystem32 resp. c:windowssystem. Then run Install.reg. I suggest to use Avisynth 1.0 beta5.
Since it is not bugfree you may try Avisynth 1.0beta7d. Note, that you have to uninstall one version by running Uninstall.reg before you install a different version.



VFAPI. Copy VFAPIConv. to any dir. Change to the CODEC subdir and install the VFAPI codec by running vifpset.bat.



Nativly you can open projects of DVD2AVI, TMPGEnc. and Aviutl in VFAPIConv, if you have installed and registered the corresponding VFAPI plugins. In Order to have VirtualDub and Avisynth scrips to be recognized by VFAPIconv you have to copy ReadAVS.dll to the VFAPI Reader dir.



Open ReadAVS.reg with notepad and replace the typed path with the real path to the DLL.



Save and close ReadAVS.reg. Then run ReadAVS.reg by doubleclicking on it.

Used MPEG encoders

Different MPEG encoders need a different frameserver setup. That's why I tested all methods with the following (probably most popular) encoders.

TMPGEnc.2.53 plus
TMPGEnc.Beta 12a
Cinema Craft Encoder SP 2.50
Cinema Craft Encoder SP 2.64
Ligos LSX MPEG encoder 3.5
Panasonic MPEG-1 encoder 2.51

In all my tests I frameserved video only. None of the MPEG encoders comes with an exellent audio encoder, so I recommend to do the audio conversion seperately. As you use a special tool for video, use a special tool for audio as well.
Note, everything below is for video conversion only. If at any point audio comes into the game, it will be a dummy audio file to make the frameserver working.
Also I wont explain any filters or encoder settings.

Scenarios:
1. Frameserve AVI with VirtualDub
2. Frameserve AVI with Avisynth
3. Frameserve with DVD2AVI
4. Frameserve MPEG-2 with DVD2AVI and VirtualDub
5. Frameserve MPEG-2 with DVD2AVI and Avisynth


1. Frameserve AVI with VirtualDub

Source is AVI, you want to edit and frameserve with VirtualDub. Start VD, select file > open video file.



Edit whatever you want and select file > start frameserver.



If you frameserve to TMPGEnc.2.53plus, TMPGEnc.Beta12a or Panasonic, proxy is off, save as *.vdr



Start TMPGEnc. and load the *.vdr as video source.



Start Panasonic MPEG-1 encoder and load the *.vdr as video source.



If you want to frameserve to CCE SP 2.50, you have to select an audio source. Select any small wav file, that you find on your HD.



Proxy is off, save as *.vdr. Start CCE SP 2.50, right click on the window and press "add" and load *.vdr into CCE.





If you want to frameserve to CCE SP 2.64, proxy is off, save as *.vdr. CCE SP 2.64 does not accept VirtualDub signpost files, so you have to convert it with VFAPIconv.
Start VFAPI, press "add job" and select *.vdr.



uncheck audio, press OK.



Press "convert", it takes only a couple of seconds. Press "exit".



Start CCE SP 2.64, right click on the window and press "add" and load *.vdr-vfapi.avi into CCE.



Before you can frameserve to LSX 3.5 you have to enable the proxy mode. Change to the VDaviproxy subdirectory and run proxyon.reg. Answer yes to the questions that will pop up.



Then start VirtualDub, open the video file, edit, start frameserver. Save as *.avi.



Start LSX, press "browse" and select *.avi.



Remember to run proxyoff.reg after you finished the conversion.

>>back

2. Frameserve AVI with Avisynth

Source is AVI, you want to edit and frameserve with Avisynth.
Open notepad, type
Code:

#LoadPlugin("")
#LoadPlugin("")
AVISource("d:dirdirtest.avi")
#[filter]
#[filter]
#[filter]
#[filter]

and save it as *.avs. Make sure that the filetype field in the save dialog box says All Files (*.*) and NOT Textfile (*.txt). Now right click on *.avs in explorer, select open-with and select the Media Player from the list. If it plays, everything is good and we can proceed.

Start TMPGEnc. or Panasonic and load the *.avs as video source.

Start CCE SP 2.50, right click on the window and press "add" and load *.avs into CCE. If you have an Athlon CPU, you may need to add a dummy audio line, otherwise CCE might refuse the script.

Code:

#LoadPlugin("")
#LoadPlugin("")
AVISource("d:dirdirtest.avi")
#[filter]
#[filter]
#[filter]
#[filter]
ResampleAudio(44100)


CCE SP 2.64 does not accept Avisynth scipts, so you have to convert it with VFAPIconv.
Start VFAPI, press "add job" and select *.avs, uncheck audio, press OK. Press "convert", it takes only a couple of seconds. Press "exit".
Start CCE SP 2.64, right click on the window and press "add" and load *.avs-vfapi.avi into CCE.


Before you can frameserve to LSX 3.5 you have to avs_patch the encoder. Copy AVS_PATCH.EXE to the LSX MPEG encoder directory and open the command line console.
Change to the LSX MPEG encoder dir and type "avs_patch mpeg2enc.exe". Hit enter.



A 2nd mpeg2enc.exe file was written, that will read Avisynth scrips. The original .exe is not deleted. Use the original for AVI and the new one for AVS.



Start LSX (mpeg2enc_avisynth.exe), press "browse" and select *.avs.

>>back

3. Frameserve with DVD2AVI

Source is MPEG-2 (e.g. DVD), you want to frameserve with DVD2AVI.
Start DVD2AVI, select file > open. Select the .mpg or the first .vob. All .vob files with the same filename will get loaded.



Have a look at the DVD ripping guides for more details. Select file > save project. Save as *.d2v.



You can load the *.d2v into TMPGEnc as video source directly.

If you want to frameserve to CCE SP, Panasonic or LSX you have to convert the *.d2v with VFAPIConv to *.d2v-vfapi.avi. Load that avi into CCE SP, Panasonic or LSX as video source.

>>back

4. Frameserve MPEG-2 with DVD2AVI and VirtualDub

Source is MPEG-2 (e.g. DVD), you want to edit and frameserve with DVD2AVI and VirtualDub.
Start DVD2AVI, open the .mpg resp. the .vob, save the project, save as *.d2v. Convert the *.d2v with VFAPIConv to *.d2v-vfapi.avi. Open that avi in VirtualDub and continue with scenario 1.

>>back

5. Frameserve MPEG-2 with DVD2AVI and Avisynth

Source is MPEG-2 (e.g. DVD), you want to edit and frameserve with DVD2AVI and Avisynth.
Start DVD2AVI, open the .mpg resp. the .vob, save the project, save as *.d2v.
Copy the MPEG2DEC plugin to c:winntsystem32 resp. c:windowssystem

Open notepad, type
Code:

LoadPlugin("c:winntsystem32mpeg2dec.dll")
#LoadPlugin("")
mpeg2Source("d:dirdirtest.avi")
#[filter]
#[filter]
#[filter]
#[filter]

and save it as *.avs. Make sure that the filetype field in the save dialog box says All Files (*.*) and NOT Textfile (*.txt). Now right click on *.avs in explorer, select open-with and select the Media Player from the list. If it plays, everything is good and we can proceed.

Start TMPGEnc. and load the *.avs as video source. If you get the "..can not open or unsupported" message, select options > enviromental (global) settings > VFAPIplugin. Disable direct show multimedia file reader.



Continue with scenario 2.

>>back

This guide may get extended. Feel free to mail me your very special frameserve problem.
Then I will try to update the guide.

Read more:
http://www186.pair.com/vdub/virtualdub_kb
http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/
http://www.math.berkeley.edu/%7Ebenrg/avisynth.html
http://www.videotools.net/uk/index.php
http://www.doom9.org/mpg/vfapi_reader_codec.htm
http://www.doom9.org/mpg/d2a-mpeg2dec.htm
http://www.doom9.org/virtualdub_procedures.htm
http://users.win.be/dividee/
http://nickyguides.digital-digest.com/synth-vdub.htm



View user comments or post your own comments/issues about this guide here.