class_docstr: Support for pyAV as backend.
  
  Parameters
  ----------
  request : iio.Request
      A request object that represents the users intent. It provides a
      standard interface to access various the various ImageResources and
      serves them to the plugin as a file object (or file). Check the docs for
      details.
class_docstr_tok: ["Support","for","pyAV","as","backend",".","Parameters","--","--","--","--","--","request",":","iio.Request","A","request","object","that","represents","the","users","intent",".","It","provides","a","standard","interface","to","access","various","the","various","ImageResources","and","serves","them","to","the","plugin","as","a","file","object","(","or","file",")",".","Check","the","docs","for","details","."]
docstr: Format-specific metadata.
  
  Returns a dictionary filled with metadata that is either stored in the
  container, the video stream, or the frame's side-data.
  
  Parameters
  ----------
  index : int
      If ... (Ellipsis, default) return global metadata (the metadata
      stored in the container and video stream). If not ..., return the
      side data stored in the frame at the given index.
  exclude_applied : bool
      Currently, this parameter has no effect. It exists for compliance with
      the ImageIO v3 API.
  constant_framerate : bool
      If True assume the video's framerate is constant. This allows for
      faster seeking inside the file. If False, the video is reset before
      each read and searched from the beginning. If None (default), this
      value will be read from the container format.
  
  Returns
  -------
  metadata : dict
      A dictionary filled with format-specific metadata fields and their
      values.
docstr_tok: ["Format-specific","metadata",".","Returns","a","dictionary","filled","with","metadata","that","is","either","stored","in","the","container",",","the","video","stream",",","or","the","frame","'s","side-data",".","Parameters","--","--","--","--","--","index",":","int","If","...","(","Ellipsis",",","default",")","return","global","metadata","(","the","metadata","stored","in","the","container","and","video","stream",")",".","If","not","...",",","return","the","side","data","stored","in","the","frame","at","the","given","index",".","exclude_applied",":","bool","Currently",",","this","parameter","has","no","effect",".","It","exists","for","compliance","with","the","ImageIO","v3","API",".","constant_framerate",":","bool","If","True","assume","the","video","'s","framerate","is","constant",".","This","allows","for","faster","seeking","inside","the","file",".","If","False",",","the","video","is","reset","before","each","read","and","searched","from","the","beginning",".","If","None","(","default",")",",","this","value","will","be","read","from","the","container","format",".","Returns","--","--","--","-","metadata",":","dict","A","dictionary","filled","with","format-specific","metadata","fields","and","their","values","."]
code: def metadata(
      self,
      index: int = ...,
      exclude_applied: bool = True,
      constant_framerate: bool = None,
  ) -> Dict[str, Any]:
      """Format-specific metadata.
  
      Returns a dictionary filled with metadata that is either stored in the
      container, the video stream, or the frame's side-data.
  
      Parameters
      ----------
      index : int
          If ... (Ellipsis, default) return global metadata (the metadata
          stored in the container and video stream). If not ..., return the
          side data stored in the frame at the given index.
      exclude_applied : bool
          Currently, this parameter has no effect. It exists for compliance with
          the ImageIO v3 API.
      constant_framerate : bool
          If True assume the video's framerate is constant. This allows for
          faster seeking inside the file. If False, the video is reset before
          each read and searched from the beginning. If None (default), this
          value will be read from the container format.
  
      Returns
      -------
      metadata : dict
          A dictionary filled with format-specific metadata fields and their
          values.
  
      """
  
      metadata = dict()
  
      if index is ...:
          # useful flags defined on the container and/or video stream
          metadata.update(
              {
                  "video_format": self._video_stream.codec_context.pix_fmt,
                  "codec": self._video_stream.codec.name,
                  "long_codec": self._video_stream.codec.long_name,
                  "profile": self._video_stream.profile,
                  "fps": float(self._video_stream.guessed_rate),
              }
          )
          if self._video_stream.duration is not None:
              duration = float(
                  self._video_stream.duration
                  * self._video_stream.time_base
              )
              metadata.update({"duration": duration})
  
          metadata.update(self.container_metadata)
          metadata.update(self.video_stream_metadata)
          return metadata
  
      if constant_framerate is None:
          constant_framerate = not self._container.format.variable_fps
  
      self._seek(index, constant_framerate=constant_framerate)
      desired_frame = next(self._decoder)
      self._next_idx += 1
  
      # useful flags defined on the frame
      metadata.update(
          {
              "key_frame": bool(desired_frame.key_frame),
              "time": desired_frame.time,
              "interlaced_frame": bool(desired_frame.interlaced_frame),
              "frame_type": desired_frame.pict_type.name,
          }
      )
  
      # side data
      metadata.update(
          {
              item.type.name: item.to_bytes()
              for item in desired_frame.side_data
          }
      )
  
      return metadata
  
imports: from fractions import Fraction
  from math import ceil
  from typing import Any, Dict, List, Optional, Tuple, Union, Generator
  import av
  import av.filter
  import numpy
  from numpy.lib.stride_tricks import as_strided
  from ..core import Request
  from ..core.request import URI_BYTES, InitializationError, IOMode
  from ..core.v3_plugin_api import ImageProperties, PluginV3
label_desc: Use image node_id 6 for calling the PyAVPlugin obj's underlying member method code with example usage: obj.metadata(index, exclude_applied, constant_framerate) and returns: metadata, metadata