View Source Thumbnex.ExtractFrame (thumbnex v0.5.1)
Summary
Functions
Extract multiple frames from the input file. Specify the number of frames, and the frames per second, to output.
Extract a single frame from the input file.
Functions
@spec multiple_frames( file_path :: binary(), frame_count :: non_neg_integer(), fps :: non_neg_integer(), opts :: keyword() ) :: {:ok, binary()} | {:error, {Collectable.t(), exit_status :: non_neg_integer()}}
Extract multiple frames from the input file. Specify the number of frames, and the frames per second, to output.
Returns a tuple with :ok and the path of the output file (a single file containing multiple frames) or :error and the cmd output and exit status
Options:
:output_path
- Where to store the resulting file. Defaults to temporary file.:output_ext
- File extension for output. Ignored if:output_path
is set. Defaults to".gif"
.
@spec single_frame( file_path :: binary(), time_offset_seconds :: non_neg_integer(), opts :: keyword() ) :: {:ok, binary()} | {:error, {Collectable.t(), exit_status :: non_neg_integer()}}
Extract a single frame from the input file.
Specify the time offset in seconds (0 for still images).
Returns a tuple with :ok and the path of the single frame image file or :error and cmd output and exit status
Options:
:output_path
- Where to store the resulting file. Defaults to temporary file.:output_ext
- File extension for output. Ignored if:output_path
is set. Defaults to".png"
.