ASF¶
Read and write ASF (Window Media Audio) files.
- class mutagen.asf.ASF(filething)¶
Bases:
mutagen.FileType
An ASF file, probably containing WMA or WMV.
- Parameters
filething (filething) –
- save(filething=None, padding=None)¶
Save tag changes back to the loaded file.
- Parameters
filething (filething) –
padding (
mutagen.PaddingFunction
) –
- Raises
- add_tags()¶
Adds new tags to the file.
- Raises
mutagen.MutagenError – if tags already exist or adding is not possible.
- static score(filename, fileobj, header)¶
Returns a score for how likely the file can be parsed by this type.
- Parameters
- 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.asf.ASFInfo¶
Bases:
mutagen.StreamInfo
ASF stream information.
- length¶
“Length in seconds
- Type
float
- sample_rate¶
Sample rate in Hz
- Type
int
- bitrate¶
Bitrate in bps
- Type
int
- channels¶
Number of channels
- Type
int
- codec_type¶
Name of the codec type of the first audio stream or an empty string if unknown. Example:
Windows Media Audio 9 Standard
- Type
- codec_name¶
Name and maybe version of the codec used. Example:
Windows Media Audio 9.1
- Type
- codec_description¶
Further information on the codec used. Example:
64 kbps, 48 kHz, stereo 2-pass CBR
- Type
- pprint()¶
Returns: text: a stream information text summary
- class mutagen.asf.ASFTags¶
Bases:
list
,mutagen._util.DictMixin
,mutagen.Tags
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.
- 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.ASFGUIDAttribute(value)¶
GUID attribute.
- Bases
- class mutagen.asf.ASFWordAttribute(value)¶
WORD attribute.
ASFWordAttribute(42)
- Bases
- class mutagen.asf.ASFDWordAttribute(value)¶
DWORD attribute.
ASFDWordAttribute(42)
- Bases
- class mutagen.asf.ASFQWordAttribute(value)¶
QWORD attribute.
ASFQWordAttribute(42)
- Bases
- class mutagen.asf.ASFBoolAttribute(value)¶
Bool attribute.
ASFBoolAttribute(True)
- Bases
- class mutagen.asf.ASFByteArrayAttribute(value)¶
Byte array attribute.
ASFByteArrayAttribute(b'1234')
- Bases
- class mutagen.asf.ASFUnicodeAttribute(value)¶
Unicode string attribute.
ASFUnicodeAttribute(u'some text')
- Bases