AVS Video Converter supports the command line mode, therefore allowing you to automate your video processing.

Converting your video files via the command line you get a number of important benefits, for example, you can:

  • process videos in the automatic mode,
  • use your own presets for conversion,
  • effectively work with multiple video files,
  • schedule your conversion tasks,
  • accelerate the conversion process.

These opportunities can be indispensable in case you regularly need to convert a lot of different files.

Even if you have never worked with Command Prompt before, you will easily cope with such a task following our instructions. Just use an XML file example that contains the conversion parameters, make a quick correction to it changing some values and then automatically convert any number of files according to this preset. You can use the same preset for new files conversion whenever you wish.

This guide considers the batch conversion with AVS Video Converter.

Step 1: Download and install AVS Video Converter

Click here to get it. After the download is finished, run the AVSInstallPack.exe file and follow the installation wizard instructions.

Please remember the path to the installation folder as it will be necessary later.

Step 2: Add files for conversion

Put all the video files you need to convert into a folder on your computer HDD.

Step 3: Create an XML file

For your convenience, some XML file examples are included into the AVS Video Converter installation and can be found in the program installation folder (by default it is C:\Program Files\AVS4YOU\AVSVideoConverter\examples or C:\Program Files (x86)\AVS4YOU\AVSVideoConverter\examples for a 64-bit version of Windows).

Note: the \AVSVideoConverter\examples folder also contains a number of .BAT files. For a quick demonstration of the command line conversion opportunities, you can launch any of them by double-clicking the file.

If you do not know how to create a new XML file, just copy the appropriate example, open it using any text editor, adjust some configuration parameters depending on your current task and save the changes.

