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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to