Infer.Video (Infer v0.1.0) View Source

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

is_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.is_avi(binary)
true

Specs

is_flv(binary()) :: boolean()

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

Specs

is_m4v(binary()) :: boolean()

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

Specs

is_mkv(binary()) :: boolean()

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

Examples

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

Specs

is_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.is_mov(binary)
true

Specs

is_mp4(binary()) :: boolean()

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

Examples

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

Specs

is_mpeg(binary()) :: boolean()

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

Examples

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

Specs

is_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.is_webm(binary)
true

Specs

is_wmv(binary()) :: boolean()

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