Subprocess & ffmpeg

Andrew Bloomgarden andrewbl at aughr.com
Fri Aug 17 00:34:35 EDT 2007


Hi, I'm having a problem with the subprocess module. I'm using it to  
run ffmpeg with the following command, where a_cmd is the command  
string.

proc = subprocess.Popen 
(a_cmd,shell=True,stdout=subprocess.PIPE,universal_newlines=True,stderr= 
subprocess.STDOUT,stdin=subprocess.PIPE)

Then, I'm trying to have access to the output while it's running.  
Just as a test, I used the following:

for line in proc.stdout:
	print line

It doesn't print out anything until ffmpeg is done executing. Now,  
this works with mencoder, but I have no idea why it won't work with  
ffmpeg.

Does anyone know why this is happening?

-- 
Andrew Bloomgarden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070816/830f2611/attachment.html>


More information about the Python-list mailing list