eyeD3 - Python的音频文件处理库
jopen
12年前
eyeD3 是一个Python工具用于处理音频文件,特别是包含ID3元数据的mp3文件。提供了读写 ID3 标签(v1.x 和 v2.3/v2.4)的功能。同时可检测 MP3 文件的头信息,包括比特率、采样频率和播放时间等。特性:
- Python package for writing application and/or plugins.
- Command-line tool driver script that supports plugins. viewer/editor interface.
- Easy editing/viewing of audio metadata from the command-line, using the ‘classic’ plugin.
- Support for ID3 versions 1.x, 2.2 (read-only), 2.3, and 2.4.
- Support for the MP3 audio format exposing details such as play time, bit rate, sampling frequency, etc.
- Abstract design allowing future support for different audio formats and metadata containers.
import eyed3 audiofile = eyed3.load("song.mp3") audiofile.tag.artist = u"Nobunny" audiofile.tag.album = u"Love Visions" audiofile.tag.title = u"I Am a Girlfriend" audiofile.tag.track_num = 4 audiofile.tag.save()