6

I have a collection of opus music files that needs tagging and a text file containing the appropriate tags. I'm trying to accomplish the tagging through a Python script but I need a way to edit the metadata of the opus files. So a CLI program that can tag opus files.

opusenc, which is part of opus-tools doesn't accept opus files as input. There are a lot of graphical programs that can edit the tags of opus files but that doesn't work in this case. I was thinking ffmpeg could do it but the wiki page doesn't mention opus (or ogg or flac which also uses a "Vorbis Comment" to store metadata as I understand it).

I assume my two suggestions would re-encode the files and I'm not sure if that will damage the sound quality. If so it would be preferable to use something that doesn't re-encode.

I'm running Manjaro Linux.

4
  • Care to share your script? I am about to do exactly the same thing.
    – d-b
    Feb 3 at 23:34
  • What script are you referring to?
    – user.S
    Feb 5 at 12:40
  • You wrote "I'm trying to accomplish the tagging through a Python script".
    – d-b
    Feb 5 at 14:44
  • Ah, right. It grew into a fairly large program specifically for files downloaded with youtube-dl. Probably different from your usecase. What I recommend you do if you just want to move some data from text files into the tags of a music file is use the mutagen Python module: github.com/quodlibet/mutagen
    – user.S
    Feb 5 at 18:28

2 Answers 2

6

I guess I basically had the answer in my question. FFMpeg works just fine when I just decided to try it. It doesn't seem to re-encode because the process is instantaneous. I just did:

ffmpeg -i <input-file> -acodec copy -metadata title="<title>" -metadata artist=<artist> <output-file>
0

You can try opustags at fmang/opustags: Ogg Opus tags editor

It can copy metadata from an input opus file and add the metadata you want.

There is a man page included for usage examples.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .