# `Direct.Probe`
[🔗](https://github.com/alexdont/direct_stream/blob/v0.1.0/lib/direct/probe.ex#L1)

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

# `stream`

```elixir
@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.

# `codec`

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

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

# `streams`

```elixir
@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).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
