class

GS::Video::Reader

Inherits Reference < Object

Video file reader

Constructors

new(path : String)
Source

Instance methods

close
Source
each_frame

Iterate over frames with block

Source
each_sampled(interval_sec : Float64, &block : Frame -> _)

Iterate over sampled frames

Source
finalize
Source
info
Source
path
Source
read_all

Read all frames (use with caution for long videos!)

Source
read_frame

Read next frame

Source
read_sampled(interval_sec : Float64) : Array(Frame)

Read frames at regular intervals

Source
read_uniform(n_frames : Int32) : Array(Frame)

Read N frames uniformly distributed across video

Source
seek(time_sec : Float64) : Bool

Seek to specific time (seconds)

Source
seek_frame(frame_num : Int64) : Bool

Seek to specific frame number

Source