如何在Opus文件中添加元数据? [英] How Can I Add Metadata in opus files?

查看:104
本文介绍了如何在Opus文件中添加元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣为.opus文件编写元数据,但是到目前为止,我所看到的所有文章都是针对.ogg或.mp3等更主流的格式的.我不确定ID3标签是否适用于.opus文件,并且找不到任何资源说明它们是否有效.我在(如何将元数据添加到WAV文件中看到了类似的内容?).

I'm interested in writing metadata for .opus files, but all of the posts that I've seen so far are for more mainstream formats such as .ogg, or .mp3. I'm uncertain as to whether ID3 tags work with .opus files, and I can't find any resources that say whether they do or not. I've seen something similar in (How to add metadata to WAV file?).

如何将诸如标题,作者等之类的元数据写入.opus文件?

How can I write metadata such as title, author, and the like to .opus files?

我认为启用libopusffmpeg可以做到,但是从文档中我不知道该怎么做.

I'm thinking that a libopus enabled ffmpeg would be able to do it, but from the documentation it is not obvious to me how to do it.

仅使用ffmpeg的解决方案是首选,但是任何开源Java库也应该很好.

Solutions using just ffmpeg are preferred, but any open source Java library should be just fine as well.

推荐答案

如果您要将现有音频文件编码为opus,则使用

If you are encoding an existing audio file to opus, then it is easy to do using opusenc:

opusenc input.wav out.opus --title "This is a title" --artist "The Beatles"

有几个元数据选项

 --title title      Set track title
 --artist artist    Set artist or author, may be used multiple times
 --album album      Set album or collection
 --genre genre      Set genre, may be used multiple times
 --date YYYY-MM-DD  Set date of track (YYYY, YYYY-MM, or YYYY-MM-DD)
 --comment tag=val  Add the given string as an extra comment
                      This may be used multiple times
 --picture file     Attach album art (see --help-picture)

这篇关于如何在Opus文件中添加元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