def _process_ffmpeg_stderr(self, stderr, verbose=False):
        if verbose:
            print(stderr)

        lines = stderr.splitlines()
        if "No such file or directory" in lines[-1]:
            raise IOError("%s not found ! Wrong path ?" % self.filename)

        # get the output lines that describe the video
        line = [l for l in lines if ' Video: ' in l][0]
        # logic to parse all of the MD goes here

        # get the size, of the form 460x320 (w x h)
        match = re.search(" [0-9]*x[0-9]*(,| )", line)
        self._size = map(int, line[match.start():match.end()-1].split('x'))
        # this needs to be more robust
        self._len = int(lines[-2].split()[1])
        self.metafile.write('{0}\n'.format(self._len))
        self.metafile.write('{0}\n'.format(self._size[0]))
        self.metafile.write('{0}\n'.format(self._size[1]))
        self.metafile.close()
dataset/ETHPy150Open soft-matter/pims/pims/ffmpeg_reader.py/FFmpegVideoReader._process_ffmpeg_stderr/original