![Linux mp3 发布标签编写器](https://linux22.com/image/1513466/Linux%20mp3%20%E5%8F%91%E5%B8%83%E6%A0%87%E7%AD%BE%E7%BC%96%E5%86%99%E5%99%A8.png)
我正在寻找适用于 Linux (centos) 的 mp3 cli 标签编写器,它可以添加发布者标签,搜索了几天,尝试了很多 cli 编写器,但它们都只有基本选项,如标题、艺术家、专辑、流派、评论,我感兴趣的是发布者标签,所以有没有什么工具可以帮助我,没有 gui,只有 cli,因为我在 centos 上,必须将其链接到 php,谢谢
答案1
经过大量搜索,我找到了可以在 mp3 上写入 v2 标签的 mid3v2
yum install python
yum install pip
pip install mutagen
通过运行它
$ mid3v2 -h
Usage: mid3v2 [OPTION] [FILE]...
Mutagen-based replacement for id3lib's id3v2.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose be verbose
-q, --quiet be quiet (the default)
-e, --escape enable interpretation of backslash escapes
-f, --list-frames Display all possible frames for ID3v2.3 / ID3v2.4
--list-frames-v2.2 Display all possible frames for ID3v2.2
-L, --list-genres Lists all ID3v1 genres
-l, --list Lists the tag(s) on the open(s)
--list-raw Lists the tag(s) on the open(s) in Python format
-d, --delete-v2 Deletes ID3v2 tags
-s, --delete-v1 Deletes ID3v1 tags
-D, --delete-all Deletes ID3v1 and ID3v2 tags
--delete-frames=FID1,FID2,...
Delete the given frames
-C, --convert Convert tags to ID3v2.4 (any editing will do this)
-a "ARTIST", --artist="ARTIST"
Set the artist information
-A "ALBUM", --album="ALBUM"
Set the album title information
-t "SONG", --song="SONG"
Set the song title information
-c "DESCRIPTION":"COMMENT":"LANGUAGE", --comment="DESCRIPTION":"COMMENT":"LANGUAGE"
Set the comment information
-g "GENRE", --genre="GENRE"
Set the genre or genre number
-y YYYY[-MM-DD], --year=YYYY[-MM-DD], --date=YYYY[-MM-DD]
Set the year/date
-T "num/num", --track="num/num"
Set the track number/(optional) total tracks
mp3 标签可以这样写
mid3v2 -a "artist" --TPUB "company name" 'path/file.mp3'