ASF

Read and write ASF (Window Media Audio) files.

class mutagen.asf.ASF(filename)

Bases: mutagen.FileType

An ASF file, probably containing WMA or WMV.

Parameters:filename – a filename to load
Raises mutagen.asf.error:
 In case loading fails
info = None

A ASFInfo instance

tags = None

A ASFTags instance

save(filename=None, padding=None)

Save tag changes back to the loaded file.

Parameters:padding – A callback which returns the amount of padding to use. See mutagen.PaddingInfo
Raises mutagen.asf.error:
 In case saving fails
class mutagen.asf.ASFInfo

Bases: mutagen.StreamInfo

ASF stream information.

length = 0.0

Length in seconds (float)

sample_rate = 0

Sample rate in Hz (int)

bitrate = 0

Bitrate in bps (int)

channels = 0

Number of channels (int)

codec_type = u''

Name of the codec type of the first audio stream or an empty string if unknown. Example: Windows Media Audio 9 Standard (mutagen.text)

codec_name = u''

Name and maybe version of the codec used. Example: Windows Media Audio 9.1 (mutagen.text)

codec_description = u''

Further information on the codec used. Example: 64 kbps, 48 kHz, stereo 2-pass CBR (mutagen.text)

pprint()

Returns a stream information text summary

Return type:text
class mutagen.asf.ASFTags

Bases: list, mutagen._util.DictMixin, mutagen.Metadata

Dictionary containing ASF attributes.

keys()

Return a sequence of all keys in the comment.

as_dict()

Return a copy of the comment data in a real dict.

pprint()

Returns a string containing all key, value pairs.

Return type:text
class mutagen.asf.error

Bases: exceptions.IOError, mutagen.MutagenError

Error raised by mutagen.asf

class mutagen.asf.ASFBaseAttribute

Generic attribute.

language = None

Language

stream = None

Stream

value = None

The Python value of this attribute (type depends on the class)

class mutagen.asf.ASFBoolAttribute(value)

Bool attribute.

ASFBoolAttribute(True)
Bases:ASFBaseAttribute
class mutagen.asf.ASFGUIDAttribute(value)

GUID attribute.

Bases:ASFBaseAttribute
class mutagen.asf.ASFWordAttribute(value)

WORD attribute.

ASFWordAttribute(42)
Bases:ASFBaseAttribute
class mutagen.asf.ASFDWordAttribute(value)

DWORD attribute.

ASFDWordAttribute(42)
Bases:ASFBaseAttribute
class mutagen.asf.ASFQWordAttribute(value)

QWORD attribute.

ASFQWordAttribute(42)
Bases:ASFBaseAttribute
class mutagen.asf.ASFBoolAttribute(value)

Bool attribute.

ASFBoolAttribute(True)
Bases:ASFBaseAttribute
class mutagen.asf.ASFByteArrayAttribute(value)

Byte array attribute.

ASFByteArrayAttribute(b'1234')
Bases:ASFBaseAttribute
class mutagen.asf.ASFUnicodeAttribute(value)

Unicode string attribute.

ASFUnicodeAttribute(u'some text')
Bases:ASFBaseAttribute
class mutagen.asf.ASFUnicodeAttribute(value)

Unicode string attribute.

ASFUnicodeAttribute(u'some text')
Bases:ASFBaseAttribute