Copyright: © 2000 B. Beyeler. All Rights Reserved.


Contents
Table of Contents

• About AVI2MPG2

• AVI2MPG2

• Input Project options

• Frame Operations

• Output MPEG file options

• Problems loading files


About AVI2MPG2

AVI2MPG2 version 1.2. By Brent Beyeler, released as freeware.

AVI2MPG2 requires either Win95, Win98 or WinNT. It may work with Win3.1 if Win32s is installed. It also requires the bbMPEG.DLL file and Microsoft's DirectShow (tested with v6.0) and DirectDraw (tested with v7.0). The last thing it requires is a Pentium processor.

Please send questions or comments to:

beyeler@home.com

Visit bbMPEG (or AVI2MPG2)'s web page at:

http://members.home.net/beyeler/bbmpeg.html

Disclaimer and Agreement.

This software is supplied subject to the following conditions. By using the software, you agree to these conditions.

This software is provided 'as is', with no warranty of any kind, including but not limited to any implied warranty of merchantability or fitness for any particular purpose.

In no event shall the author be liable for any damages whatsoever arising out of use or inability to use this software, even if the author has been advised of the possibility of such damages.

If you cannot agree to the above conditions please remove the software from your computer immediately.


AVI2MPG2

AVI2MPG2's main window is divided into two parts, the Input Project part and the Output MPEG File part. The Input Project part is used to specify input files and their options. The Output MPEG file part is used to specify the MPEG output options and to view the entire video being encoded.

Start Encoding button

Click to start encoding or multiplexing. If no input files have been opened, only multiplexing of existing MPEG video and/or MPEG/AC3 audio streams is performed.

Help button

Click to access this help file.

About button

Click to display an About screen.

Exit button

Click to exit AVI2MPG2.


Input Project

Project Load and Save buttons

Load or save all the current settings, including the list of input files. Note that projects do not need to be saved or even used to convert files. This is just a convenience provided to save setups if desired.

File List

This is the list of files (or a single file) that will be encoded, in order, into the single MPEG output file specified.

Add button

Click to add a file to the file list. Input files can be either a media file that is supported by Microsoft's DirectShow or a text file that consists of a list of bitmap type images.

Media files can be any video media types supported by DirectShow, except those that do not support seeking (they must contain video). Supported files should include most AVI and MPEG-1 files and, depending on the DirectShow filters installed, MPEG-2 or VOB files.

Note that MPEG only supports 23.976, 24, 25, 29,97, 30, 50, 59.94 and 60 frames per second. If a media file is used that has a lower or higher frame rate than the above, and the Repeat Frame option is not used, the MPEG will play back faster or slower than normal. The Repeat Frame option can be used for a crude frame rate conversion, but other than that, no frame rate conversion is performed.

Also, bbMPEG only supports 22.05, 32, 44.1 or 48 kHz 16-bit audio. 8-bit audio is converted to 16 bit and 22.05 kHz audio is converted to 44.1 kHz. Other audio types are not supported and the audio from the media file being added will not be used (the video can still be included). If the first media file added has a certain kHz rate, all other media files added must have the same rate or their audio will not be used. AVI2MPG2 also converts all audio to stereo, if it is not already stereo.

Image list files are text files that contain a list of image filenames, including the complete path to the file, one per line. Supported image formats are BMP, GIF, JPG, PCX and TGA. If used in a project that contains audio, silent audio will be provided for the duration of any image lists. Use the Repeat Frame option to specify how many times each image is repeated.

Batch

If this is enabled, all files in the file list are encoded to separate MPEG files. When this is disabled all the files in the file list are encoded into a single MPEG file.

Remove button

Remove the currently selected file from the file list.

Up/Down buttons

Move the currently selected file up or down in the file list, changing the order in which the input files are encoded.

Edit filters

Enable this to view or change the properties of the filters in the filter graph generated by DirectShow when a file is opened. If none of the filters in a graph have properties that can be viewed or changed, this option has no effect.

File Info

This window displays information about the currently selected media file or image list.

File Video

Use the scroll bar and play, stop and pause buttons to preview the video of the current input file. Note that when playing the video it may or may not be real-time, depending on the size and frame rate of the video. Right click on the image to specify the current frame as the Start or End frame in the Frame Operations area.

Frame Operations


Frame Operations

These options apply to the currently selected input file. Each input file can use different Frame Operations.

Invert

Check to flip the entire frame vertically. This option is applied before cropping or resizing.

Deinterlace

