Vtc.Framerate (vtc v0.2.0) View Source

The rate at which a video file frames are played back.

Framerate is measured in frames-per-second (24/1 = 24 frames-per-second).

Link to this section Summary

Functions

Creates a new Framerate with a playback speed or timebase.

As Vtc.Framerate.new/2 but raises an error instead.

The rational representation of the timecode timebase speed as a fraction in frames-per-second.

Link to this section Types

Specs

parse_result() :: {:ok, t()} | {:error, Vtc.Framerate.ParseError.t()}

Type returned by Vtc.Framerate.new/2

Vtc.Framerate.new!/2 raises the error value instead.

Specs

t() :: %Vtc.Framerate{ntsc: Vtc.Ntsc.t(), playback: Ratio.t()}

Type of Vtc.Framerate

Fields

  • :playback: The rational representation of the real-world playback speed as a fraction in frames-per-second.

  • :ntsc: Atom representing which, if any, NTSC convention this framerate adheres to.

Link to this section Functions

Specs

Creates a new Framerate with a playback speed or timebase.

Arguments

  • rate: Either the playback rate or timebase. For NTSC framerates, the value will be rounded to the nearest correct value.

  • ntsc: Atom representing the which (or whether an) NTSC standard is being used.

Specs

new!(Ratio.t() | integer() | float() | String.t(), Vtc.Ntsc.t()) :: t()

As Vtc.Framerate.new/2 but raises an error instead.

Specs

timebase(t()) :: Ratio.t()

The rational representation of the timecode timebase speed as a fraction in frames-per-second.

Specs

to_string(t()) :: String.t()