I have tried a few methods of executing ffmpeg from within python and it has hanged every time. Two of the configurations I tried are:
def convertFileToFlash(filename): commandString = "./convertasftoswf.sh " + getSaveDirectory() + " " + filename logging.debug("RUNNING: " + commandString) results = commands.getstatusoutput(commandString) logging.debug(results) convertasftoswf.sh: #!/bin/sh mencoder ${1}${2} -o ${1}outputfile.avi -ovc xvid -xvidencopts bitrate=280:max_bframes=0 -oac mp3lame -lameopts mode=0:cbr:br=128 -vf-add scale=320:240,expand=320:240 -vf-add harddup -ofps 25.00 -srate 44100 chmod 777 ${1}outputfile.avi ffmpeg -i ${1}outputfile.avi ${1}${2}.swf Also, I tried running each of the commands (mencoder and ffmpeg) separately with the commands.getstatusoutput from within python. Then mencoder call always runs without a problem and the ffmpeg always hangs. Running the shell script directly from the command line works as expected. Any ideas about why ffmpeg would hang in that situation? Thanks.
-- http://mail.python.org/mailman/listinfo/python-list