_Mirrored from the GitHub release v2.3.0; the downloads are served from https://download.waveflow.app._

# WaveFlow Server 2.3.0

A track can now have its music video. The server finds the video beside the song, links it to the track and serves it, and the web player shows it in place of the cover. Videos that earlier versions counted as tracks are dropped from the library. Covers that did not show do so now. The database gains one table, so read [Upgrading](#upgrading-from-222) before you pull.

## New

- **A track's music video.** The server looks for the video named like the track, ignoring case:
  - beside the track (`Album/Song.mp4` next to `Album/Song.flac`);
  - in a `Clips` folder beside it (`Album/Clips/Song.mp4`);
  - inside the track itself, when the track is an `.mp4` that contains a video track.

  The formats are `mp4`, `m4v`, `mov`, `webm` and `mkv`, tried in that order, and each candidate is inspected before it is accepted. The rule is the WaveFlow desktop app's, so both find the same video for the same files.

  On the playing screen of the web player, **Watch the clip** shows the video in place of the cover, with its own sound. The track pauses while the clip plays. When the clip closes or ends, the track takes over at the clip's position, and plays on if it was playing. Only one sound plays at a time: starting the track, a radio station or a podcast episode pauses the clip, and the clip pauses them in turn.

  The video is served as it is, never converted, so whether it plays depends on what the browser can decode: an `mp4` in H.264 plays everywhere, a `mkv` often does not. Whoever may play the track may watch its video, and access is checked again at every request. The decisions are in [RFC-029](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/docs/rfcs/RFC-029-track-music-video.md). The changes are [#450](https://github.com/InstaZDLL/waveflow-server/pull/450) to [#453](https://github.com/InstaZDLL/waveflow-server/pull/453).

## Fixed

- **A music video beside its song is no longer a second track.** `mp4` is an audio format as well, so a video named like its song, beside it or in a `Clips` folder, was indexed as a track of its own. It played the video's soundtrack with no picture. The scan now leaves such a video out. An `.mp4` that holds only audio is still a track, and so is a video with no song of its name beside it ([#450](https://github.com/InstaZDLL/waveflow-server/pull/450)).
- **More covers show.** Three cases left an album with no cover at all:
  - **WebP covers stored as `.bin`.** Before this release, a WebP cover whose tag did not name its type was stored under `.bin`. This is often a video thumbnail. The server repairs those at its first start, with no rescan needed ([#457](https://github.com/InstaZDLL/waveflow-server/pull/457)).
  - **GIF and BMP covers.** A `cover.gif`, a `cover.bmp`, or a picture of either type inside a file was stored but never served. Both are served now, and a GIF animates if it is animated ([#458](https://github.com/InstaZDLL/waveflow-server/pull/458)).
  - **Covers read from now on.** A file with no front cover whose first picture is empty now takes the next picture that is not. JPEG, PNG and WebP covers are now recognised from their image data before the type the tag declares ([#449](https://github.com/InstaZDLL/waveflow-server/pull/449)).

  TIFF covers are still not served: almost no browser or app can show them.

## For client authors

- **Every native track carries `clip`**: `{ "format", "byte_size" }`, or `null` when it has none. This applies to `SongItem`, and through it to `TrackDetail`, the listings and the catalogue snapshot.
- **Three new routes**:
  - `GET /api/v2/tracks/{id}/clip` serves the video behind the usual bearer;
  - `POST /api/v2/tracks/{id}/clip-ticket` returns a ticket for a `<video>` element, which cannot send a header;
  - `GET /api/v2/clip-stream/{ticket}` plays from that ticket.

  The two `GET` routes serve the file whole or by range. The direct clip route and the ticket route take the usual bearer and answer `401` without it; the ticket stream needs only its ticket. Every other refusal is the same `404`: a track with no video, one the caller may not play, an invalid or expired ticket, a video deleted since the scan. A clip ticket opens neither the audio nor a canvas.
- **The [native API guide](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/docs/guides/api-v2-guide.md#a-tracks-music-video)** describes them.
- **The Subsonic façade answers as it did.**

## Install

```bash
docker run -d --name waveflow \
  -p 4533:4533 \
  -v waveflow-data:/data \
  -v /path/to/music:/music:ro \
  ghcr.io/instazdll/waveflow-server:2.3.0
```

The image runs on `linux/amd64` and `linux/arm64`. It is the same, digest for digest, on Docker Hub as `instazdll/waveflow-server:2.3.0`, and `latest` now follows this release.

The standalone archives for Windows, macOS and Linux are attached below, with `SHA256SUMS` over all of them. The same files are linked from [this release's notes on download.waveflow.app](https://download.waveflow.app/server/releases/v2.3.0/RELEASE-NOTES.md), which stay available even when GitHub does not answer.

On Home Assistant, the [WaveFlow app](https://github.com/InstaZDLL/waveflow-home-assistant) moves to this release once its version follows.

## Upgrading from 2.2.2

Pull `2.3.0` and start it on the same data volume. With an archive, use the new folder in place of the old one, and carry over what you changed in `laptop.env`: your data is kept apart from that folder.

- **The database schema gains one table**, which records the link between a track and its video. Going back therefore takes a restore: `2.2.2` refuses to start on a database `2.3.0` has migrated. Before migrating, the server copies the database and its key into `pre-migration-<epoch ms>/` in the data directory. [`waveflow-server database restore`](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/docs/guides/operations.md#a-copy-before-every-upgrade) puts that copy back, without anything the database gained since. With `WAVEFLOW_MIGRATION_BACKUPS=0` the server takes no copy, and the way back is a backup of your own.
- **A video that was indexed as a track disappears from the library.** The next scan finds it gone, as it would a deleted file: it becomes unavailable, then is purged under the library's rules. Whatever a member had on it goes with it: a favourite, a rating, plays, a place in a playlist. That scan also links the song to its video.
- **Covers stored as `.bin` are repaired at boot**, with no rescan needed.

Coming from 2.2.1 or earlier, read the [2.2.2 notes](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/docs/releases/v2.2.2.md) first: the image now starts as root and hands its data folder to its own account. Coming from 2.1.2 or earlier, also read the [2.2.0 notes](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/docs/releases/v2.2.0.md#upgrading-from-212).

**Full changelog**: [CHANGELOG.md](https://github.com/InstaZDLL/waveflow-server/blob/v2.3.0/CHANGELOG.md) · https://github.com/InstaZDLL/waveflow-server/compare/v2.2.2...v2.3.0

## Download

The server for one computer, without Docker: extract the archive and start `waveflow-server` inside it. Each archive holds the server, its own FFmpeg and a `README.txt` to read first.

| System | Archive |
| --- | --- |
| Windows (x86_64) | [waveflow-server-2.3.0-windows-x86_64.zip](https://download.waveflow.app/server/releases/v2.3.0/waveflow-server-2.3.0-windows-x86_64.zip) |
| macOS (Apple silicon) | [waveflow-server-2.3.0-macos-arm64.zip](https://download.waveflow.app/server/releases/v2.3.0/waveflow-server-2.3.0-macos-arm64.zip) |
| macOS (Intel) | [waveflow-server-2.3.0-macos-x86_64.zip](https://download.waveflow.app/server/releases/v2.3.0/waveflow-server-2.3.0-macos-x86_64.zip) |
| Linux (x86_64) | [waveflow-server-2.3.0-linux-x86_64.tar.gz](https://download.waveflow.app/server/releases/v2.3.0/waveflow-server-2.3.0-linux-x86_64.tar.gz) |
| Linux (arm64) | [waveflow-server-2.3.0-linux-arm64.tar.gz](https://download.waveflow.app/server/releases/v2.3.0/waveflow-server-2.3.0-linux-arm64.tar.gz) |

The Windows executables carry a self-signed certificate and the macOS ones an ad-hoc signature, which neither system trusts, so both warn on the first launch: `README.txt` says what to click past. [`SHA256SUMS`](https://download.waveflow.app/server/releases/v2.3.0/SHA256SUMS) holds the checksums of them all, and [`ffmpeg-8.1.3-sources.tar.gz`](https://download.waveflow.app/server/releases/v2.3.0/ffmpeg-8.1.3-sources.tar.gz) the source of the FFmpeg they carry.

## Container image

```bash
docker pull ghcr.io/instazdll/waveflow-server:2.3.0
```

The same image, digest for digest, is on Docker Hub:

```bash
docker pull instazdll/waveflow-server:2.3.0
```

Also published as `latest` in both, for `linux/amd64` and `linux/arm64` (a Raspberry Pi 4 or 5 on a 64-bit system).

