[Tutor] os.system vs subprocess.Popen args problems
eryksun
eryksun at gmail.com
Wed Sep 4 12:11:30 CEST 2013
On Wed, Sep 4, 2013 at 5:14 AM, learner404 <learner404 at gmail.com> wrote:
>
> Yes, this worked :)
>
> subprocess.Popen(["ffmpeg","-f","dshow","-i","video="+videoinputName,"-f",
> "dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput],
> shell=True)
Using shell=True also sets startupinfo to hide the window. If that's
the only reason you're using the shell, you may as well cut out the
middleman (and potential security hole). Set startupinfo=si, where si
is defined like this:
si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
si.wShowWindow = subprocess.SW_HIDE
More information about the Tutor
mailing list