View Source Infer.Video (Infer v0.2.3)

Video type matchers based on the magic number

Link to this section Summary

Functions

Takes the binary file contents as arguments. Returns true if it's a AVI video.

Takes the binary file contents as arguments. Returns true if it's a flv video.

Takes the binary file contents as arguments. Returns true if it's a m4v.

Takes the binary file contents as arguments. Returns true if it's a mkv.

Takes the binary file contents as arguments. Returns true if it's a mov video.

Takes the binary file contents as arguments. Returns true if it's a mp4 video.

Takes the binary file contents as arguments. Returns true if it's a mpeg video.

Takes the binary file contents as arguments. Returns true if it's a webm video.

Takes the binary file contents as arguments. Returns true if it's a wmv video.

Link to this section Functions

Specs

avi?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a AVI video.

## Examples

iex> binary = File.read!("test/videos/sample.avi")
iex> Infer.Video.avi?(binary)
true

Specs

flv?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a flv video.

Specs

m4v?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a m4v.

Specs

mkv?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a mkv.

examples

Examples

iex> binary = File.read!("test/videos/sample.mkv")
iex> Infer.Video.mkv?(binary)
true

Specs

mov?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a mov video.

## Examples

iex> binary = File.read!("test/videos/sample.mov")
iex> Infer.Video.mov?(binary)
true

Specs

mp4?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a mp4 video.

examples

Examples

iex> binary = File.read!("test/videos/sample.mp4")
iex> Infer.Video.mp4?(binary)
true

Specs

mpeg?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a mpeg video.

examples

Examples

iex> binary = File.read!("test/videos/sample.mpeg")
iex> Infer.Video.mpeg?(binary)
true

Specs

webm?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a webm video.

## Examples

iex> binary = File.read!("test/videos/sample.webm")
iex> Infer.Video.webm?(binary)
true

Specs

wmv?(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a wmv video.