Vtc.Timecode (vtc v0.1.2) View Source
Represents the frame at a particular time in a video.
New Timecode values are created with the Vtc.Timecode.with_seconds/2
and
Vtc.Timecode.with_frames/2
Link to this section Summary
Types
Type returned by Vtc.Timecode.with_seconds/2
and Vtc.Timecode.with_frames/2
.
Vtc.Timecode
type.
Functions
Returns the number of frames that would have elapsed between 00:00:00:00 and this timecode.
The individual sections of a timecode string as i64 values.
Returns the the formatted SMPTE timecode: (ex: 01:00:00:00).
Returns a new Vtc.Timecode
with a Vtc.Timecode.frames/1
return value equal to the
frames arg.
As Vtc.Timecode.with_frames/2
, but raises on error.
Returns a new Vtc.Timecode
with a Vtc.Timecode.seconds field value equal to the
seconds arg.
As Vtc.Timecode.with_seconds/2
, but raises on error.
Link to this section Types
Specs
parse_result() :: {:ok, t()} | {:error, Vtc.Timecode.ParseError.t()}
Type returned by Vtc.Timecode.with_seconds/2
and Vtc.Timecode.with_frames/2
.
Specs
t() :: %Vtc.Timecode{rate: Vtc.Framerate.t(), seconds: Ratio.t() | integer()}
Vtc.Timecode
type.
Fields
:seconds: The real-world seconds elapsed since 01:00:00:00 as a rational value. (Note: The Ratio module automatically will coerce itself to an integer whenever possible, so this value may be an integer when exactly a whole-second value).
:rate: the Framerate of the timecode.
Link to this section Functions
Specs
Returns the number of frames that would have elapsed between 00:00:00:00 and this timecode.
What it is
Frame number / frames count is the number of a frame if the timecode started at 00:00:00:00 and had been running until the current value. A timecode of '00:00:00:10' has a frame number of 10. A timecode of '01:00:00:00' has a frame number of 86400.
Where you see it
Frame-sequence files: 'my_vfx_shot.0086400.exr'
FCP7XML cut lists:
<timecode> <rate> <timebase>24</timebase> <ntsc>TRUE</ntsc> </rate> <string>01:00:00:00</string> <frame>86400</frame> <!-- <====THIS LINE--> <displayformat>NDF</displayformat> </timecode>
Specs
sections(t()) :: Vtc.Timecode.Sections.t()
The individual sections of a timecode string as i64 values.
Specs
Returns the the formatted SMPTE timecode: (ex: 01:00:00:00).
What it is
Timecode is used as a human-readable way to represent the id of a given frame. It is formatted to give a rough sense of where to find a frame: {HOURS}:{MINUTES}:{SECONDS}:{FRAME}. For more on timecode, see Frame.io's excellent post on the subject.
Where you see it
Timecode is ubiquitous in video editing, a small sample of places you might see timecode:
- Source and Playback monitors in your favorite NLE.
- Burned into the footage for dailies.
- Cut lists like an EDL.
Specs
with_frames(Vtc.Sources.Frames.t(), Vtc.Framerate.t()) :: parse_result()
Returns a new Vtc.Timecode
with a Vtc.Timecode.frames/1
return value equal to the
frames arg.
Timecode::with_frames takes many different formats (more than just numeric types) that represent the frame count of the timecode.
Arguments
frames
- A value which can be represented as a frame number / frame count.rate
- The Framerate at which the frames are being played back.
Specs
with_frames!(Vtc.Sources.Frames.t(), Vtc.Framerate.t()) :: t()
As Vtc.Timecode.with_frames/2
, but raises on error.
Specs
with_seconds(Vtc.Sources.Seconds.t(), Vtc.Framerate.t()) :: parse_result()
Returns a new Vtc.Timecode
with a Vtc.Timecode.seconds field value equal to the
seconds arg.
Timecode::with_frames takes many different formats (more than just numeric types) that represent the frame count of the timecode.
Arguments
seconds
- A value which can be represented as a number of seconds.rate
- The Framerate at which the frames are being played back.
Specs
with_seconds!(Vtc.Sources.Seconds.t(), Vtc.Framerate.t()) :: t()
As Vtc.Timecode.with_seconds/2
, but raises on error.