Using VirtualDub - Re-encode AVI to Ensure Maximum Compatibility

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmet
    Super Moderator
    • Nov 2002
    • 8697

    Using VirtualDub - Re-encode AVI to Ensure Maximum Compatibility

    Software you will need:
    1. <a href="http://www.divx-digest.com/software/gspot.html">GSpot</a> or similar
    2. <a href="http://www.digital-digest.com/dvd/downloads/showsoftware_virtualdub_346.html">VirtualDub</a>
    3. <a href="http://www.divx-digest.com/software/divxcodec6.html">DivX</a> or <a href="http://www.divx-digest.com/software/xvid.html">XviD</a> codec installed


    <hr>

    Introduction:

    Many DVD players are now capable of playing AVI (MPEG-4/DivX/XviD) files. Unfortunately, not all AVI files are compatible with stand alone players. This guide will teach you how to re-encode AVI files so that you can make sure they will have maximum compatibility with stand alone players (although absolute compatibility is hard to ensure). Now because DVD players are different, and newer models will play more types of MPEG-4 files, this guide should only be used if you know that your AVI file isn't standalone compatible (and preferably if you know what types of AVI/MPEG-4 files your DVD player will play). It is very important that you check your DVD player's documentations or their official website to see if they have any information on AVI/MPEG-4 compatibility (eg. for my DVD player, the information can be found on the official website).

    This guides goes through some of the common problems you might have in regards to compatibility (see the first section "Reasons for Incompatibility").

    Just a note though, when re-encoding, your output will always lose some type of quality compared to the source, whether it be noticeable or not. Your never going to improve quality by encoding with a different codec. The re-encoding instructions in this guide is designed for speed and quality will suffer as a result.

    Also, if you want a simple point and click type experience, you can use AutoGK using the instructions listed here (AutoGK Step 1 onwards). You will still need to note what is required for compatibility with your DVD player, and if you don't have access to this information, then you should take note of the "Reasons for Incompatibility" section below in regards to the common requirements to ensure maximum compatibility.

    Note: The original method outlined in this guide can be found in this article. Some additions are also based on some excellent suggestions provided by UncasMS.

    <hr>

    Reasons for Incompatibility:

    As mentioned above, your standalone player will have different criteria to ensure compatibility, but here are some commonly found reasons for incompatibility:
    • The FourCC code (the code which tells the player what kind of file is being played) can sometimes be changed to a more common one to ensure better compatibility. For example, many players prefer "dx50" as the FourCC code, rather than "div3" or "xvid", and it's often possible to make files compatible just by changing the FourCC code (without the need to re-encode). Changing the FourCC code is very easy, and you can do this with a simple tool like AVI FourCC Changer.

    • Your MPEG-4/DivX/XviD encoded AVI file includes the use of QPEL (quarter pixels) or GMC (global motion compensation). These are frequently used to improve quality of encodings. Generally, if you can ensure your MPEG-4 encoded file fits the ISO MPEG-4 Simple or Advanced Simple profile (without QPEL or GMC), then the chance your file is compatible would improve.

    • The resolution of your AVI file is above that supported by the DVD player. DVD players will normally only support up to 720x576 (PAL) and 720x480 (NTSC) resolutions. Even the DVD players that can upscale to high definition may only accept these resolutions, due to the nature of their MPEG-4 decoding chips. A future version of this guide will include instructions on how to use the resize filter to resize the video.

    • If your AVI file uses VBR (variable bitrate) MP3s for audio, these are sometimes not supported by your DVD player. A future version of this guide will include instructions on how to re-encode audio to ensure compatibility. The current version of this guide assumes you have an AVI file with CBR (constant bitrate audio) MP3 audio, as otherwise you will may run into problems using VirtualDub (which has limited audio type support).

    • When the AVI file is burned to CD/DVD, the burned disc may have to be in a certain format (eg. ISO 9660 for CDs). There may also be bitrate limitations because of the speed the DVD player can read from CD/DVDs. For example, my DVD player only supports 1500 kbit/s (187.5 KB/s) for CDs and 3000 (375 KB/s) kbit/s for burned DVDs. Burned DVDs also have to be less than 4 GB in size for my DVD player.

    • There might also be a file size limit. A single AVI file normally shouldn't exceed 2 GB. You can use this guide to cut/split your AVI files.


    <hr>

    First up, we need to find some information about the AVI file, to ensure that you either match the size of the original file, or to see if the original file's bitrate is too high (see "Reasons for Incompatibility" above). We'll use GSpot, as it give you most of the information you'll need later on. Load the avi file you wish to re-encode into GSpot and write down (or do a screen capture, if you are capable):
    1. the original bitrate (red) (in kilobits per second)
    2. the "runtime" (hours:minutes:seconds)
    3. the "FPS" (frames per second)
    4. the audio bitrate


    The reason you need all of this information is to use it later in a bitrate calculator to set the size of the re-encoded AVI file (eg. if you need the file to fit onto a CD). In actual fact, you can simply enter the "the original bitrate" listed in GSpot into the DivX/XviD codec, and you should get roughly the same sized file, but it won't be as precise as using the built in calculators for the codecs.

    After you have gotten it all down, you can close GSpot. (Screen Shot Below)



    <hr>

    Now start up VirtualDub and load the avi file you wish to re-encode. Select the "Audio" drop down menu at the top (red). Ensure "Source audio" (blue) and "Direct stream copy" (green) are selected.

    "Source audio" should be selected by default, and it simply means that VirtualDub will use the audio that was found within the loaded AVI file (as opposed to "No Audio", which uses no audio for the output, and "WAV audio", which allows you to replace the current audio with the audio in a WAV file).

    "Direct stream copy" (like the video equivalent) simply means that no processing will be done on the audio, and it will be copied over bit for bit from the loaded AVI file, maintaining the original quality and will be very quick. (Screen Shot Below)

    Last edited by admin; 6 Jan 2006, 08:46 PM.
  • jmet
    Super Moderator
    • Nov 2002
    • 8697

    #2
    Using VirtualDub - Re-encode AVI for standalone compatibility

    Now click "Video" at the top and then click "Fast recompress" (red). (Screen Shot Below)



    <hr>

    Now click "Video" at the top again and click on "Compression" (red). (Screen Shot Below)

    Comment

    • jmet
      Super Moderator
      • Nov 2002
      • 8697

      #3
      Using VirtualDub - Re-encode AVI for standalone compatibility

      After clicking "Compression...", you will now have to choose which codec you want to use. Either XviD or DivX. First I will show you the DivX method below, then on the next page I'll show you XviD method. You can skip to the XviD method <a href="http://forum.digital-digest.com/showthread.php?postid=335919#post335919">here</a>.

      Using the DivX codec:

      On this screen, select the DivX codec (red) , then click the "Configure" button (blue). (Screen Shot Below)



      <hr>

      After clicking the "Configure" button, this screen will come up. As mentione earlier, you can enter in the original bitrate you wrote down in the first step in the "Bitrate box", mine was "819kb/s", so thats what I put there (red).

      Or if you want something more precise, you can use the built in bitrate calculator by pressing the button with the picture of a calculator on it. Here, you'll need to enter some of the other information we took down from GSpot, such as the duration, the audio bitrate, FPS and also the file size you want to achieve (either match the original file's file size). Once you enter all of the information, the bitrate you need is calculated for you and the bitrate is automatically adjusted for you as well when you press "Accept". (Screen Shot Below)



      One thing to note here is that to ensure maximum compatibility, try to make sure the bitrate isn't too high, as you may risk problems with skipping. The range of acceptable bitrate will vary from player to player (so check your player's manuals for more information). For my DVD player, it is below 1500 kbit/s for files burned on CDs and 3000 kbit/s for files burned onto DVDs.

      Now, make sure "1-pass" encoding is selected. Also make sure it says "Home Theater Profile" in the "Certification Profile" box (blue). Then click the "OK" button after you have completed the above (green). Then click "OK" on the "Codec" screen after that. (Screen Shot Below)



      For a more detailed explanation of profiles, and other DivX codec settings, please refer to this guide.
      Last edited by admin; 6 Jan 2006, 08:44 PM.

      Comment

      • jmet
        Super Moderator
        • Nov 2002
        • 8697

        #4
        Using VirtualDub - Re-encode AVI for standalone compatibility

        Using the XviD codec:

        Select the XviD codec (red). Sometimes you have more than on XviD listed (one with "FOURCC Code" "xvid" and another with "yv12") - in this case, choose the one that has the "FOURCC Code" "xvid" (blue). Click on Configure (green) to continue. (Screen Shot Below)



        <hr>

        After clicking on the "Configure" button, this screen will come up. There are several things we need to check/change here so I will refer to them by color. The color corresponds to the color box on the screen shot. Do them in the order I list below. (Some might already be set to what they are suppose to be though.). For a more detailed explanation of profiles, and other XviD codec settings, please refer to this guide.

        Red - 1. Click the down arrow and select "AS @ L5" for the profile @ level. "AS" stands for "Advanced Simple". As mentioned above many DVD players only support "Simple" or "Advanced Simple" profiles, and without QPEL/GMC support.

        Blue - 2. "single pass" is the fastest, but won't give you the best quality. "Twopass" will take approximately double the time of a "single pass", but the quality will improve. For this guide, we'll select "single pass".

        Green - 3. Click this button until it says "Target bitrate (kbps)" on the button

        Gold - 4. Enter in the bitrate number you wrote down from GSpot in the first step or for something more precise, click on the "calc" button next to it to open up the XviD bitrate calculator. Here, you'll need to enter some of the other information we took down from GSpot, such as the duration, the audio bitrate, FPS and also the file size you want to achieve (either match the original file's file size). Once you enter all of the information, the bitrate you need is calculated for you and the bitrate is automatically adjusted for you as well when you press "OK".

        One thing to note here is that to ensure maximum compatibility, try to make sure the bitrate isn't too high, as you may risk problems with skipping. The range of acceptable bitrate will vary from player to player (so check your player's manuals for more information). For my DVD player, it is below 1500 kbit/s for files burned on CDs and 3000 kbit/s for files burned onto DVDs.

        Purple - 5. Then click on this button (purple) (Screen Shot Below)



        <hr>

        After clicking the "More" button the "XviD Configuration" screen will pop up. "Quarter Pixel" and "Global Motion Compensation" boxes must be unchecked! Do not put a check mark in those boxes! (red)! For maximum compatibility, uncheck the "B-VOPs" altogether, otherwise put a 1 in the "Max consecutive BVOP's:" (blue). Some experiment may be needed, as some players will not playback files with 2 B-VOPs, but other will if you deselect the "packed bitstream" option. If you have to use B-VOPs (which improves quality, but we're doing 1 pass encoding so quality has been sacrificed already), either disable the "packed bitstream" option, or leave "Max consecutive BVOP's:" at 1. (Screen Shot Below)



        <hr>

        After setting the above settings, now click the "Aspect Ratio" tab (red). Make sure it says "Square (default)" in the shape of pixel box (blue). It should be selected by default, but non square pixels are good for encoding widescreen (eg. anamorphic) content, but many DVD players won't support this. (Screen Shot Below)



        Press "OK" to close down the "Profile @ Level" setup screen and return to the main XviD setup screen. There is an "Advanced Options" button there that you can click on to setup further options for XviD (like Motions search precision, VHQ mode). Most of these settings are already explained in this guide, so you should go there and take a look. One interesting option is in the "Debug" section, where you can specify the output AVI's FourCC code, and change it to "DX50" for better compatibility (see the "Reasons for Incompatibility" section above).

        You're done! Just keep clicking the "OK" button until you return to the main VirtualDub screen. Now these settings for XviD and DivX are already set, so the next time you want to re-encode a video, you will just have to set the bitrate and thats it.
        Last edited by admin; 6 Jan 2006, 01:39 AM.

        Comment

        • jmet
          Super Moderator
          • Nov 2002
          • 8697

          #5
          Using VirtualDub - Re-encode AVI for standalone compatibility

          After completing either the XviD method or the DivX method, lets start saving the avi in VirtualDub.

          On your VirtualDub screen, click "File", then click "Save as AVI...". You cannot use the same name unless you are saving it to a different folder/directory than the orgininal avi file cause VirtualDub needs to use that file to re-encode. (Screen Shot Below)



          <hr>

          After clicking the "Save" button, VirtualDub will now start to re-encode the video file with the codec you chose earlier. (Screen Shot Below)



          <hr>
          Last edited by jmet; 31 Dec 2005, 07:12 AM.

          Comment

          • jmet
            Super Moderator
            • Nov 2002
            • 8697

            #6
            Using VirtualDub - Re-encode AVI for standalone compatibility

            Your newly created avi file should be almost the same size as the original. (Screen Shot Below)



            Enjoy!
            Last edited by jmet; 31 Dec 2005, 10:59 AM.

            Comment

            • UncasMS
              Super Moderator
              • Nov 2001
              • 9047

              #7
              - i know that the reference to this guide proposes GSPOT as a first step but it is more or less useless

              divx6 as well as xvid have an integrated bitrate calculator so you better NOT use values given by gspot but rather define what you want your target to be!

              use the internal calculators and define the output to be 700mb for example


              - instead of proposing to re-encode a file entirely you should have thought about the four-cc in the first place

              many players (not only old ones) handle "dx50" best so in some cases a conversion is total nonsense
              the simple change from div3 or xvid to dx50 may already solve problems and thus changing the 4cc should be tried before any lengthy conversion


              - i see absolutely no reference to ac3/total bitrate of certain files which cause many players to stutter


              - in the very beginning you suggest to use *fast recompress* in vd's video options as it is faster
              next using divx6 home theater profile is your choice but no further option is taken care of

              this is halfhearted to say the least

              if you want the conversion quick&dirty then make sure the profile is using a SINGLE pass; otherwise the last used setting will be used for this job as well and a multipas, n-pass may be the result and will fail


              - packed bitstream/consecutive bvobs should best be disabled (for older standalones) and of course only 1 consecutive b-frame should be used
              a screenshot with 2 is definitely misleading and a crappy setting!

              dxn profiles dont seem to allow UNpacked 1 bvobs by the way

              - i see absolutely no reference to motion search precision / vhq mode in the xvid settings and i gather you're not at all familiar with them
              using just any given value is a waste of time and plain stupid


              - when configuring xvid one should think about the four-cc again and certain players will not like xvid
              it might therefor be very useful to make yourself familiar with this option and use the very setting that the standalone player might prefer


              - what about mp4, mkv or ogm by the way?
              they are main reasons for conversion


              a little more research might have spared other people's time
              (converting with wrong settings or replying to shallow tutorials)
              Last edited by UncasMS; 5 Jan 2006, 11:11 PM.

              Comment

              • soup
                Just Trying To Help
                • Nov 2005
                • 7524

                #8
                VirtualDub has been updated as of today to 1.6.12.0.

                Comment

                • UncasMS
                  Super Moderator
                  • Nov 2001
                  • 9047

                  #9
                  since one has to deal with vbr mp3 in many cases i would prefer virtualdubMOD anyway but thanks for the hint, soup

                  Comment

                  • Ironwalker
                    Junior Member
                    Junior Member
                    • Jul 2005
                    • 12

                    #10
                    Sorry to bring this up but, it had to be updated for newest VirtualDub.

                    VirtualDub 1.81

                    Drag .avi over desktop Icon of VirtualDub or load .avi
                    under video tab click &quot;direct stream Copy&quot;
                    Under audio tick
                    &quot;Full Proccessing Mode&quot;
                    Under audio again, tick Compression
                    highlight lame then to right hishlight 128kbs stereo CBR 16kbs
                    save avi under file tab
                    done
                    In sync and perfect.

                    ======================================== Edit; Sorry mods and readers, Just realised the thread is Re-encode AVI to Ensure Maximum Compatibility I probably should have took my time to see where this goes. I search awhile back for instructions on redoing avi movies' audio from VBR to CBR so my standalone dvd player can play it and found lots of older stuff not working or causeing sync issues when following there tutorials. I posted this to fix the issue with the new 1.8.1 VirtualDub....please put this where it belongs and once again my apologies.
                    Last edited by Ironwalker; 28 Oct 2008, 06:28 AM.

                    Comment

                    Working...