DSDIFF

DSDIFF audio stream information and tags.

class mutagen.dsdiff.DSDIFF(filething)

Bases: mutagen.FileType

An DSDIFF audio file.

For tagging ID3v2 data is added to a chunk with the ID “ID3 “.

Parameters:filething (filething) –
tags

mutagen.id3.ID3

info

DSDIFFInfo

add_tags()

Add empty ID3 tags to the file.

static score(filename, fileobj, header)

Returns a score for how likely the file can be parsed by this type.

Parameters:
  • filename (fspath) – a file path
  • fileobj (fileobj) – a file object open in rb mode. Position is undefined
  • header (bytes) – data of undefined length, starts with the start of the file.
Returns:

negative if definitely not a matching type, otherwise a score,

the bigger the more certain that the file can be loaded.

Return type:

int

class mutagen.dsdiff.DSDIFFInfo(fileobj)

DSDIFF stream information.

channels

int – number of audio channels

length

float – file length in seconds, as a float

sample_rate

int – audio sampling rate in Hz

bits_per_sample

int – audio sample size (for DSD this is always 1)

bitrate

int – audio bitrate, in bits per second

compression

str – DSD (uncompressed) or DST

pprint()

Returns: text: Print stream information