Skip to content

Commit

Permalink
add shell for pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jun 19, 2017
1 parent 29fe381 commit b5aeb61
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions imageio/plugins/ffmpeg.py
Expand Up @@ -251,7 +251,7 @@ def _get_cam_inputname(self, index):
cmd = [self._exe, '-list_devices', 'true',
'-f', CAM_FORMAT, '-i', 'dummy']
proc = sp.Popen(cmd, stdin=sp.PIPE, stdout=sp.PIPE,
stderr=sp.PIPE)
stderr=sp.PIPE, shell=True)
proc.stdout.readline()
proc.terminate()
infos = proc.stderr.read().decode('utf-8')
Expand Down Expand Up @@ -389,7 +389,8 @@ def _initialize(self):
cmd = [self._exe] + self._arg_ffmpeg_params
cmd += iargs + ['-i', self._filename] + oargs + ['-']
self._proc = sp.Popen(cmd, stdin=sp.PIPE,
stdout=sp.PIPE, stderr=sp.PIPE)
stdout=sp.PIPE, stderr=sp.PIPE,
shell=True)

# Create thread that keeps reading from stderr
self._stderr_catcher = StreamCatcher(self._proc.stderr)
Expand Down Expand Up @@ -425,7 +426,8 @@ def _reinitialize(self, index=0):
cmd = [self._exe] + self._arg_ffmpeg_params
cmd += iargs + oargs + ['-']
self._proc = sp.Popen(cmd, stdin=sp.PIPE,
stdout=sp.PIPE, stderr=sp.PIPE)
stdout=sp.PIPE, stderr=sp.PIPE,
shell=True)

# Create thread that keeps reading from stderr
self._stderr_catcher = StreamCatcher(self._proc.stderr)
Expand Down Expand Up @@ -758,7 +760,8 @@ def _initialize(self):

# Launch process
self._proc = sp.Popen(cmd, stdin=sp.PIPE,
stdout=sp.PIPE, stderr=None)
stdout=sp.PIPE, stderr=None,
shell=True)
# Warning, directing stderr to a pipe on windows will cause ffmpeg
# to hang if the buffer is not periodically cleared using
# StreamCatcher or other means.
Expand Down

0 comments on commit b5aeb61

Please sign in to comment.