Below you can see an example of the XML file content which includes all the necessary parameters for the entire conversion process.

  • The <conversion profiles="mp4profiles" name="PC - Normal Quality" GUID="DAC093C7-87A8-4574-A439-95168CED8AE4"> tag allows to set the desired output format.

    Where profiles="mp4profiles" is a name of the XML file with conversion profiles (without extension). The necessary XML file can be found in the AVS Video Converter installation folder: \AVS4YOU\AVSVideoConverter\profiles. For example, you can use such values as aviprofiles, dvdprofiles, mpegprofiles etc.

    name="PC - Normal Quality" is a name of the necessary conversion profile that can be taken from the XML file with conversion profiles. It is an optional attribute.

    GUID="DAC093C7-87A8-4574-A439-95168CED8AE4" is a GUID of the necessary conversion profile (it should be taken from the XML file with conversion profiles).

  • The <inputFiles> and <inputFolders> tags allow to set your input files and/or folders location.

    E.g. you can list necessary files one by one using the <inputFiles> parameter or specify paths to folders using the <inputFolders> parameter and filter the folder contents by file extension.

    The *.avi value specified for the <filter> tag in the example above allows to upload AVI files only. The *.* value allows to upload all the video files stored in the folder. To use files of several specified formats only, set the values separating them with a semicolon: *.avi;*.mp4 etc.

  • The <outputPath> tag is used to set a destination path for an output folder (if you want to split your file or convert it to DVD/BluRay) or for an output file (if you want to merge several files).
  • If necessary, you can also set parameters for splitting files, aspect correction and the FLV Player creation.

    As we are about to convert a large number of video files in batch mode, we need to use the <split> section. It should look something like this:

    <split>
            <makeSplit>true</makeSplit>
            <mode>1</mode>
            <size>0</size>
    </split>
    

    The following tags are used in this example:

    • The <makeSplit> tag is used to specify if you want to split files or not when converting them. In this example, it is set to true, that allows you to convert multiple video files without merging them.
    • The <mode> tag is set to 1 that allows you to enable the Batch Mode.
    • The <size> tag is not applied when the mode 1 is selected.

    Where profiles="mp4profiles" is a name of the XML file with conversion profiles (without extension). The necessary XML file can be found in the AVS Video Converter installation folder: \AVS4YOU\AVSVideoConverter\profiles. For example, you can use such values as aviprofiles, dvdprofiles, mpegprofiles etc.

    name="PC - Normal Quality" is a name of the necessary conversion profile that can be taken from the XML file with conversion profiles. It is an optional attribute.

    GUID="DAC093C7-87A8-4574-A439-95168CED8AE4" is a GUID of the necessary conversion profile (it should be taken from the XML file with conversion profiles).

    E.g. you can list necessary files one by one using the <inputFiles> parameter or specify paths to folders using the <inputFolders> parameter and filter the folder contents by file extension.

    The *.avi value specified for the <filter> tag in the example above allows to upload AVI files only. The *.* value allows to upload all the video files stored in the folder. To use files of several specified formats only, set the values separating them with a semicolon: *.avi;*.mp4 etc.

    As we are about to convert a large number of video files in batch mode, we need to use the <split> section. It should look something like this:

    The following tags are used in this example:

    • The <makeSplit> tag is used to specify if you want to split files or not when converting them. In this example, it is set to true, that allows you to convert multiple video files without merging them.
    • The <mode> tag is set to 1 that allows you to enable the Batch Mode.
    • The <size> tag is not applied when the mode 1 is selected.

    Please do not forget to replace the paths to input files/folders provided in our examples with your own ones. When specifying paths to files and folders using the <file>, <folder> and <outputPath> tags, you can use environment variables like %PROGRAMFILES%, %MYVIDEOS% etc. In the example above we use the %MYDOCUMENTS% variable that specifies the "Documents" / "My Documents" directory of the current user.

    For more details on the tags and environment variables used in the AVS Video Converter XML files please refer to our Appendix section. You can also find all the necessary information in the CommandLineKeys.txt file located in the AVS Video Converter installation folder.

    Step 4: Start the conversion from the command line

    1. Start the Command Prompt. For example, you can press the Win+R key combination, type cmd and press Enter.
    2. Use the cd command to go to the AVS Video Converter installation directory that contains the application executable file. If you are using a 32-bit version of Windows, the command should look like this:
      cd C:\Program Files\AVS4YOU\AVSVideoConverter
      

      If you are using a 64-bit version of Windows, run the following command:

      cd C:\Program Files (x86)\AVS4YOU\AVSVideoConverter
      
      Note: if you forgot where the installation folder is located, you can easily find it in the following way: right-click on the application desktop shortcut and select the Properties option. Copy the path specified in the Start in field and paste it using the Ctrl+V key combination or just right-clicking within the Command Prompt window.
    3. To run the AVS Video Converter in the automatic mode, use the following command:
      AVSInstallPack.exe -a "C:\AVSVideoConverter.xml"
      

      where:

      • AVSInstallPack.exe is the converter executable file name.
      • -a is one of the possible commands to run the application in the automatic mode,
      • C:\AVSVideoConverter.xml is the full path to the XML file you've created. Please note that you need to replace the path to the XML file provided in the command example with your own one before executing the command. The file path must be enclosed in double quotes.

    If you are using a 64-bit version of Windows, run the following command:

    Note: if you forgot where the installation folder is located, you can easily find it in the following way: right-click on the application desktop shortcut and select the Properties option. Copy the path specified in the Start in field and paste it using the Ctrl+V key combination or just right-clicking within the Command Prompt window.

    where:

    • AVSInstallPack.exe is the converter executable file name.
    • -a is one of the possible commands to run the application in the automatic mode,
    • C:\AVSVideoConverter.xml is the full path to the XML file you've created. Please note that you need to replace the path to the XML file provided in the command example with your own one before executing the command. The file path must be enclosed in double quotes.

    AVS Video Converter starts with all the conversion parameters specified in the XML file, and the conversion process begins immediately (if the <autostartConversion> parameter is set to true).

    Once the conversion is over, the AVS Video Converter window closes automatically and the assigned output folder with the converted files opens (but you can specify another final actions in the configuration XML).

    Note: if you wish to just run the converter from the command line with some files loaded so that you can manually edit them or change some parameters before the conversion, you can either set the <autostartConversion> parameter to false or use the following command in the Command Prompt window:

    "C:\Program Files\AVS4YOU\AVSVideoConverter\AVSInstallPack.exe" "C:\Video\My_video.avi" "C:\Video\My_video.mpg"

    "C:\Program Files\AVS4YOU\AVSVideoConverter\AVSInstallPack.exe" "C:\Video\My_video.avi" "C:\Video\My_video.mpg"