How Can I Add Metadata in opus files?

不羁岁月 提交于 2019-12-10 18:08:16

问题


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?).

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

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.

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


回答1:


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"

There are several metadata options

 --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)


来源:https://stackoverflow.com/questions/49496995/how-can-i-add-metadata-in-opus-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!