Check to do a simple interpolation deinterlace on each input frame. This essentially removes the odd field and creates new odd field interpolated from the even fields. This will remove jittering motion from video but it also can blur the image slightly. Use this if you intend to display the MPEG file on a computer only and the playback software/hardware does not de-interlace the video itself. Do not use this option if you intend to encode video that has separate information in the odd and even fields (i.e. 3D type computer animation, etc.). This option is applied before cropping or resizing.

Repeat

Specify the number of times each input frame is repeated in the output MPEG file.

For media files this can be used to do a crude frame rate conversion. If the input frame rate is 10 fps, setting this option to 2 will cause each frame to be output 3 times, effectively changing the frame rate to 30 fps without affecting the audio.

For image lists, use this to set the number of times each image is repeated. If the image list contained a single image (that was completely black) and the other media files were 30fps files, you could set the Repeat option to 29 for the image list so the output would consist of 30 black frames as the first second of video (with silent audio) followed by the media file.

Start/End

Specify Starting and Ending frames to use from the input file. You can use all frames (the default), one frame or any number of frames from the input file. Frame numbers can be entered here or you can scroll the input video to the desired frame and right-click on the video image to specify the current frame as the Starting or Ending frame.

Crop Frames

Use to crop input frames before any resizing is done. This will crop the input frames to the rectangle specified (left, top to left+width, top+ height). This option is applied after any de-interlacing but before any resizing. It is done even if the input and output resolutions are the same.

Convert to output resolution by

Select a method to convert the resolution of the input frames (after any cropping and de-interlacing) to the output MPEG resolution (only applied if the input and output resolutions differ).

Select Fixed to do an absolute resize of the input frames (either smaller or larger) to the output resolution.

Select Proportional to do a proportional resize of the input frames (either larger or smaller) to the output resolution.

Select Crop to crop the input frames to the output resolution. If the input frame is larger than the output resolution it will be cropped to the rectangle specified by the Crop frame option's left and top coordinates and the MPEG output width and height (Crop left, Crop Top to Crop Left + MPEG Width, Crop Top + MPEG Height). If the input frame is smaller than the output resolution (width, height or both), the frame will be centered in a black frame the size of the output resolution. If one of the dimensions is larger and the other smaller than the output resolution, the larger dimension will be cropped while the smaller dimension is centered.


Output MPEG File

Name

Specify an output MPEG filename here. By default the output file will be named the same as the first input file with the .MPG extension. Any extension can be used, but usually MPEG-1 files use the MPG extension and MPEG-2 files use the M2P extension just to distinguish them from MPEG-1 files.

Resolution

Specify the resolution of the MPEG file. If this resolution is not the same as the input files, they will be resized or cropped according to the 'Convert to output resolution by' option. Common resolutions include 352x240 for NTSCVCD, 352x288 for PAL VCD, 480x480 for NTSC SVCD, 480x576 for PAL SVCD, 720(704)x480 for NTSC DVD and 720(704)x576 for PAL DVD.

Audio

This field displays the type of audio to be encoded. If none of the media input files contain audio this will be set to none and no audio is encoded. Only 32, 44.1 (22.05 is converted to 44.1) and 48 kHz, 16-bit stereo audio is output by AVI2MPG2. All input audio must match or the audio from the input file that does not match will not be used.

Preview with frame options

Check this to display the output video after the frame operations have been applied (de-interlacing, cropping or resizing). If this option is enabled, a white rectangle representing the MPEG output resolution is drawn so the effects of the frame cropping and resizing operations can be inspected.

File #

Displays which input file is currently displayed in the output video window. Use the scroller to switch quickly among the input files.

Frame #

Displays which frame from the current input file is being displayed in the output video window.

Output Video window

This displays the output video which consists of the selected frames (Start/End sections taking into account the Repeat frame option) from the input files in the order they will be encoded.


Problems loading files

AVI2MPG2 may not load all AVI files, it will depend on the DirectShow filtersinstalled.

If you cannot get AVI2MPG2 working correctly, try using AVI2MPG2_VFW instead. It is a Video For Windows version that works with the later versions of bbMPEG. It will not open newer AVI types however, but it should work correctly with most MJPEG AVI's.

Another problem I have encountered is that sometimes DirectShow seems to hang when closing files. AVI2MPG2 may actually close, but the task manager will show a instance of AVI2MPG2 still active (and not responding).

One last problem concerns opening MPEG or VOB files. Depending on the MPEGor VOB DirectShow filters installed, AVI2MPG2 may not work correctly. If the video is displayed in the preview windows correctly, the video part shouldwork (the audio still may not).