Features:
  • Batch conversion (with prompts) from any format to avi (XVID)
  • Easy edit for making any changes (1 extra line of code, and you can choose a different format to convert to etc.)
  • Public Domain license (have fun!)
I've just spent the last few hours figuring this out, please enjoy

How to use:
  1. Install a compiler (recommend: g++, or for an IDE [with g++ backend]: CodeBlocks)
  2. Compile this code:
Code:
#include <iostream>
#include <fstream>
#include <vector>

#include <windows.h>

using namespace std;

vector<string> directoryContents(string, string);

int main() {
    string directory, filetype;
    int show=0;
    cout << "Enter directory [C:\]: ", cin >> directory;
    cout << "Enter filetype [ogv]: ", cin >> filetype;
    cout << "Show FFmpeg? [5 for yes]: ", cin >> show;
    if(show!=5) show=0;

    vector<string> dirContent = directoryContents(directory, filetype);

    cout << dirContent.size() << " files to be transcoded";

    for(float i=0; i<dirContent.size(); i++) {
        string file = "-i "+directory+'\\'+dirContent[i]+" -vcodec libxvid -b 7360 -y "
                      +directory+'\\'+dirContent[i]+".avi";
        cout << "Transcoding [" << dirContent[i] << "] file" << i << " of " << dirContent.size();
        ShellExecute(NULL, TEXT("open"), TEXT("ffmpeg"), TEXT(file.c_str()), NULL, show);
        cout << "\n\nPercent complete: " << (i/dirContent.size())*100 << "%\n";
    }
    cout << "\n\nPercent complete: " << 100 << "%\n";
}

vector<string> directoryContents(string fileName, string fileType) {
    WIN32_FIND_DATA FindData;
    fileName += "\\*."+fileType;
    HANDLE Result = FindFirstFile(fileName.c_str(), &FindData);

    vector<string> TextFiles;

    DWORD ErrorValue;
    for(BOOL BOOLResult; !ErrorValue; BOOLResult = FindNextFile(Result, &FindData))
        if(BOOLResult) TextFiles.push_back(string(FindData.cFileName));
        else ErrorValue = GetLastError();

    return TextFiles;
}
If you would like other features (e.g. Linux support) please request below.

Thank me if you like this post!

Cheers,

Alec Taylor

NOTE: If this little C++ script becomes popular, I'll include an installer+precompiled binary. Request one if you want it earlier