BevylDevelopers

Uploading videos

Send footage to Bevyl and wait for processing.

An upload takes three calls: reserve it, send the file to the signed URL, then complete it. uploadVideo makes all three.

const upload = await bevyl.uploadVideo({
  filename: 'kitchen-broll.mp4',
  fileSize: size,
  contentType: 'video/mp4',
  body: stream,
});

Files can be up to 5 GB. To send the file yourself, call prepareVideoUpload, PUT the file to upload.url with upload.headers before expiresAt, then call completeVideoUpload with the uploadId.

Processing

After upload, Bevyl transcodes and analyzes the footage. getVideoStatus reports:

StatusMeaning
workingProcessing. Poll again after pollIntervalMs.
processedReady for a project.
failedProcessing failed.

Bevyl sends a broll.processed webhook when processing finishes.

Read the analysis

getVideoAnalysis returns a summary of the footage and a description of each clip. Analysis can finish after the video is processed. Until it does, the call returns the error code analysis_not_ready.

const { analysis } = await bevyl.getVideoAnalysis({ videoId });
console.log(analysis.summary);

Reuse footage

A processed video can go into any number of projects, so upload each file once.

listVideos returns the workspace's uploads, newest first, including those still processing. videoId stays null until the upload completes.

const page = await bevyl.listVideos({ limit: 20 });
const next = page.nextCursor
  ? await bevyl.listVideos({ limit: 20, cursor: page.nextCursor })
  : null;

On this page