dumont
Backends

Bunny Stream

A deliberately lossy filesystem projection over the Bunny.net Stream video API.

A vfs.FileSystem projection over the Bunny.net Stream video API (HTTP, no SDK). Auth is the Stream API key in the AccessKey header.

This is an intentionally lossy projection — Stream is an API, not a byte store (it keeps HLS renditions, not your original file). The path tree is a convenience surface, not a faithful filesystem. It is dumont's one deliberate, clearly-labelled exception to the "no lossy projections" rule.

Configuration

remotes:
  vid:                          # addressed as vid://collection/title
    type: bunnystream
    library_id: "<your-library-id>"
    cdn_host: vz-xxxx.b-cdn.net  # optional, enables best-effort MP4 download
    credentials:
      api_key: env:BUNNY_STREAM_KEY

Path projection

PathMeaning
/the library root
/<collection>a collection (directory)
/<collection>/<title>a video (file), named by its title
/<title>an uncollectioned video at the root

Duplicate titles within a collection are disambiguated with a #<guid> suffix (e.g. intro#a1b2c3…), and that form is accepted for reads.

Capabilities

CapValueWhy
Directoriescollections are real
MTimedateUploaded
RandomReaddownloads stream whole renditions
RandomWrite / Append / Truncateuploads are whole-video
AtomicRenamerename is not supported (ErrNotSupported)

Operation mapping

  • Mkdir /<name> → create a collection. Only one directory level exists (collections); deeper MkdirErrNotSupported.
  • Write /<collection>/<title> → create a video then upload the bytes on Close. The collection must already exist (Mkdir it first).
  • ReadDir → collections (+ root videos) at the root; videos within a collection.
  • Stat → video storageSize / dateUploaded (size is 0 until Bunny finishes processing the upload).
  • Remove → delete a video or collection.
  • Readbest-effort: Stream has no original-bytes download, so a read tries the CDN MP4 renditions (https://<cdn_host>/<guid>/play_<res>p.mp4) and returns ErrNotSupported if none is available (no cdn_host, MP4 fallback disabled, or still processing).

On this page