Document the settings that make a recording identical to what Spotify sent - #54
Merged
Conversation
… sent Recording at 48 kHz from a stream that is 44.1 produces a file that looks completely healthy — right format, right depth, plays perfectly — and whose top 2 kHz is empty, because Windows resampled every track on the way through the virtual cable. That is one of four things on the path between Spotify and a finished recording that change the audio by default, and none of them is something Offstream can decide: they are settings in the Sound control panel and in Spotify. So the README now says which ones and why, rather than leaving "lossless in, lossless out" as an assumption that happens to be false out of the box. The four are the cable's sample rate, its bit depth, Spotify's loudness normalisation, and volume — which lives in four separate places, any one of which turns an exact copy into a scaled one. The bit depth entry is the one that needs its reason spelled out: Windows mixes in 32-bit float, so 24-bit integer is the largest depth that survives the trip unchanged, and both 32-bit and 16-bit are worse in opposite directions. Also documented: FLAC is the only format here that can be exact. MP3, AAC and Opus re-encode by definition, and Offstream's WAV profile is `pcm_s16le`, so WAV loses depth that FLAC keeps — which is not obvious from a format list where WAV and FLAC both read as "lossless". The check commands are three, and the middle one draws the spectrum rather than measuring a band. A band measurement was written first and was wrong in the worst way: `highpass=f=22200` sits above Nyquist on a 44.1 kHz file, so ffmpeg rejects the filter, passes the audio through unfiltered, and reports a healthy level — telling the reader their correctly configured recording had content above 22.2 kHz. The picture cannot misfire, and where the audio stops is easier to read off it than out of a decibel figure anyway. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
revtex
force-pushed
the
bit-exact-capture-docs
branch
from
September 2, 2026 22:49
9ec6071 to
f4a9174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recording at 48 kHz from a stream that is 44.1 produces a file that looks completely healthy —
right format, right depth, plays perfectly — and whose top 2 kHz is empty, because Windows
resampled every track on the way through the virtual cable. Measured on a real recording: content
falls off a cliff at 22.05 kHz and is flat at the noise floor above it, with identical readings
for 22–23 kHz and 23–24 kHz.
That is one of four things on the path between Spotify and a finished recording that change the
audio by default, and not one of them is something Offstream can decide — they are settings in the
Sound control panel and in Spotify. So the README says which ones and why, instead of leaving
"lossless in, lossless out" as an assumption that happens to be false out of the box.
What the new section covers
Plus the two format facts that are not obvious from a picker where WAV and FLAC both read as
"lossless": FLAC is the only format here that can be exact. MP3, AAC and Opus re-encode by
definition, and Offstream's WAV profile is
pcm_s16le, so WAV loses depth FLAC keeps.A troubleshooting row points at the section from the symptom people will actually notice.
The check commands, and the one I threw away
Three commands. The middle one draws the spectrum rather than measuring a band, and that was a
correction, not a preference. The band measurement was written first and was wrong in the worst
possible way:
highpass=f=22200sits above Nyquist on a 44.1 kHz file, so ffmpeg rejects thefilter, passes the audio through unfiltered, and reports a healthy level — telling the reader that
their correctly configured recording had content above 22.2 kHz. It only failed on the files that
were right.
showspectrumpiccannot misfire, and where the audio stops is easier to read off a picture thanout of a decibel figure. Verified by generating both cases — a 44.1 kHz file and the same audio
resampled to 48 — and looking at the two spectrograms: the matched one fills the frame to the top
of its axis, the resampled one has a dead band above ~21.5 kHz with the axis running on to 22.8.
Verification
including the backtick continuations.
suites.