Index
A. Changes Log
0. Requirements
1. Introduction
2. Installation
3. Using Instructions
3.1. Configuring Output
4. FAQ
5. Acknowledgements
6. Contact Info

Readme

A.Changes Log

- Version 0.6
  - SMP support
  - iDCT API
  - IEEE1180 testing
  - Control Panel
  - Audio Player
  - Jobs
  - Quality improvements
  - MISM API
  - OpenDML AVI Output
  - Profiles
  - Audio Dynamic Range Compression
  - Audio extraction
  - MMX, 3DNow, and SSE2 optimizations.
  - Much more

0.Requirements

- Windows 9x/Me, Windows NT4.0/2000 or Windows XP
- CPU with MMX technology. Dual CPU systems supported.
- For MPEG output you may need additional plugins. Although
  FlasKMPEG bundles with bbMPEG encoder, other commercial
  encoders are also supported.
  - LSX-MPEG plugin 1.0+
  - Panasonic Premiere plugin 2.01 or 2.1+
- AVI files are supported right off the box

1.Introduction
1.1 What FlasKMPEG does?
FlasKMPEG takes MPEG streams (video streams are currently not supported) and encodes them into another format, trying to achieve the maximum possible quality and trying to minimize the conversion impact providing a straightfordward aproach to the MPEG1/2 to MPEG/AVI conversion.
FlasKMPEG uses 'plugins' to support output formats making that way the program more flexible, and having a wide variety of output options.

1.2 How do you achieve High Quality Conversion? How does it work?
FlasKMPEG tries to take control in all the parts involved in a transcoding operation. Doing so, the whole process can carefully been controled and tweaked so optimal quality can be achieved.
FlasKMPEG MPEG2/MPEG1 decoder uses the MSSG (Mpeg Software Simulation Group) decoder, that is what is usually called the 'reference' decoder.

2.Installation instructions

General procedure
The program is packaged into a self-extracting executable that will deploy the contents of the program into the desired folder. Just execute the package and choose a destination directory.
To install a plugin just copy it into the program's folder and rename it to whatever_you_want.cm.flask. FlasKMPEGpeasopeich.dll can still be used for compatibility reasons. That means that you can name a plugin everything you want, but in order to be detected, it must have the termination *.cm.flask (standing for 'compiler module for flask').
New from 0.6 you can use customized iDCTs. An iDCT is a part of the MPEG decoding process that takes significant amount of time in the decoding process. FlasKMPEG supports different iDCT implementations through iDCT modules, files with the name *.idct.flask . Just throw your customized iDCTs into FlasKMPEG directory and they will be recognized automatically.
FlasKMPEG 0.6+ also support standarized MPEG inputs. A MISM (Mpeg Input Stream Module) can be seen as an input plugin but just for MPEG streams. Although in 0.6 the support in MISM is very limited, is expected to increase in future releases.

When FlasKMPEG starts up it will detect all the available and CORRECTLY INSTALLED plugins. All the detected plugins will be listed in the select output format menu. The most likely reason for a plugin not being detected on startup is an incorrect installation. Please, follow the instructions below for specific plugin installation.

Specific installations

- Panasonic MPEG1 Encoder Plug-In for Adobe Premiere5.x

  Company info: Panasonic Digital NetworkServe Inc. http://www.networkserve.co.jp/mpeg/index_e.html

This plugin will allow you to export MPEG1 files from FlasKMPEG. You don't need to have Premiere to install the plugin and use it.

1.- Create a folder for the program and place the program inside that folder.
2.- Install the Panasonic plugin and write down the place where the plugin will lay in. The installation program will ask for it, and if you have Premiere installed it will point to the Premiere plugin directory, if not you have to tell the installer the folder you want to place the plugin.
3.- Once the installer is over, you have to copy the plugin into the FlasKMPEG.exe folder. The original name of the plugin should be something like "cm-mpeg-pwi2.0e.prm" although this may vary between versions.
4.-If you've successfully found and copied the plugin into FlasK MPEG folder you have to rename it to:
FlasKMPEGpeasopeich.dll or panplug.cm.flask
5.-That's it, the program should run now without a problem

- LSX-MPEG for Adobe Premiere

  Company info: LSX-MPEG for Adobe Premiere http://www.ligos.com

