Cloud storage
Let’s DJ can pull a catalog from an S3-compatible bucket the owner already has. You connect the bucket once; we list it on a schedule and catalog what is in it. This is the only provider kind we pull from. Everything else in this specification pushes.
Connect a bucket
Endpoint, bucket, access key id and secret are required. Three more are not:
| Field | Notes |
|---|---|
| Prefix | Optional. Limits every sweep to one folder. |
| Region | Advanced. Derived from the endpoint unless overridden. |
| Addressing | Advanced. Path-style or virtual-hosted. Derived from the endpoint unless overridden. |
Saving runs a real ListBucket and reports whatever came back, including the storage’s own error text.
Access is read-only. The key is used for GetObject and ListBucket only. No code path writes to, deletes from or modifies the bucket. Fill it with the storage provider’s own tools.
Catalog a bucket
We sweep every ten minutes, and once immediately after a bucket is connected. A sweep lists the bucket, respecting the prefix, and matches objects by extension.
| Extension | playable |
|---|---|
.mp4, .m4v, .webm, .mov, .mp3, .m4a |
true |
.mkv, .avi, .wmv, .flv |
false — see Formats |
Tracks are upserted through the same internal path as the sync endpoint.
The object key is the externalId. Renaming an object in the bucket loses any correction attached to it.
Name the files
Trịnh Công Sơn - Diễm Xưa.mp4 → artist “Trịnh Công Sơn”, title “Diễm Xưa”
Trịnh Công Sơn - Diễm Xưa.jpg → artwork for that track
Diễm_Xưa.mp4 → title “Diễm Xưa”, no artist
- Drop the extension. Underscores become spaces.
- Split on the first
-— space, hyphen, space. Before it is the artist, after it is the title. A second-stays in the title. - A hyphen with no spaces around it is not a separator.
- With no separator, there is no artist and the whole name is the title.
- Tags inside the file are not read.
This is the rule the bridge follows for a file on a disk. It is described for people in a karaoke night.
Artwork is a sibling image: same basename, any of .jpg, .jpeg, .png or .webp, matched without regard to case. We fetch it and store the bytes, by the same path as a push to /providers/art — see Artwork. An object’s ETag skips re-fetching an image that has not changed since the last sweep. The 1 MB limit applies.
A looping cover is a sibling video: same basename with a .loop. infix before .mp4 or .webm, as in Trịnh Công Sơn - Diễm Xưa.loop.mp4. The sweep attaches it as the track’s loopId and leaves it out of the catalog, so it never turns up as a song of its own. Unlike artwork it is never fetched or stored — it resolves to a presigned link when the song does. The bridge follows the same convention on a disk. See Add a looping cover.
Mark karaoke and video
A karaoke video and a music video are both an .mp4. Say which in the name, with a marker before the extension:
Toto - Africa.karaoke.mp4 → karaoke, artist “Toto”, title “Africa”
Toto - Africa.video.mp4 → video, artist “Toto”, title “Africa”
Backing Track.karaoke.mp3 → karaoke, title “Backing Track”
Toto - Africa.mp3 → song
- The marker is
.karaokeor.video, the last thing before the extension, matched without regard to case. It works on audio too. - There is no
.songmarker..mp3and.m4aare songs already. - Remove the marker before you parse the title. Left in,
Toto - Africa.karaoke.mp4is a song called “Africa.karaoke”. - Artwork and covers match with the marker removed.
Toto - Africa.karaoke.mp4takesToto - Africa.jpgorToto - Africa.karaoke.jpg, andToto - Africa.loop.mp4orToto - Africa.karaoke.loop.mp4..loopcomes last. - A bucket sends a kind for every track: the marker, else
songfor.mp3and.m4a, elsekaraoke. A bucket has no setting for that default, so an owner with music videos marks them, or corrects them in the app.
The bridge follows the same markers on a disk. See Declare a media kind.
Resolve media
A cloud track resolves to a presigned GetObject link, good for a few minutes. The link is the credential; there is no media token on this path.
The Stage asks for the link when a song is about to play, holds it, and asks again before it expires — or on resuming a song that was paused past its link’s lifetime.
Capabilities
| Capability | Value |
|---|---|
canSeek |
Measured. Every sweep asks the bucket for a range of a playable file and records whether it honored it. |
canAnalyzeAudio |
Never declared for a bucket. |
What the cloud path does not cover
A bucket consumes this contract rather than replacing it. Whether we pull or you push is settled by reachability alone: a bucket on a home network still cannot be polled from outside it.
Signing is pure computation, so a presigned link can point at an address we cannot ourselves reach. A NAS can have its catalog pushed by something on its own network while media resolves through a presigned link the Stage dials directly. It needs a name and a certificate like any other provider — see A name and a certificate.