Exmpeg.Stream (exmpeg v0.3.0)

Copy Markdown View Source

Per-stream metadata returned by Exmpeg.probe/1.

kind is one of :video, :audio, :subtitle, :data, :attachment, or :unknown. The codec-specific maps (audio, video) are populated only on streams of the matching kind so callers can match on shape without consulting kind first.

Summary

Types

audio_info()

@type audio_info() :: %{
  sample_rate: integer(),
  channels: integer(),
  sample_format: String.t() | nil
}

kind()

@type kind() :: :video | :audio | :subtitle | :data | :attachment | :unknown

t()

@type t() :: %Exmpeg.Stream{
  audio: audio_info() | nil,
  bit_rate: integer(),
  codec: String.t(),
  codec_long_name: String.t() | nil,
  duration_s: float() | nil,
  index: non_neg_integer(),
  kind: kind(),
  nb_frames: integer() | nil,
  time_base: {integer(), integer()},
  video: video_info() | nil
}

video_info()

@type video_info() :: %{
  width: integer(),
  height: integer(),
  pixel_format: String.t() | nil,
  frame_rate: {integer(), integer()}
}