This plugin will allow you to export MPEG1 and MPEG2 files from FlasKMPEG. You will need to have Adobe Premiere to install the plugin.

1.- Create a folder for the program and place the program inside that folder.
2.- Install the LSX-MPEG plugin and write down the place where the Adobe Premiere's plugin folder is located.
3.- Once the installer is over, you have to copy the plugin into the FlasKMPEG.exe folder. The original name of the plugin should be something like "cm-lsx.prm" although this may vary between versions.
4.-If you've successfully found and copied the plugin into FlasK MPEG folder you have to rename it to:
lsxmpeg.cm.flask
5.-That's it, the program should detect now the plugin without a problem

- Cinema Craft encoder

  Company info: Custom Technology Corp. http://www.cinemacraft.com

This plugin will allow you to export MPEG2 files from FlasKMPEG. You will need to have Adobe Premiere to install the plugin.

1.- Create a folder for the program and place the program inside that folder.
2.- Install the Cinema CraftLSX-MPEG plugin and write down the place where the Adobe Premiere's plugin folder is located.
3.- Once the installer is over, you have to copy the plugin into the FlasKMPEG.exe folder. The original name of the plugin should be something like "cm-mpeg-cce.prm" although this may vary between versions.
4.-If you've successfully found and copied the plugin into FlasK MPEG folder you have to rename it to something like:
cinemacraft.cm.flask
5.-That's it, the program should detect now the plugin without a problem

*WARNING*
The original package of FlasK MPEG encoder doesn't include neither the Panasonic plugin nor LSX one because they are commercial products. If you received a package with the plugin included you're not dealing with the original distribution.

AVI output and MPEG output through bbMPEG (MPEG1, MPEG2, VCD & SVCD) are supported right off the box.

3.- Using Instructions
Using FlasKMPEG
Using FlasK MPEG is easy!. To convert a file the first you have to do is open the file with File->Open Media. FlasKMPEG will show the dialog to open files. The possibilies to open files will depend on the current configuration, but all supported media files are listed in the open dialog box.
Is important to note that MPEG streams can have any name and extension, and although FlasKMPEG lists the usual ones, that won't preclude the correct opening of a file.
Depending on the media being opened, different options can appear when opening the file. Usually those options imply selecting what tracks are desired to perform a conversion, or some other mediadependant settings.

The FlasKMPEG Control Panel
The control panel is a powerful and helpful tool that can ease the process to perform your converson. It gives quick access to the most used features of FlasKMPEG and also can be used to preview and prepare the output material.
The control panel pops up just when a file has been opened. Lets see what the main buttons do:

- ||<< Seeks the video to the first frame available in the stream. If the video is corrupted at the beginning, this frame doesn't need to coincide with the beginning of the file.
- <| Play backwards. Plays the stream frame by frame backwards. Because of the nature of MPEG streams, this option is usually very slow.
- |> Play. The button shows one frame after another, that is playbacks the file. This feature doesnt run in realtime, it totally depends on the power of your CPU.
- [] Stop. Stops whatever the control panel is doing.
- < Frame backwards. This button steps one frame backward from the current position.
- > Frame forward. This button steps one frame forward from the current position.
- << Fast backwards.
- >> Fast forward.
- >>|| Jumps to the last frame available in the stream

Working with Jobs
A job represents a conversion task. You can program as many jobs as you want inside the control panel. When you click on 'FlasK It!' all the jobs will be converted with the current configured options.

- Adding Jobs. To add a job you must select the range of the job in the slider. To select the start position move position the video in the desired position and click on the |_ button. Repeat the process to select the end position using the _| button. After you're done click on 'Add' and the job will be added to the job list.
- Deleting Jobs. Select a job from the list and click on 'Delete'. If you want to delete all jobs, click on delete all.
- Reviewing Jobs. You can use the position marker buttons |_<< and >>_| to jump to the beginning and end of the job. Also, clicking on the job list will show the selected job.

The FlasKMPEG Audio Player
The audio player can be used to preview the audio conversion and select the audio track to use. Lets see its settings:

