The first one uses the subprocess module and you enter the input and output filenames on the command line. The second one was my first attempt which uses os.system and raw_input. #!/usr/bin/python from subprocess import call import os import sys def usage(): print \ """Usage: python program_name input_filename output_filename python convert_ogg.py input.ogv output.avi """ def convert(): mencoder = '/usr/bin/mencoder' input = sys.argv[1] arg1 = '-ovc' arg2 = 'lavc' arg3 = '-oac' arg4 = 'mp3lame' arg5 = '-o' output = sys.argv[2] call([mencoder, input, arg1, arg2, arg3, arg4, arg5, output]) if os.path.exists(output): print '\n\tYour', output, 'was created sucessfully!' sys.exit() else: print '\n\tERROR!' print 'The', output, 'was NOT created!' if __name__ == '__main__': if len(sys.argv) < 3: usage() else: convert() #!/usr/bin/python #Filename = ogg_to_avi.py import os,sys print '\n\togg theora video to avi video\n' ogg = raw_input('Enter the ogg file to convert: ') avi = raw_input('Enter the avi to be created: ') #os.system("%s %s %s %s %s %s %s %s" % ('mencoder', ogg, '-ovc', 'lavc', '-oac', # ' mp3lame', '-o', avi)) os.system("mencoder %s -ovc lavc -oac mp3lame -o %s" % (ogg, avi)) if os.path.exists(avi): print '\n\tYour', avi, 'has been created.\n' sys.exit() else: print 'error, something went wrong!' sys.exit()