DSF

Read and write DSF audio stream information and tags.

class mutagen.dsf.DSF(filething)

Bases: mutagen.FileType

An DSF audio file.

Parameters

filething (filething) –

info
Type

DSFInfo

tags
Type

mutagen.id3.ID3Tags or None

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

add_tags()

Add a DSF tag block to the file.

delete(filething=None)

Remove tags from a file.

In cases where the tagging format is independent of the file type (for example mutagen.id3.ID3) all traces of the tagging format will be removed. In cases where the tag is part of the file type, all tags and padding will be removed.

The tags attribute will be cleared as well if there is one.

Does nothing if the file has no tags.

Raises

mutagen.MutagenError – if deleting wasn’t possible

class mutagen.dsf.DSFInfo

DSF audio stream information.

Information is parsed from the fmt chunk of the DSF file.

length

audio length, in seconds.

Type

float

channels

The number of audio channels.

Type

int

sample_rate

Sampling frequency, in Hz. (2822400, 5644800, 11289600, or 22579200)

Type

int

bits_per_sample

The audio sample size.

Type

int

bitrate

The audio bitrate.

Type

int

pprint()
Returns

Print stream information

Return type

text