我正在搜索一个命令行标记工具,它支持ogg标记并允许将编码更改为标记。
发布于 2019-05-21 21:32:53
正如@LiveWireBT在评论中所说,您可以使用vorbiscomment,可以在vorbis-tools包中找到。
当您想替换/编辑单个标记时,vorbiscomment实际上并不容易使用,就像类型一样,因为您只有两个选项:用-a追加一个标记,或者用-w替换所有标签。
附加一个类型标记将添加一个类型标记,而不是编辑当前的类型标记。写体裁标签只会写体裁标签,并移除所有其他标签。
因此,我修改标记的方法如下:
# dynamically: list tags, edit one with sed, rewrite tags
vorbiscomment -l file.ogg | sed 's/^genre=.*/GENRE=Black Metal/' | vorbiscomment -w file.ogg
# with a temporary file (it's actually one of the examples in the manpage)
# (a bit longer/more difficult to use in a for loop,
# since you can specify only one input file)
vorbiscomment -l file.ogg > comments.txt
<edit comments.txt with vim/nano/sed>
vorbiscomment -w -c comments.txt file.ogg关于标记的编码,--raw选项可能是您所需要的:
-R,--raw 在UTF-8中读写注释,而不是转换到用户的字符集。
https://askubuntu.com/questions/322893
复制相似问题