abstract class FFmpeg::Video

Direct Known Subclasses

Defined in:

ffmpeg/video.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.crop(canvas : StumpyCore::Canvas, cropped : StumpyCore::Canvas) #

one of desired_width or desired_height will match the canvas width or height so we only have to crop width or height


[View source]
def self.open(input : Path | URI) #

[View source]
def self.scale_to_fit(input_width : Int32, input_height : Int32, desired_width : Int32, desired_height : Int32) : Tuple(Int32, Int32) #

[View source]

Instance Method Detail

def async_frames(ready : Channel(Nil), data : Channel(Tuple(StumpyCore::Canvas, Bool)), output_width : Int | Nil = nil, output_height : Int | Nil = nil, scaling_method : ScalingAlgorithm = ScalingAlgorithm::Bicublin) #

[View source]
abstract def close : Nil #

[View source]
abstract def closed? : Bool #

[View source]
abstract def configure_read #

[View source]
def each_frame(output_width : Int | Nil = nil, output_height : Int | Nil = nil, scaling_method : ScalingAlgorithm = ScalingAlgorithm::Bicublin, &) #

Grab each frame and convert it to a StumpyCore::Canvas for simple manipulation this can also scale the image to a preferred resolution


[View source]
def finalize #

[View source]
def format : Format #

[View source]
abstract def input : String #

[View source]