I have an application (webcam tool) which has to convert an AVI file to MPG, so far the only tool I found which can do this in command-line form in the background is AVI2MPG.

The encoder has to run in the background so that users cannot see that the files are encoded from AVI to MPG.

Any suggestions?