- Dynamic Audio Compression. If turned on it tries to make the sound constant in volume. If the volume is low, the audio is amplified and if it is strong it is attenuated. The effect is that the range of volumes that the audio can have is compressed, and thus the name. Use this option with care, if the setting is to high you can easily overload the audio.
- Normalization. This option doesnt alter the dynamic range of the audio. It simply amplifies the sound by the value specified. If you click on 'search' the stream will be parsed looking for the highest peak in the audio stream and that value will be set. Permorming a conversion with this value will assure you that you don't overload the audio and at the same time you keep all the dynamic range and set the volume to its maximum possible.
- Multichannel volumes. Effective when you have multichannel audio, it allows the user to adjust the volume of individual channels
- Dolby Surround Downmix. If selected, the multichannel downmix is Dolby Surround compatible.
- Available tracks. Choose here the track you want to use to perform the conversion. The audio player will play the track you select.

Configuration Options
If you succesfully opened a stream you should be able to open the configurations dialog (Options->Global project options) or Configure in the control panel.
The window is divided in a series of tabs: video, audio, post processing, files and general that are explained below.

Video tab

- Frame Size:
  this will be the final resolution of the compiled video. The numbers must be a multiple of 16 because video codecs usually require that. If you want to compile VideoCD compliant MPEGs the resolucion has to be 352x240 for 29.97, 23.976, 24 framerates (NTSC) and 352x288 for 25fps (PAL).
- Time Base:
  This will be the final frame rate of the compiled video. Important! From version 0.45 and up, this framerate is detected from the input stream if you're using the default profile. If you feel that FlasKMPEG didn't guess it correctly you can change the frame rate. Selecting a fps other than the fps from the original file, will imply doing framerates conversions.
- Video Structure:
  With Video Structure you can tweak the way FlasKMPEG decodes and handles interlaced and progressive content. Here we have the options available:
  Reconstruct progressive images: This option is only available with 23.976 and 24 fps setting. It's main use is for 24fps progressive encoded MPEG2 material. Check this option if your source is 24fps progressive. This setting is not an IVTC (inverse telecine); If the video contains the original progressive frames checking this option will effectively ouput those frames. If this option is not checked, FlasKMPEG will follow the MPEG sintax for decoding the video structure.
  Deinterlace video: If your source is interlaced you can use the video deinterlacer. The deinterlacer analizes the video and tries to convert it into progressive video trying to remove the interlacing artifacts. Use it with care because it's terribly slow and may be it won't help in your case. The video deinterlacer analizes the motion of the video. If a zone is moving, it blends or interpolates that zone avoiding the artifacts. In quiet zones, the full resolution is kept. You can tweak the behaviour of the deinterlacer by making him blend the moving areas (blend instead interpolate) or interpolate them. With the 'threshold' setting you control how much sensitive to motion is the algorithm. A lower setting means more sensibility (0-255).
  To help you decide what settings are the best ones for you, here you have a table:

  Source type | Recommended action
  NTSC 24 progressive | Deinterlace video off & Reconstruct progressive frames
  NTSC 29.97 or 30 | Try Deinterlace video if interlacing artifacts are annoying
  PAL 25 | Try Deinterlace video just for video material (soccer, TV programs...)

- iDCT options:
  The video information inside MPEG files is stored in the frequency domain rather than in the spatial domain (the images we see). That way, the information gets compacted and that compactation can be used to compress (reduce) the amount of information you have to send over the transmission channel. MPEG uses the DCT (Discrete Cosine Transform) to translate spatial information into frequency information.
  To bring back the spatial information from the MPEG stream you have to apply the iDCT, that is, the Inverse Discrete Cosine Transform, that undoes the DCT that was used during encoding.
  Although MPEG is almost deterministic (given a MPEG stream the output should be identical in all decoders), the standard has a degree of freedom when choosing the iDCT to use. That way, the decoder can be more easily implemented depending on the hardware below it. What the standard requires from the decoder is that the iDCT meets IEEE-1180 specs, or in plain words, that the error from the iDCT doesn't go beyond what IEEE-1180 imposes.
  Selecting 'Auto Select', FlasKMPEG will perform a benchmark of available iDCTs in your system and it will pick up the one that being IEEE1180 compliant is also the fastest. If you want to know more details about the iDCTs installed in your system, click on 'Perform Test'. A window will pop up and will perform the IEEE1180 test over the currently selected iDCT. Check the first line of the analysis result to know if the iDCT passes the test:
  for example for the default MMX iDCT you should see:

  FlasKMPEG Analysis result: IEEE-1180 32 bits integer precision using MMX Meets IEEE1180 spec Test time: 4.346 seconds

