Trying to chain processes together on a pipeline

Peter Otten __peter__ at web.de
Fri Jul 1 09:26:41 CEST 2011


Andrew Berg wrote:

> Okay, so I've refactored those except WindowsError blocks into calls to
> a function and fixed the os.devnull bug, but I still can't get the
> triple chain working. I added calls to ffmpeg_proc.stdout.close() and
> sox_proc.stdout.close(), but I really am not sure where to put them. The
> following code works if SoX isn't part of the chain (that is, if vol ==
> 1), but not otherwise (the Nero encoder says "truncation error" after it
> finishes; the same error I get if omit the close() calls):

I can't reproduce your setup, but I'd try using communicate() instead of 
wait() and close().




More information about the Python-list mailing list