View Source Infer.Video (Infer v0.2.6)
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
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
Takes the binary file contents as arguments. Returns true
if it's a flv video.
Specs
Takes the binary file contents as arguments. Returns true
if it's a m4v.
Specs
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
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
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
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
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
Takes the binary file contents as arguments. Returns true
if it's a wmv video.