Audio Tab

- Direct Stream Copy:
  Within this mode, the track you selected when you opened the file will be copied to the specified file 'Output files'. Currently supported streams are MPEG1 audio and DolbyDigital AC3. If you multiplex the video and the audio, the result should sync.
- Decode Audio:
  This is the default mode. Only AC3 audio is supported at this time. The audio is decoded and is multiplexed with the video without additional steps. Here you can select the out sample rate frequency for the audio. Clicking 'Same as input' will leave the sample rate untouched. If you wish to make VideoCD compliant streams you have to use 44100Hz as sampling frequency, and for DVD compliant streams you must use 48000khz. The sampling rate converter is fairly new so it could contain some bugfixes, let me know if you found some.
- Don't process audio: Audio is not processed. The program output just a video stream.

Post Processing Tab

Using post processing you can achieve optimal results when processing your files.

- Resizing quality options:
  This selects the filter to use when resizing. Basically they offer different types of quality and speed settings.
  Nearest neighbour is the fastest and could be used for quick jobs that doesn't need any quality.
  Normal bilinear and bicubic filtering are suitable for those jobs where good quality in resizing is needed. Without achieving the quality of the HQ bicubic, they offer a good balance between speed and quality.
  The HQ bicubic is the highest quality one, and the slowest too. I strongly suggest its use when using the 'keep aspect ratio' option. Keeping aspect ratio usually has weird input and output images sizes so if you use normal bilinear or bicubic filters, you could get a lot of aliasing here.
  However, the best you can do is try all the filters and see what's the one that best fits your needs.
- Letterbox, cropping and aspect options
  - Aspect ratio. All MPEG files carry embedded in the stream the aspect ratio that that video should be displayed with. That implies that the actual video resolution doesn't have to match the intended display resolution. Turning on 'keep aspect ratio' will make FlasKMPEG to adjust the aspect ratio so that the image is correctly displayed on 4:3 displays
  - Cropping and letterboxing. You can select here how to crop and letterbox the video. Read the 'Output Pad' section to learn more about this.

Files Tab

- Output files: You can select the audio and video output files here.

General Tab

- Compiling time:
  Check 'compile whole file' to compile the input stream up to the end of the stream.
  If you want jobs with specific number of frames, specify manually the number of seconds of the compile or equivalently specify the number of frames. The seconds box accepts not integer numbers, and after you have entered a value the program will adjust the number of seconds to match a number of frames for the selected frame rate.
- Search size: Put in this box the amount of KB you want FlasKMPEG to search for audio and video streams. If the audio track you want is missing, try increasing the search size.

The Output Pad

The output pad is an useful tool that allow you to easily select all the cropping, frame size and letterboxing settings looking previewing the settings all the time.
To understand how these settings are related take a look at the logical path the video flows inside FlasKMPEG.

| VIDEO OUTPUT ---> DEINTERLACING ---> RESIZER ---> CROPPING ---> LETTERBOXING

To enable cropping check crop, and to enable letterboxing check letterbox.
When you crop an image you discard some parts of it. The image you crop in FlasK MPEG is the one that is output by the resizer. You can scale the video and crop then the result. The cropped image is always smaller than the resized.
To change the output of the resizer adjust the 'Output Size' controls. If 'crop' is not checked, you will se the window scale at the same time you adjust the contronls. If crop is enabled, you still can adjust the output size, but this time the size of the window will be determined by the 'width' and 'height' controls of the crop pad.
To understand cropping, take a look at the following scheme:

| Resized image or original image width x height |  |  |  |  |  |
|  |  | Top Offset |  |
|  |  |  |  |  | Cropped image crop width x crop height |
|  |  | Left Offset |  |  |

Ajusting 'Top offset' and 'Left offset' you can move the crop window through the resized or original image. 'Crop width' and 'Crop height' you can select the window to crop (and the actual final frame size) and 'width' and 'height' is the size of the original or resized image.
Pressing 'Reset Settings' will reset the settings disabling crop, disabling letterbox and restoring the original image size.
Letterbox is simple, adjust the amount of black bars you want to add at left, right, top and bottom of the image.

3.1 Configuring Output

