peggy

A module for utilizing FFMPEG in Gleam

Types

A CLI argument provided to FFmpeg

pub type CmdOption {
  CmdOption(name: String, value: String)
}

Constructors

  • CmdOption(name: String, value: String)

Command provided to FFmpeg

pub type Command {
  Command(files: List(File), options: List(CmdOption))
}

Constructors

  • Command(files: List(File), options: List(CmdOption))

A file input provided to FFmpeg

pub type File {
  File(String)
}

Constructors

  • File(String)

Err that occurred during construction/execution of FFmpeg Command

pub type PeggyErr {
  FFmpegNotFound(String)
}

Constructors

  • FFmpegNotFound(String)

Functions

pub fn add_arg(
  cmd: Command,
  name: String,
  value: String,
) -> Command

Adds argument to command

pub fn add_file(cmd: Command, file_name: String) -> Command

Adds file to command

pub fn exec_sync(
  cmd: Command,
) -> Result(List(String), List(String))

Executes the command provided to ffmpeg

pub fn new_command() -> Command

Creates new command for executing an FFmpeg command

Search Document