【问题标题】:metadata editing in bash linux for multimedia files(not images) in linux [closed]在 bash linux 中编辑 linux 中多媒体文件(不是图像)的元数据 [关闭]
【发布时间】:2012-04-15 10:20:07
【问题描述】:
我在 stackoverflow 上进行了搜索,我一直在 google 和 dadduckgo 上搜索,似乎没有人有一个很好的方法让我这样做。
似乎唯一可行的工具是 Exiftool,它只具有 ogg 文件的读取能力(这是我目前正在使用的)。我想通过命令行执行此操作,因为 mp3s/oggs 及其名称是元数据,但元数据是空白的。我已经知道如何在 bash 中解析文件名,但我找不到将其放回文件的方法。我可以手动做这种事情,但它几乎不值得,因为我必须手动做。
Musicbrainz picard 也因为一些奇怪的原因没有正确标记它们,所以这就是我必须这样做的原因。
【问题讨论】:
标签:
linux
bash
metadata
exif
ogg
【解决方案1】:
ID3 标签是特定于 MP3 的。 Ogg Vorbis 注释字段规范见:Field Names
vorbiscomment(包vorbis-tools)可以修改和查询ogg标签信息。
mp3info是使用mp3标签的众多工具之一。
.ogg
# Clear all info
printf ''| vorbiscomment -w test.ogg
vorbiscomment -l test.ogg
# modify info
echo ========
printf 'TITLE=The Last Saskatchewan Pirate
ARTIST=Captain Tractor
ALBUM=East of Edson
DATE=2000-01-01
COMMENT=Just another TEST comment
DESCRIPTION=*** Hello ***
'|vorbiscomment -w test.ogg
vorbiscomment -l test.ogg
echo ========
输出 (.ogg)
========
TITLE=The Last Saskatchewan Pirate
ARTIST=Captain Tractor
ALBUM=East of Edson
DATE=2000-01-01
COMMENT=Just another TEST comment
DESCRIPTION=*** Hello ***
========
mp3
# Delete the entire ID3 tag
mp3info -d test.mp3
echo ========
# modify info
mp3info -t "The Last Saskatchewan Pirate" \
-a "Captain Tractor" \
-l "East of Edson" \
-g "Folk/Rock" \
-y "2000" \
-n "1" \
-c "Just another TEST comment" \
test.mp3
mp3info test.mp3
echo ========
输出 (.mp3)
========
File: test.mp3
Title: The Last Saskatchewan Pirate Track:
Artist: Captain Tractor
Album: East of Edson Year: 2000
Comment: Just another TEST comment Genre: Folk/Rock [81]
========