In this section we will talk about how to configure the output plugins included in the released pack.

- AVI Output
  FlasKMPEG includes an AVI output plugin that should be used to output AVI files from MPEG files. The basic procedure when using the AVI plugin is to select the suitable codecs from the 'output format' configuration dialog. You must understand that and AVI is a recipient in which media is carried in a given format. The format of the AVI is usually referred to as a 'codec' (compressor - decompressor) and you need the compressor codec to be installed in your system to be able to render AVI files with it. Likewise, you also need the decompressor codec in the playing system to render those AVI files.
  Currently, the AVI output of FlasKMPEG has still bugs but it's working OK with many codecs.
- MPEG output through bbMPEG
  FlasKMPEG MPEG output is obtained thanks to the bbMPEG plugin (to obtain the latest version go to Brent Beyeler bbMPEG home page: http://members.home.net/beyeler/bbmpeg.html and copy the bbmpeg.dll file into FlasKMPEG directory and rename it to mpeg.cm.flask ).
  This nifty plugin has the ability to output MPEG1, MPEG2, VCD & SVCD giving the option of the user to tweak a lot of parameters of the mpeg stream. Best of all, IT's FREE. You may notice that it's somewhat slow though.
  bbMPEG has no configuration previous compiling so all the configuration is done when you start compiling a file. In that moment you are able to choose between all the MPEG formats as well as specifying bitrates, framerates and so on for the MPEG output stream.
  For the time being YOU MUST SPECIFY the duration of the compile in the output dialog box when using bbMPEG.

4. FAQ

4.1 Hey Boy. This program is painfully slooow. Is it normal?
It is :-( This program is free, that is, you don't pay for its use. Although the MSSG decoder offers excellent quality it is terribly slow. Notice that the program decodes a MPEG2 stream, resizes the video with bilinear and bicubic flters... From 0.49 MMX has been included in the program and it's expected that performance will increase in future releases.

4.2 Is FlaskMPEG a DVD ripper?
FlasKMPEG IS NOT a DVD ripper. FlasKMPEG was thought mainly for file based MPEG1 and MPEG2 conversions.
4.3 XYZ plugin won't start up!!
First check that the plugin XYZ is installed correctly in FlasKMPEG directory. If it is, check that you meet the requirements of it.
4.4 FlasKMPEG won't open any files!!!
The most likely cause for this is that you have a faulty installation. FlasKMPEG.exe is not the only component of FlasKMPEG. At least one iDCT module must be present and so a MISM has to be.
4.5 Could you add a suspend and resume option?
No, I can't add a suspend and resume option because Adobe Premiere's plugins doesn't support that option.
If your project is gonna take a big amount of time to be finished I would suggest you to encode the thing in parts. You can program FlasKMPEG to compile a specified number of seconds or frames, or use the control panel to generate conversion jobs.
4.9 Installing your program screw up my Windows9x/Me multimedia playback system. You must tell me how to uninstall it. Your program is shit.
Curiously enough, FlasKMPEG setup is harmless. It simply copies the files to the destination directory. Delete FlasKMPEG files, and FlasKMPEG will be gone. There is no way that FlasKMPEG can screw up Windows playback in any way because FlasKMPEG is a standalone application and don't even use DirectShow architechture. Do you want your money back? Sorry, you did not pay nothing for it!!

5. Acknowledgments
To Mr. Avery Lee , creator or VirtualDub for that incredible app, and for his help with the resizing stuff.
To Nemesis for all the Icon designs
To MPEG2AVI author for the MMX iDCT
To DVD2MPG creator for his help with the premiere plugin stuff.
To Aaron Holtzman for his free source AC3 decoder
To the MSSG (MPEG Software Simulation Group) for that magnifient decoder
To all the translators that made internationalization possible
To Benjy for his help with the Web Site
To Brent Beyeler for bbMPEG
To AGRABBER for the AVI output plugin
To Glenn & Remco for his help with the Subpicture Stuff
To Benjy for gfx design and all his support
To all those people that in one way or another contributed to the creation of this program.

6. Contact Info
For suggestions and bugs reach me at:
ultraflask@yahoo.com
home page: http://www.flaskmpeg.net
http://go.to/flaskmpeg

©2000-2001 Alberto Vigatá. All rights reserved.