avi2mpg1 Frequently Asked Questions - Version 1.5

Question 1 - What is avi2mpg1?

        Avi2mpg1 is a Windows '95/NT command line program to encode .avi
        (audio/video interleave) files to an mpeg-1 file (video and sound,
        or video only). It is the result of my attempt to use the source code
        available on the internet to generate mpeg files from avi files.
        All the available source code used individual bitmap files as input,
        not avi. Although it is possible to strip individual frames out of an avi
        write them to disk, then run the encoder, it was not easy or practical.
        Avi2mpg1 is a single executable that generates the video and audio streams,
        then multiplexes them to a playable .mpg file with one user command.
        Having put it together, I thought there may be other users who might gain
        some benefit from it.

Question 2 - When I double click on avi2mpg1, it just flashes a window briefly, then
             disappears.

        Since avi2mpg1 is a command line program, you need to get to the
        command prompt. Either use Start -> Programs -> MS-DOS Prompt from
        the start menu, or File -> Run, then enter command in the command line box.

Question 3 - Will there be a GUI version of avi2mpg1?

        Possibly, depends on my available free time (what's free time?).

Question 4 - The encoder will not encode the avi I have.

        Avi2mpg1 will encode avi files that fit the following limitations:

        Video: size must be less than 4096 pixels horizontal,
                                      4096 pixels vertical.
               the pixel depth must be 8, 16, or 24 bit.
               the frames rate must be 10, 12, 15, 23.97, 24, 25, 29.97, or 30 FPS.

        Audio: must be 8 or 16 bit, sample rate of 11.025, 22.05, or 44.1 KHz
               uncompressed PCM only!

        If you don't know the parameters of the video file you have are, in
        explorer, right click on the file once, then left click. Select 'Properties',
        then select the tab 'Details'.

        If your avi does not use one of the above frame rates, try the -f  option.
        
Question 5 - When I encode a video of 10 frames per second, the mpeg player I use
             claims the frame rate of the resulting mpeg is 30FPS, but the video
             still looks jerky?

        The mpeg-1 standard allows for frame rates of 23.97, 24, 25, 29.97, and
        30FPS. The lower frame rate videos are upsampled to a higher frame rate
        by simple frame replication. Hence, for a 10FPS source video, each source
        frame is converted to 3 frames in the resulting mpeg. The video is still
        jerky as a result.

Question 5.1 - I would like to encode an avi I have that is 6 frames per second,
               will there be a version that can handle even lower frames rates
               than 10?

        Because of the frame replication issue (see questions 5 & 6) the encoder
        will probably never be extended to handle rates below 10. There are better
        solutions for low frame rate encoding than mpeg-1. Or try using the -f
        option if you don't need audio.

Question 6 - When I encode a video of 10 frames per second, the resulting mpeg is
             larger than the source?

        The resulting mpeg will be as large as the bit rate you specify requires,
        ie: the default is 150K bytes/sec, so if you encode 10 seconds, you get
        150 x 10 = 1500K Bytes for a file size.

Question 7 - When I encode an avi file that uses the Cinepak (or other) codec,
             the resulting mpeg is very "blocky".

        The encoded mpeg can be no better than the original source file for video
        quality, in fact it is usually significantly worse. This applies to all
        codecs. To obtain maximum quality, you must use a high quality original
        video that is only slightly compressed, or not compressed at all. Simply
        encoding miscellaneous avi's you may have lying around will probably not
        work very well. For low frame rates (15 FPS or below) you will get better
        results by using compression methods which directly supports arbitrary
        frame rates, such as the varous avi codecs, or a proprietary streaming
        video encoder.

Question 8 - When I encode a screen capture sequence, the resulting mpeg is not
             very clear.

        Mpeg was intended to compress real world video images, not artificial
        computer generated images.

Question 9 - Will there be an mpeg-2 version?

        Maybe, see question 3.

Question 10 - I want to put an mpeg on my webpage, what settings should I use?

        The best answer is experiment. The biggest problem with any kind of
        video on the web is file size. The tradeoff is quality vs. download
        time. A possible suggestion (just a starting point, try different
        parameters depending on your case):

            Generate the original avi as 160x120x10FPS (I know, I recommended
            in the readme me not to use 10 FPS, but if you do, each group of
            three frames are identical, the resulting B-frames should be very
            highly compressed since there difference from the previous frame is
            0). Don't use audio. Specify a bit rate of aproximately 100K bits/sec.
            Ie: avi2mpg1 -n -s 100 input.avi

            OR:

            Try generating an avi at 6 FPS, encode using the -f 2 option, which
            forces a frame rate of 24 FPS without frame replication. Specify a
            bit rate of aproximately 100K bits/sec. ie: avi2mpg1 -f 2 -s 100 input.avi
            The mpeg can be played back so it appears at normal rate if your mpeg
            player can play in slow motion.

Question 11 - When I encode a small avi (320x240) my results are quite good, however
              when I attempt to encode a large avi (640x480) the results are not as clear.

         There are two possibilities:

         The large avi is probably interlaced, it is certainly interlaced if it was
         captured from video (NTSC, PAL, or SECAM). Mpeg-1 is not particularily
         effective for interlaced video. Try using an mpeg-2 encoder for interlaced
         video.

         Or:

         You have to use a higher data rate, 640x480 has 4 times as many pixels as
         320x240, therefore if you were using the default data rate of 150kBytes/sec
         for the 320x240 video, then you should use a data rate of 600 kBytes/sec for
         the 640x480 video.
