lib/imageio/plugins/ffmpeg.py
def _get_data(self, index):
            """ Reads a frame at index. Note for coders: getting an
            arbitrary frame in the video with ffmpeg can be painfully
            slow if some decoding has to be done. This function tries
            to avoid fectching arbitrary frames whenever possible, by
            moving between adjacent frames. """
            # Modulo index (for looping)
            if self._meta['nframes'] and self._meta['nframes'] < float('inf'):
                if self._arg_loop:
                    index = index % self._meta['nframes']

            if index == self._pos:
                return self._lastread, {}
            elif index < 0:
                raise IndexError('Frame index must be > 0')
            elif index >= self._meta['nframes']:
                raise IndexError('Reached end of video')
            else:
                if (index < self._pos) or (index > self._pos+100):
                    self._reinitialize(index)
                else:
                    self._skip_frames(index-self._pos-1)
                result = self._read_frame()
                self._pos = index
                return result, {}
 Reads a frame at index. Note for coders: getting an
            arbitrary frame in the video with ffmpeg can be painfully
            slow if some decoding has to be done. This function tries
            to avoid fectching arbitrary frames whenever possible, by
            moving between adjacent frames. 
Reads a frame at index. Note for coders: getting an
arbitrary frame in the video with ffmpeg can be painfully
slow if some decoding has to be done. This function tries
to avoid fectching arbitrary frames whenever possible, by
moving between adjacent frames.
Reads a frame at index . Note for coders : getting an arbitrary frame in the video with ffmpeg can be painfully slow if some decoding has to be done . This function tries to avoid fectching arbitrary frames whenever possible by moving between adjacent frames .
def _get_data(self, index):
            if self._meta['nframes'] and self._meta['nframes'] < float('inf'):
                if self._arg_loop:
                    index = index % self._meta['nframes']
            if index == self._pos:
                return self._lastread, {}
            elif index < 0:
                raise IndexError('Frame index must be > 0')
            elif index >= self._meta['nframes']:
                raise IndexError('Reached end of video')
            else:
                if (index < self._pos) or (index > self._pos+100):
                    self._reinitialize(index)
                else:
                    self._skip_frames(index-self._pos-1)
                result = self._read_frame()
                self._pos = index
                return result, {}
def _get_data ( self , index ) : if self . _meta [ 'nframes' ] and self . _meta [ 'nframes' ] < float ( 'inf' ) : if self . _arg_loop : index = index % self . _meta [ 'nframes' ] if index == self . _pos : return self . _lastread , { } elif index < 0 : raise IndexError ( 'Frame index must be > 0' ) elif index >= self . _meta [ 'nframes' ] : raise IndexError ( 'Reached end of video' ) else : if ( index < self . _pos ) or ( index > self . _pos + 100 ) : self . _reinitialize ( index ) else : self . _skip_frames ( index - self . _pos - 1 ) result = self . _read_frame ( ) self . _pos = index return result , { }
Reads a frame at index.
Reads a frame at index .
""" Reads a frame at index. Note for coders: getting an
            arbitrary frame in the video with ffmpeg can be painfully
            slow if some decoding has to be done. This function tries
            to avoid fectching arbitrary frames whenever possible, by
            moving between adjacent frames. """ # Modulo index (for looping)
self
index