FFmpeg and video

Find or download FFmpeg, read video, put sound on a video, write markers.

On this page

Find or download FFmpeg, read video, put sound on a video, write markers.

audioFfmpeg

Find FFmpeg on this computer and say what it can do: OGG, Opus, AAC and video files need it

audioFfmpeg()

Returns A struct with available, source (configured, installed or system), path, probePath, version, encoders (libvorbis, libopus, aac, libmp3lame, flac that it has), platform, installable (is there a download for this computer), downloadSizeMB and installDir.

audioFfmpegInstall

Download FFmpeg for this computer into the bx-audio home, checked against a pinned checksum

audioFfmpegInstall( onProgress )
ArgumentTypeDefault
onProgressfunctionoptionalA function called as ( name, bytesDone, bytesTotal ) while files download.

Returns A struct with installed, version, path and probePath.

videoInfo

Describe any audio or video file with FFprobe: length, size, and the video and audio streams

videoInfo( path )
ArgumentTypeDefault
pathstringrequiredThe media file.

Returns A struct with path, format, seconds, bitrate, sizeBytes, video (codec, width, height, fps; null when there is none), audio (codec, channels, sampleRate; null when none) and streams, the raw stream list.

audioMux

Put audio on a video file, copying the picture without re-encoding it

audioMux( video, audio, output, keepOriginal=false, originalDb=-12, offset=0, bitrate=0 )
ArgumentTypeDefault
videostringrequiredThe video file.
audioanyrequiredThe audio buffer.
outputstringrequiredWhere to write the result. The extension picks the container: mp4, mov, mkv or webm.
keepOriginalbooleanfalseTrue to keep the video's own audio underneath the new audio. Defaults to false, which replaces it.
originalDbdouble-12Gain of the original audio when it is kept, in dB. Defaults to -12.
offsetdouble0Seconds to delay the new audio. Defaults to 0.
bitrateinteger0AAC (or Opus for webm) bitrate in kbps. 0 means 192.

Returns The absolute path of the written file. The result is never longer than the video.

audioMarkers

Write markers (points in time with labels) as JSON, CSV, a Resolve EDL, SRT, WebVTT, FFmpeg chapters or a YouTube chapter list

audioMarkers( markers, format="json", path="", fps=30, total=0 )
ArgumentTypeDefault
markersarrayrequiredAn array of structs with time (seconds), label and optionally duration (seconds; 0 lasts until the next marker).
formatstring"json"json, csv, edl, srt, vtt, ffmetadata or youtube. Defaults to json.
pathstring""A file to write the result to as well. Empty to only return the text.
fpsinteger30Frame rate for EDL timecodes. Defaults to 30.
totaldouble0Length of the whole program in seconds, which ends the last marker. Defaults to 2 seconds after it.

Returns The text of the markers in that format.

Edit this page Download Markdown Last updated Oct 16, 2026, 11:59:46 AM Report an issue