Ogg Opus

Read and write Ogg Opus comments.

This module handles Opus files wrapped in an Ogg bitstream. The first Opus stream found is used.

Based on http://tools.ietf.org/html/draft-terriberry-oggopus-01

class mutagen.oggopus.OggOpus(filething)

Bases: OggFileType

An Ogg Opus file.

Parameters:

filething (filething) –

info
Type:

OggOpusInfo

tags
Type:

mutagen._vorbis.VCommentDict

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.oggopus.OggOpusInfo

Bases: StreamInfo

Ogg Opus stream information.

length

File length in seconds, as a float

Type:

float

channels

Number of channels

Type:

int

pprint()
Returns:

Print stream information

Return type:

text