[Tutor] os.system vs subprocess.Popen args problems

learner404 learner404 at gmail.com
Mon Sep 2 16:19:17 CEST 2013


Hello,

I can't understand why the command below works with os.system but not with
 subprocess.Popen (on windows, recording video with FFMPEG.exe)

cmd=('ffmpeg -f dshow -i video="%s" -f dshow -i audio="%s" -q 5
"%s"')%(videoinputName, audioinputName, videoFileOutput)
os.system(cmd)
*works*

subprocess.Popen(["ffmpeg","-f","dshow","-i",'video="%s"'%videoinputName,"-f","dshow","-i",'audio="%s"'%audioinputName,"-q","5","%s"%videoFileOutput])
*don't work*
>> [dshow @ 025984a0] Could not find video device.
>> video="QuickCam Orbit/Sphere AF": Input/output error

The reason I'm going with subprocess is to avoid to have the DOS window
coming in the forefront.
Any idea of what I'm doing wrong? Or any other way to hide or minimize the
DOS window?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130902/8e44abe0/attachment.html>


More information about the Tutor mailing list