Skip to content

Define the player formats every server must produce - #323

Merged
kahrendt merged 5 commits into
mainfrom
docs/guaranteed-player-formats
Oct 28, 2026
Merged

kahrendt merged 5 commits into
mainfrom
docs/guaranteed-player-formats

Conversation

@maximmaxim345

@maximmaxim345 maximmaxim345 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

The spec promised that a player listing flac or pcm can be served by every server, but bit_depth, channels and sample_rate had no bounds. A player listing only formats outside what a server produces was compliant but never got a stream, with no error sent to it. A server producing just one narrow format was also compliant.

This names a set every server has to produce. flac:

  • 16 bit, 1 channel, 44100 Hz
  • 16 bit, 1 channel, 48000 Hz
  • 16 bit, 2 channels, 44100 Hz
  • 16 bit, 2 channels, 48000 Hz
  • 24 bit, 1 channel, 44100 Hz
  • 24 bit, 1 channel, 48000 Hz
  • 24 bit, 2 channels, 44100 Hz
  • 24 bit, 2 channels, 48000 Hz

pcm:

  • 16 bit, 1 channel, 44100 Hz
  • 16 bit, 1 channel, 48000 Hz
  • 16 bit, 2 channels, 44100 Hz
  • 16 bit, 2 channels, 48000 Hz

I don't think this is a hard requirement for servers. Most audio is already at 44.1 or 48 kHz, so at most one sample rate conversion is needed. Converting bit depth, mixing down to mono and FLAC encoding are all cheap. pcm only needs 16 bit, which keeps its bandwidth at about 1.5 Mbit/s for stereo at 48 kHz, while flac covers 24 bit. aiosendspin already does all of this.

The player side moves out of the spec: the rule that players list flac or pcm is removed, and the implementation guide recommends listing at least one entry from this set instead.

Related:

@maximmaxim345

This comment has been minimized.

@maximmaxim345

maximmaxim345 commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Server requirement should stay as MUST, client requirements should stay out of the spec and instead be moved into the implementation guide.

@marcelveldt marcelveldt moved this from Triage to Next in Sendspin Project Board Oct 21, 2026

@kahrendt kahrendt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kahrendt
kahrendt merged commit 9b5b57e into main Oct 28, 2026
1 check passed
@kahrendt
kahrendt deleted the docs/guaranteed-player-formats branch October 28, 2026 11:14
@github-project-automation github-project-automation Bot moved this from Next to Done in Sendspin Project Board Oct 28, 2026
maximmaxim345 added a commit to Sendspin/sendspin-js that referenced this pull request Nov 6, 2026
# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

The comments around the flac/pcm fallback still said the protocol
requires players to list flac or pcm. The spec dropped that player rule
and now only requires servers to support flac and pcm at 16-bit and 44.1
or 48 kHz, so the comments say that instead.

No code changes.

**Related issue or spec PR (if applicable):**

- Sendspin/spec#323

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [ ] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [ ] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [x] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
maximmaxim345 added a commit to Sendspin/aiosendspin that referenced this pull request Nov 16, 2026
# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

A server running with `allow_noncompliant_clients=False` rejected
players whose `supported_formats` listed only `opus`, and other servers
logged a non-compliance warning for them. The spec no longer requires
players to list `flac` or `pcm`, so these players are compliant.

The server picks Opus for them when PyAV has libopus, and otherwise
sends them no stream, like any player that lists only formats the server
can't produce.

**Related issue or spec PR (if applicable):**

- Sendspin/spec#323

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [x] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [ ] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [ ] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants