class_docstr: GraphIODataset
class_docstr_tok: ["GraphIODataset"]
docstr: Creates an `GraphIODataset` from a media file by FFmpeg.
  
  Args:
    filename: A string, the filename of a media file.
    name: A name prefix for the IOTensor (optional).
  
  Returns:
    A `IODataset`.
docstr_tok: ["Creates","an","`","GraphIODataset","`","from","a","media","file","by","FFmpeg",".","Args",":","filename",":","A","string",",","the","filename","of","a","media","file",".","name",":","A","name","prefix","for","the","IOTensor","(","optional",")",".","Returns",":","A","`","IODataset","`","."]
code: def from_ffmpeg(cls, filename, stream, **kwargs):
      """Creates an `GraphIODataset` from a media file by FFmpeg.
  
      Args:
        filename: A string, the filename of a media file.
        name: A name prefix for the IOTensor (optional).
  
      Returns:
        A `IODataset`.
  
      """
      with tf.name_scope(kwargs.get("name", "IOFromFFmpeg")):
          from tensorflow_io.python.ops import (  # pylint: disable=import-outside-toplevel
              ffmpeg_ops,
          )
  
          if stream.startswith("a:"):
              resource = ffmpeg_ops.io_ffmpeg_audio_readable_init(
                  filename, int(stream[2:])
              )
              dtype = cls._dtype
              return ffmpeg_dataset_ops.FFmpegAudioGraphIODataset(
                  resource, dtype, internal=True
              )
  
          if stream.startswith("v:"):
              resource = ffmpeg_ops.io_ffmpeg_video_readable_init(
                  filename, int(stream[2:])
              )
              dtype = cls._dtype
              return ffmpeg_dataset_ops.FFmpegVideoGraphIODataset(
                  resource, dtype, internal=True
              )
  
          return None
  
imports: import tensorflow
  from tensorflow_io.python.ops import audio_ops
  from tensorflow_io.python.ops import io_dataset_ops
  from tensorflow_io.python.ops import hdf5_dataset_ops
  from tensorflow_io.python.ops import avro_dataset_ops
  from tensorflow_io.python.ops import lmdb_dataset_ops
  from tensorflow_io.python.ops import kafka_dataset_ops
  from tensorflow_io.python.ops import ffmpeg_dataset_ops
  from tensorflow_io.python.ops import json_dataset_ops
  from tensorflow_io.python.ops import parquet_dataset_ops
  from tensorflow_io.python.ops import pcap_dataset_ops
  from tensorflow_io.python.ops import mnist_dataset_ops
  from tensorflow_io.python.ops import orc_dataset_ops
label_desc: Use image node_id 2 for calling the GraphIODataset obj's underlying member method code with example usage: obj.from_ffmpeg(cls, filename, stream) and returns: None, ffmpeg_dataset_ops, ffmpeg_dataset_ops