Direct.Probe (direct v0.1.0)

Copy Markdown View Source

What is inside a file, by ffprobe: its streams' kinds, codecs and languages.

Summary

Types

One stream of the file, as ffprobe -show_streams reports it.

Functions

The codec of the first stream of kind ("video", "audio"), "" when none.

The streams of the file at url (a path or an address), [] when it cannot be read within :timeout ms (default 30 000).

Types

stream()

@type stream() :: %{
  index: non_neg_integer(),
  kind: String.t(),
  codec: String.t(),
  lang: String.t()
}

One stream of the file, as ffprobe -show_streams reports it.

Functions

codec(streams, kind)

@spec codec([stream()], String.t()) :: String.t()

The codec of the first stream of kind ("video", "audio"), "" when none.

streams(url, opts \\ [])

@spec streams(String.t(), keyword()) :: [stream()]

The streams of the file at url (a path or an address), [] when it cannot be read within :timeout ms (default 30 000).