AC3

Pure AC3 file information.

exception mutagen.ac3.AC3Error
class mutagen.ac3.AC3(filename)

Bases: mutagen.FileType

AC3(filething)

Parameters:filething (filething) –

Load AC3 or EAC3 files.

Tagging is not supported. Use the ID3/APEv2 classes directly instead.

info
Type:AC3Info
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:
  • 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.ac3.AC3Info

Bases: mutagen.StreamInfo

AC3 stream information. The length of the stream is just a guess and might not be correct.

channels

number of audio channels

Type:int
length

file length in seconds, as a float

Type:float
sample_rate

audio sampling rate in Hz

Type:int
bitrate

audio bitrate, in bits per second

Type:int
codec

ac-3 or ec-3 (Enhanced AC-3)

Type:str
pprint()

Returns: text: Print stream information