File

Video & Audio Operations

Use these SDK methods on a File to extract audio, extract frames to ZIP, or generate transcripts.
Each operation has an async enqueue method with a corresponding status method, plus a sync helper that polls until completion.


Audio Extract

Status

Sync helper


Extract Frames (ZIP)

Status

Sync helper


Transcribe (Audio or Video)

Status

Sync helper

Parameters

Common

NameTypeDescription
namespaceIdstring (required)Destination namespace id
locationstring (required)Destination folder (no leading/trailing "/")
filenamestring (required)Output filename (no /)
poll{ intervalMs?: number; timeoutMs?: number }For *Sync methods only

Audio Extract (extras)

NameTypeNotes
format'mp3' \| 'aac' \| 'wav' \| 'flac' \| 'ogg' \| 'opus'Default: mp3
bitrateKbpsnumber?≤ 512
sampleRateHznumber?≤ 192000
channelsnumber?1..6
startnumber?seconds
durationnumber?seconds
normalizeboolean?default false

Extract Frames (extras)

NameTypeNotes
startnumber?seconds
endTimenumber?must be > start when both set

Transcribe (extras)

NameTypeNotes
languagestring?default en-US

Returns

All *Async methods:
{ status: 'queued', operationId: string, source: { id, name, location, namespaceId }, dest: { namespaceId, location, filename } }

All *Sync methods on success:
{ status: 'completed', operationId: string, source, dest }

Status helpers:

  • Audio: { id, type: 'audio-extract', status }
  • Frames: { id, type: 'extract-frames', status }
  • Transcribe: { id, type: 'transcribe', status }

Operation Reference

OperationParams (shape)Notes
extractAudio{ format, bitrateKbps?, sampleRateHz?, channels?, start?, duration?, normalize? }Extracts audio from a video source into chosen format
extractFrames{ start?, endTime? }Emits a ZIP of frames between times (if provided)
crop{ x, y, width, height }Crops video frame
muteSegment{ start, duration }Mutes audio between times
fade{ type: 'in''out', startTime, duration }Video fade effect
addText{ text, x, y, fontSize, fontColor, startTime?, endTime? }Draws text; fontFile (TTF/OTF) optional
addBorder{ top, right, bottom, left }Adds border via padding
reverse{ video?: boolean = true, audio?: boolean = false }Reverse video and/or audio
audioFade{ type: 'in''out', startTime, duration }Audio fade envelope
motionBlur{ frames=5, weights?, outputFps? }Temporal blur; weights like “1 2 3 2 1”

Notes

  • Ensure destination folders exist; SDK/API will normalize location.
  • Filename rules: no /. For frames ZIP: must end with .zip. For transcript: must end with .txt.
  • Conflict handling: enqueue calls fail with 409 if a file with the same (namespaceId, location, filename) already exists.
  • Permissions: the source file’s namespace must be accessible by your API key.