My other scripts
Switch to Polish

The AVI2MPEG script

Actual version

1.01 (12 Oct 2004)


The AVI2MPEG script is written in PERL and it uses the MJPEGTOOLS library. This script can merge AVI files and convert them to MPEG-1. You can also add transition effects to your movie (see example movie 1 (4.6 MB), movie 2 (3.4 MB)).


  1. Download and install the MJPEGTOOLS library. With this libary you can use one type of transition only - the "blend" transition. If you want to use the "random", "overlay" or "wipe" transition you must install two files: overlay.flt and wipe.flt which are integral part of the Linux Video Studio.
  2. Download the AVI2MPEG script and copy it to a directory where you keep binaries.


Usage: avi2mpeg [OPTION] FILE ...[OPTION]... [FILE]
Displays help message
Output version information and exit
-o name
Use 'name' as the name for the file produced by this script
When files are merged the TRANS transition will be used. TRANS may be: 'blend', 'random', 'overlay1', 'overlay2', 'wipe1', 'wipe2', 'wipe3' or 'wipe4'. When TRANS is 'wipe1', 'wipe2', 'wipe3' or 'wipe4' you can use the following 2 options:
-n NUM
number of wipe columns/rows (default: 1)
-r NUM
disable/enable reposition. NUM may be: 0, 1, 2 or 3.
0: disable1: only scene 1
2: only scene 23: both


Convert file.avi to file.mpg

avi2mpeg file.avi -o file.mpg

Merge file1.avi and file2.avi and convert merged file to file.mpg

avi2mpeg file1.avi file2.avi -o file.mpg

Merge file1.avi and file2.avi using the "random" transition and convert merged file to file.mpg

avi2mpeg file1.avi -t random file2.avi -o file.mpg

Document last modified: Saturday, 12-Aug-2017 19:14:41 CEST

Stanislaw Polak,