mp3 Package

mp3 Package

exception eyed3.mp3.Mp3Exception(*args)[source]

Bases: eyed3.Exception

eyed3.mp3.MIME_TYPES = ['audio/mpeg', 'audio/mp3', 'audio/x-mp3', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg3', 'audio/mpg', 'audio/x-mpg', 'audio/x-mpegaudio']

Mime-types that are recognized at MP3

eyed3.mp3.isMp3File(file_name)[source]

Does a mime-type check on file_name and returns True it the file is mp3, and False otherwise.

class eyed3.mp3.Mp3AudioInfo(file_obj, start_offset, tag)[source]

Bases: eyed3.core.AudioInfo

lame_tag = None

If not None, the Lame header. See eyed3.mp3.headers.LameHeader

bit_rate = None

2-tuple, (vrb?:boolean, bitrate:int)

bit_rate_str[source]
class eyed3.mp3.Mp3AudioFile(path, version=(3, None, None))[source]

Bases: eyed3.core.AudioFile

headers Module

eyed3.mp3.headers.isValidHeader(header)[source]
eyed3.mp3.headers.findHeader(fp, start_pos=0)[source]
eyed3.mp3.headers.compute_time_per_frame(mp3_header)[source]
class eyed3.mp3.headers.Mp3Header(header_data=None)[source]
decode(header)[source]
class eyed3.mp3.headers.VbriHeader[source]

Bases: object

decode(frame)[source]
class eyed3.mp3.headers.XingHeader[source]
decode(frame)[source]
class eyed3.mp3.headers.LameHeader(frame)[source]

Bases: dict

Read the LAME info tag. frame should be the first frame of an mp3.

ENCODER_FLAGS = {'NSPSYTUNE': 1, 'NOGAP_PREV': 8, 'NSSAFEJOINT': 2, 'NOGAP_NEXT': 4}
PRESETS = {0: 'Unknown', 480: 'V2', 450: 'V5', 420: 'V8', 1000: 'r3mix', 1001: 'standard', 490: 'V1', 1003: 'insane', 460: 'V4', 1004: 'standard/fast', 430: 'V7', 1005: 'extreme/fast', 500: 'V0', 1006: 'medium', 470: 'V3', 440: 'V6', 410: 'V9', 1007: 'medium/fast', 1002: 'extreme'}
REPLAYGAIN_NAME = {0: 'Not set', 1: 'Radio', 2: 'Audiofile'}
REPLAYGAIN_ORIGINATOR = {0: 'Not set', 1: 'Set by artist', 2: 'Set by user', 3: 'Set automatically', 100: 'Set by simple RMS average'}
SAMPLE_FREQUENCIES = {0: '<= 32 kHz', 1: '44.1 kHz', 2: '48 kHz', 3: '> 48 kHz'}
STEREO_MODES = {0: 'Mono', 1: 'Stereo', 2: 'Dual', 3: 'Joint', 4: 'Force', 5: 'Auto', 6: 'Intensity', 7: 'Undefined'}
SURROUND_INFO = {0: 'None', 1: 'DPL encoding', 2: 'DPL2 encoding', 3: 'Ambisonic encoding', 8: 'Reserved'}
VBR_METHODS = {0: 'Unknown', 1: 'Constant Bitrate', 2: 'Average Bitrate', 3: 'Variable Bitrate method1 (old/rh)', 4: 'Variable Bitrate method2 (mtrh)', 5: 'Variable Bitrate method3 (mt)', 6: 'Variable Bitrate method4', 8: 'Constant Bitrate (2 pass)', 9: 'Average Bitrate (2 pass)', 15: 'Reserved'}
decode(frame)[source]

Decode the LAME info tag.

eyed3.mp3.headers.lamevercmp(x, y)[source]

Table Of Contents

Previous topic

id3 Package

Next topic

plugins Package

This Page