Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread goldtech
Hi, Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most recent call last): File pyshell#73, line 1, in module p = Popen(cmd3,

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread Chris Rebert
On Mon, Apr 18, 2011 at 4:07 PM, goldtech goldt...@worldpost.com wrote: Hi, Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread Rhodri James
On Tue, 19 Apr 2011 00:07:46 +0100, goldtech goldt...@worldpost.com wrote: Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread goldtech
Read The Fine Manual:http://docs.python.org/library/subprocess.html#subprocess.Popen: snip... Try instead: cmd3 = ['ffmpeg', '-i', '/home/giga/Desktop/Guitar1.flv'] Cheers, Chris --http://blog.rebertia.com No doubt, I should RTFM...you're right! Yes, works like a charm now. Thanks