Together with the video server plugin and AVIsynth/AVIWrapper codec,
you can use Premiere or FlasK as a frame server. This is very useful
if you want to code your edited video from Premiere or FlasK with an
external (MPEG)-encoder e.g. TMPGEnc or Cinemacraft encoder. This is
done by creating a "fake" AVI file. The created "fake" AVI can be
loaded into the encoder as a normal AVI. This resolves the problem of
making a time and space consuming intermediate AVI. If you load
the "fake" AVI file into an encoder, the avisynth.dll/aviwrap.dll
makes a connection with the plugin. When an encoder wants to read
audio or video, this request is passed to the Premiere/FlasK plugin.
Then the plugin fetches the audio/video and sends this to the encoder.
We call this inter-process-communication.
Installing the Plugin:
----------------------
Just copy the Cm-avisynth.cm.flask in the FlasK dir. If you
want to use it within Premiere just rename it to Cm-avisynth.cm.prm
and move it to the plugin dir. When the FlasK/Premiere is started,
it detects the plugin automatically.
Note that you should enable random access in the plugin, when using
it in Premiere: v5.x/v6. This can be done with the settings button, present
in the export dialog. Plugin Settings->(tap)General->Random access (checkmark on).
Why did I develop the AVIWrapper mode ?
---------------------------------------
Many new encoders are not able to read the AVISynth files. This is
a fundamental problem with this kind of reading of the AVI files.
This is the reason why I developed a new server mode that is able
to connect with any encoder. (It works with all tested encoders 'till now).
Because the AVIWrapper mode is not able to export audio at the moment, it
is still necessary to route the audio to AVISynth or save it to a WAV file.
If you route the audio to AVISynth, you are able to encode the generated AVI
(AVIWrapper) in e.g CCE SP v2.62 (video only) and read the generated AVS (AVISynth) file
in e.g. TMPGEnc and code it to audio.
Note: You can run these applications simultaneously.
Encoders that only work with the AVIWrapper mode:
-Microsoft Media Encoder Vx.x
-Cinemacraft SP v2.62
What is this YUY/YV12/RGB stuff ?
---------------------------------
As you probably know, colors are built with three basic colors, namely
Red (R), Green (G), Blue (B). Normally on a PC, a pixel is built with those three colours.
So for every pixel an intensity for R, G and B is stored. So with 24 bits per pixel (8 bits per color component). White is built with R=255, G=255 and B=255 and black with R=0 G=0 B=0.
This seems to work fine, but your eye is less sensitive to colours than to intensity. So
what you actually want is, a higher detail for intensity than for colour (given the best
quality for an amount of data).
Since the introduction of colour TV they used this perceptual property of the eye. What they
did is transform the RGB to the YUV domain. In the YUV domain the Y is the intensity and
UV the colour components. The trick is that you can store Y for every pixel and UV for every
RGB RGB RGB RGB YUV YUV YUV YUV YUV Y YUV Y YUV Y YUV Y
RGB RGB RGB RGB YUV YUV YUV YUV YUV Y YUV Y Y Y Y Y
RGB RGB RGB RGB YUV YUV YUV YUV YUV Y YUV Y YUV Y YUV Y
RGB RGB RGB RGB YUV YUV YUV YUV YUV Y YUV Y Y Y Y Y
Why is editing in YUV better than in RGB ?
------------------------------------------
First I assume that you use a digitised/compressed source (e.g. DV, MPEG...). This source
is stored in YUV format (MPEG=(4:2:0)=UV12). If you use ordinary software on a PC, the format
is converted into the RGB domain. This takes some time (9 multiplications and 3 additions
per pixel) and due to some implementation issues it degrades the quality. Then you can cut, edit and do processing on this RGB format. When you are done with that, you probably want to encode it. Then this RGB is transformed into YUV again and the stream is coded. So to give you an example when you are using FlasK: Decode the MPEGfile to YUV (4:2:0) format.
Calculate the missing UV components because it is transformed to YUV (4:4:4). Then it is transformed
to RGB. After that, the scaling and deinterlacing will be performed. This format is then fed to an
encoder. And inside this encoder the RGB is transformed to RGB -> (4:4:4) -> (4:2:0).
Therefore I extended the Premiere interface so that it is also able to export YUV (4:4:4), YUV (4:2:2), RGB24
and RGB32. So if you are using the latest version of FlasK (Xis versions) the processing
chain is in the YUV format and is able to export it with my plugin to this YUV format. This is
the main reason why it is so much faster. It does not do all these kind of transformations, which are completely unnecessary.
Unfortunately not all encoders can take YUV as input. Untill now I noticed that CCE SP, Windows
Media encoder Vx.x and many codecs (e.g. DV/DIVX/MPEG4/HUFFYUV) can do that.
If you have a license for encoders that does not support YUV processing, I would suggest
you to e-mail the authors for support and ask if they would implement it. It is very simple
to implement this feature (It only has to skip some processing). I already e-mailed the
author of TMPGEnc (did not get any response) about it, but I can imagine that it is hard for
him to implement it, because all this processing is done in RGB. But if you want to have a
faster TMPGEnc, you can send him an e-mail whether he is willing to implement YUV input or not.
RGB24 RGB32 YV12 YUY
Ligos x x
TMPGEnc x x
CCE SP x x x
bbMPEG x x
DIVX x x x x
HUFFYUV x x x x
About the dual pass.
--------------------
Dual/multipass encoding enables you to code video with a high quality.
Because you can specify the exact bit rate that the encoder must
use, you can use your space (CD-R) disc completely. Personally, I
always use dual/triple pass encoding to completely fill my 80 min disc.
With this method I am able to fit 1 hour of high quality progressive
video on single 80 min CD-R discs (SVCD)
Split function with TMPGEnc:
----------------------------
With this function you are able to split your video
stream while encoding (so there is no post processing). So you
can create 2 VCD streams in one go. (No need for splitting
of the encoding anymore, just drag the files in e.g. NERO)
Please read the splitguide on my site (www.videotools.net)
How to use the benchmark for FlasK ?
------------------------------------
Options->Select Output Format->Video Server
Options->Output Format Options->General(tab)Enable benchmark
Options->Global project->General->Compile time ~100sec
(A longer compile time is more accurate. You need a minimum of 500frames for
reliable results).
Run->Startconversion
Now a file c:\benchmark_results.txt is written. Please fill in the
requested data for comparison. You can send me the results if you like.
Guides:
-------
There are many good guides on how to use this plugin. You can find a guide
and some good links on my site (www.videotools.net). The site www.rmvos.nl
has the latest info about this plugin most of the time.
So maybe you want to start looking there first.
Tested operating systems:
-------------------------
I have personally tested it on Windows 98, NT and Windows 2000.
So this should be no problem.
Tested programs:
-------------------------
Premiere v5.x (RGB only)
Premiere v6.x (RGB only)
FlasK v0.x (RGB only)
multipass FlasK v0.6 (RGB only)
multipass Xis x.x (RGB,YUY,YV12)
Note: due to the fact that the Xix FlasK version uses old header files, some versions do
NOT export YUV correctly. Hopefully he updates his header files soon.
BUGS:
-----
If you find a bug, please send me an e-mail so that I am able to fix it.
Limitations:
------------
Currently the AVIWrapper mode is not able to export audio. Hopefully, I am
able to implement this in the future (Let me know if you think it's interesting).
For me, this feature is not very useful because I always save the audio to WAV
and code it with WAV2MP.exe, or route the audio to AVISynth and code the audio in TMPGEnc.
Known problems:
---------------
-TMPGEnc behaves strangely when using the AVS scripts (e.g. audio is not working).
Disable the DirectShow filters in TMPGEnc when using AVIsynth. You can find out
on my site how to do this.
-Encoder/player will not read the AVIsynth scriptfile ?
I noticed that many "new" programs do NOT use the Windows functions to read
the AVI files. If they do NOT use those standard Windows functions AVIsynth will
not work. Known programs that do NOT use those routines are CCE SP v2.62,
Windows Media Encoder Vx.x
Furthermore, I heard that there are problems with Windows Media Player 7.
-You can NOT serve to the Media Player v6.4 in Windows 98 while using the AVIWrapper mode.
If you do open the created AVI in the Media Player using W98, it will result in
a crash of your system. This is not a bug of the AVIWrapper but more than a shortcoming
of the Media Player using W98. The problem is as follows: when the codec is getting the message
to decode a frame, the Media Player sets the operating system in such a mode that no
other application gets any CPU time. Because the codec gives a request to the
server to decode a frame and waits 'till this is ready, it looks like your system hangs.
The Media Player disables all other applications (and the server) and this frame will never be decoded and the Media Player waits forever..............
Untill now, I noticed that ONLY the Media Player does this while running under W98. So
all tested encoders worked fine while running W98.