def fetch_image(self,rtsp_server_uri = _source,timeout_secs = 15):
        """ Fetch a single frame using FFMPEG. Convert to PIL Image. Slow. """
        
        self._check_ffmpeg()
        cmd = "ffmpeg -rtsp_transport tcp -i {} -loglevel quiet -frames 1 -f image2pipe -".format(rtsp_server_uri)

        #stdout = _sp.check_output(ffmpeg_cmd,timeout = timeout_secs)
        with _sp.Popen(cmd, shell=True,  stdout=_sp.PIPE) as process:
            try:
                stdout,stderr = process.communicate(timeout=timeout_secs)
            except _sp.TimeoutExpired as e:
                process.kill()
                raise TimeoutError("Connection to {} timed out".format(rtsp_server_uri),e)
        
        return _Image.open(_io.BytesIO(stdout))
Fetch a single frame using FFMPEG. Convert to PIL Image. Slow.