AviSynth FAQ - Opening scripts in encoder and player applications

Contents

  1. What is frameserving and what is it good for?
  2. How do I use AviSynth as a frameserver?
  3. How do I frameserve my AVS-file to encoder/application X?
  4. How do I solve problems when opening/reading scripts in encoders and players?
  5. How do I frameserve from Premiere/Ulead/Vegas to AviSynth?

What is frameserving and what is it good for?

An excellent description is found on Lukes homepage:

"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.

There are two main reasons that you would want to frameserve a video:

  1. Save Disk Space: Depending 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."

How do I use AviSynth as a frameserver?

Write a script using a text editor. Load your clip in AviSynth (see FAQ loading clips), do the necessary filtering and load the AVS-file in encoder/application X (must be an encoder or application which can read AVI-files (see also here).

How do I frameserve my AVS-file to encoder/application X?

There is simple way for many applications, and tricky ways for many others.

Direct frameserving to compatible applications

Simply open your AVS file in coder/application with menu, command line or drag-and-drop AVS file to it (working ways are dependent on the application). Some programs have "AviSynth *.avs" in "Open" menu, for others try select "All files *.*" or type AVS file name instead of "AVI".

Players: Media Player Classic, Windows Media Player 6.4, 9 and others.

Encoders: QuEnc, Mencoder, HC Encoder, CCE SP 2.50 and 2.66, Canopus Procoder 1.5 and above, MainConcept MPEG Encoder, TMPGEnc, TMPGEncXpress 3/4, Elecard Converter Studio, xvid_encraw, FFMpeg (new versions), Nero 6, Nero 7 (drag-and-drop only) and others.

Editors: VirtualDub, AviDemux (through its avs proxy option)

But some applications work fine only with some specific video or audio formats, have a look at the next section.

Direct frameserving to applications using additional plugins

The original version was located at Bens site, see mirror. A much improved version can be downloaded from the Video Editors Kit sourceforge page. This works for Premiere 5.x, 6.x and Pro at present. Version 1.5 also works for Premier CS3. To install the import plugin move the IM-Avisynth.prm file into your Premiere "Plug-ins" directory.

Direct frameserving to special or modified versions of encoders

Some programs initially could not open AviSynth scripts, but updated or alternative programs can do it:

Frameserving to applications via fake AVI files and proxy utilities

Many "new" programs do NOT use the Windows functions to read the AVI-files. If they use own read functions the AviSynth-script files will not work. There are utilities that can create small fake AVI file with special type (FOURCC), and provide correspondent system codec to "decode" these dummy compressed files.

Select your AVS file in utility menu, set options and create fake AVI file with some name. Then you can open this fake AVI in your application/encoder, that will be receive frames from the codec that wiil be receive frames from AviSynth.

Several such utilities are different by supported modes (formats) of output video (with or without conversion) and audio (unpacked audio is most compatible but filesize is larger), by user interface (window, command line) and number of bugs.

Features - output RGB24 only, unpacked audio, multiple files support, good compatibility, but a bit slow.

Features - ouput to any color format. Uncompressed audio works properly in old ffvfw and recent (13 november 2007) ffdshow (8 and 16 bit only, use ConvertAudioTo16bit when necessary).

Features - video output same as input format, no audio.

Known programs that will not open AVS scrips without these utilities:
CCE SP v2.62-2.64, Windows Media Encoder vx.x. (older than v9), Ulead VideoStudio 5-11, MediaStudio 6-8, Pinnacle Studio, Sony Vegas, Nero 8, ImageMixer and others.

Frameserving via pipe from auxiliary programs to application-encoders

Avs2YUV is a command-line program, intended for use under Wine, to interface between AviSynth and Linux-based video tools.

Programs: Mpeg2enc, Mencoder, FFMpeg.

avs2yuv out.avs -o - | mpeg2enc - options...

This way is obsolete since these programs have native AviSynth support now.

How do I solve problems when opening/reading scripts in encoders and players?

  1. TMPGEnc doesn't read my AVS files (this happens in old versions of TMPGEnc), what to do?
  2. CCE SP crashes when reading an AVS-file, what to do?
  3. My encoder or player doesn't open AviSynth scripts, what should I do?
  4. When opening my clip in an encoder or player, the colors are messed up, what to do?
  5. Windows Media Encoder 9 Series does not open AVS files, what to do?
  6. WMP11 on Vista dos no play AVS, what to do?
    Do not change anything at the registry if you are not experienced!

How do I frameserve from Premiere/Ulead/Vegas to AviSynth?

Install the AviSynth compatible frameserver PluginPace frameserver (by Satish Kumar) for frameserving from SonicFoundry Vegas (and earlier Vegas Video/VideoFactory versions), Adobe Premiere, Ulead MediaStudio Pro or Wax to AviSynth (discussion).

| Main Page | General Info | Loading Clips | Loading Scripts | Common Error Messages | Processing Different Content | Dealing with YV12 | Processing with Virtualdub Plugins |

$Date: 2008/12/21 09:23:02 $