def _args(self): # Returns the command line parameters for subprocess to use # ffmpeg to create a movie using a pipe. args = [self.bin_path(), '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % self.frame_size, '-pix_fmt', self.frame_format, '-r', str(self.fps)] # Logging is quieted because subprocess.PIPE has limited buffer size. if not verbose.ge('debug'): args += ['-loglevel', 'quiet'] args += ['-i', 'pipe:'] + self.output_args return args
def _run(self): # Uses subprocess to call the program for assembling frames into a # movie file. *args* returns the sequence of command line arguments # from a few configuration options. command = self._args() if verbose.ge("debug"): output = sys.stdout else: output = subprocess.PIPE verbose.report("MovieWriter.run: running command: %s" % " ".join(command)) self._proc = subprocess.Popen(command, shell=False, stdout=output, stderr=output, stdin=subprocess.PIPE)
def _run(self): # Uses subprocess to call the program for assembling frames into a # movie file. *args* returns the sequence of command line arguments # from a few configuration options. command = self._args() if verbose.ge('debug'): output = sys.stdout else: output = subprocess.PIPE verbose.report('MovieWriter.run: running command: %s' % ' '.join(command)) self._proc = subprocess.Popen(command, shell=False, stdout=output, stderr=output, stdin=subprocess.PIPE)
def _args(self): # Returns the command line parameters for subprocess to use # ffmpeg to create a movie using a pipe. args = [ self.bin_path(), "-f", "rawvideo", "-vcodec", "rawvideo", "-s", "%dx%d" % self.frame_size, "-pix_fmt", self.frame_format, "-r", str(self.fps), ] # Logging is quieted because subprocess.PIPE has limited buffer size. if not verbose.ge("debug"): args += ["-loglevel", "quiet"] args += ["-i", "pipe:"] + self.output_args return args