id = "ffmpeg"
name = "FFmpeg"
homepage = "https://ffmpeg.org"
description = "A complete, cross-platform solution to record, convert and stream audio and video."
icon = "SimpleIcons:ffmpeg"
executables = ["ffmpeg"]
[dotfiles]
paths = ["~/.ffmpeg/"]
secret = []
side_effect = false
[commands]
format = 1
label = "Convert media"
description = "Convert or trim one input into one output file. Filter graphs, stream mapping, multiple inputs, hardware acceleration and streaming are left out."
quality = "ai-draft"
base = "fig:ffmpeg"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/ffmpeg.ts"
license = "MIT"
[[commands.field]]
id = "input"
label = "Input file"
type = "path"
option = ["-i"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["fig"]
[[commands.field]]
id = "overwrite"
label = "Overwrite output"
description = "Overwrite the output file without asking."
type = "boolean"
option = ["-y"]
effect = "overwrite"
sources = ["fig"]
[[commands.field]]
id = "start"
label = "Start time"
description = "Offset into the input, for example 00:01:30 or 90."
type = "string"
option = ["-ss"]
sources = ["fig"]
[[commands.field]]
id = "duration"
label = "Duration"
description = "Seconds or HH:MM:SS to process."
type = "string"
option = ["-t"]
sources = ["fig"]
[[commands.field]]
id = "video_codec"
label = "Video codec"
type = "string"
option = ["-vcodec"]
suggestions = [{ value = "libx264", label = "H.264" }, { value = "libx265", label = "H.265" }, { value = "copy", label = "Copy stream" }]
sources = ["fig"]
[[commands.field]]
id = "audio_codec"
label = "Audio codec"
type = "string"
option = ["-acodec"]
suggestions = [{ value = "aac", label = "AAC" }, { value = "libmp3lame", label = "MP3" }, { value = "copy", label = "Copy stream" }]
sources = ["fig"]
[[commands.field]]
id = "video_filter"
label = "Video filter"
description = "For example scale=1280:-2."
type = "string"
option = ["-vf"]
sources = ["fig"]
[[commands.field]]
id = "video_bitrate"
label = "Video bitrate"
description = "For example 2M."
type = "string"
option = ["-b"]
sources = ["fig"]
[[commands.field]]
id = "frame_rate"
label = "Frame rate"
type = "number"
option = ["-r"]
sources = ["fig"]
[[commands.field]]
id = "sample_rate"
label = "Audio sample rate (Hz)"
type = "integer"
option = ["-ar"]
sources = ["fig"]
[[commands.field]]
id = "no_audio"
label = "Drop audio"
type = "boolean"
option = ["-an"]
sources = ["fig"]
[[commands.field]]
id = "no_video"
label = "Drop video"
type = "boolean"
option = ["-vn"]
sources = ["fig"]
[[commands.field]]
id = "output"
label = "Output file"
description = "The extension chooses the container format."
type = "path"
position = 0
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["fig"]
[[commands.task]]
id = "convert"
label = "Convert video"
fields = ["input", "video_codec", "audio_codec", "output", "overwrite"]
required = ["input", "output"]
[[commands.task]]
id = "extract-audio"
label = "Extract audio"
set = { no_video = [true] }
fields = ["input", "no_video", "audio_codec", "output"]
required = ["input", "output"]
[[commands.task]]
id = "trim"
label = "Trim without re-encoding"
set = { video_codec = ["copy"], audio_codec = ["copy"] }
fields = ["input", "start", "duration", "video_codec", "audio_codec", "output"]
required = ["input", "output"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["input", "output", "overwrite", "start", "duration", "video_codec", "audio_codec"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["video_filter", "video_bitrate", "frame_rate", "sample_rate", "no_audio", "no_video"]