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: <br><br>def convertFileToFlash(filename):<br>    commandString = "./convertasftoswf.sh " + getSaveDirectory() + " " + filename<br>
    logging.debug("RUNNING: " + commandString)<br>    results = commands.getstatusoutput(commandString)<br>    logging.debug(results)<br><br>convertasftoswf.sh:<br><br>#!/bin/sh<br><br>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<br>
<br>chmod 777 ${1}outputfile.avi<br><br>ffmpeg -i ${1}outputfile.avi ${1}${2}.swf<br><br>Also, I tried running each of the commands (mencoder and ffmpeg) separately with the commands.getstatusoutput from within python.  <br>
<br>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.<br><br>Any ideas about why ffmpeg would hang in that situation?<br>
<br>Thanks.<br><br><br>