DSF: DSD Stream File
Sony DSF stores raw DSD audio in channel blocks together with an optional ID3v2 metadata section.
A DSF, or DSD Stream File, stores Direct Stream Digital audio as channel blocks plus a format description and optional tags. Its sample count is especially useful because the final stored block may include padding.
Sony's specification describes a DSD header, a fmt description, a data chunk, and an optional ID3v2 metadata area at the end. The header supplies the file size and a pointer to the metadata; the format description supplies channel arrangement, sampling frequency, and sample count.
Block padding in a one-second DSD recording
Take an illustrative stereo DSD source at 2,822,400 one-bit samples per second per channel. Its unpadded audio needs:
2,822,400 ÷ 8 = 352,800 bytes per channel per second
The stereo total is 705,600 bytes. DSF groups the data into 4,096-byte blocks for each channel, with a block for one channel followed by a block for the other before the next block group.
One second requires ceil(352,800 / 4,096) = 87 blocks per channel. Those blocks occupy 356,352 bytes per channel, or 712,704 for stereo. The difference, 7,104 bytes across both channels, is final-block padding in this simplified one-second example. Container headers and optional tags add further bytes.
| Quantity | Reader interpretation |
|---|---|
| Sampling frequency | How many one-bit sample instants occur per second |
| Sample count | How many of those instants belong to each channel |
| Channel type and count | Which channel sequences are present |
| Block size | How the channel data is arranged in storage |
The reader stops presenting according to the valid sample count. Dividing the whole padded file size by an assumed audio rate would overestimate its duration.
Bits in a byte are part of the storage convention
Eight successive one-bit samples are packed into a byte. The format's representation fields specify how the bits are interpreted; reversing their order changes their time sequence, even though it does not change the number of bytes. A package conversion must respect the bit and channel arrangement rather than treat the data as PCM integers.
DSDIFF arranges DSD differently. A converter can translate that arrangement while preserving the DSD sequence. Converting DSD to PCM instead constructs a different sample representation and requires audio-processing work.
Tags do another job
DSF's optional ID3v2 area can describe artist, album, title, or artwork. It is located through the header pointer, independently of the samples' duration. A music library's title information can therefore change without changing the stored one-bit signal.
For an Emby session, distinguish reading this source from the subsequent output. The actual route may preserve DSD or convert it for the app and device. The DSF header explains what was stored; the delivered format explains what the next stage receives.