15

I usually tag Ogg Vorbis files with EasyTAG 2.1.7.

Now, I want to produce Ogg Opus files, and I'm not able to write tags into the file. EasyTAG bears about Ogg file not having a Vorbis or a Speex stream.

Another tools, such as lltag, spits messages like "Skipping this file with unknown type."

Some advice? Thanks.

4 Answers 4

6
+50

Times have changed since this question was first asked and then answered! Now in October 2017 Ogg Opus files have become much more mainstream and there are several good choices under Ubuntu to allow tagging of your Ogg Opus files.

I detail 3 methods below that I would personally recommend:

1. EasyTag

A modern version of EasyTag can tag Ogg Opus files.

Edit: As has been pointed out this is less of a good idea as there is an unresolved issue with broken tagging of Ogg Vorbis files. In my experience the safe version of EasyTag for Ogg Vorbis is 2.4.2 and this version has given me personally no issues.

First install EasyTag:

sudo apt-get install easytag

Then open your Ogg Opus file with EasyTag for tag editing! A screenshot from my own system seen below:

enter image description here

Other good choices could be PuddleTag or Kid3...

2. Creating tags as you encode with Opusenc:

If you prefer the command line you can create your tags as you encode your files using opusenc. Install this utility by running the following:

sudo apt-get install opus-tools

The command line that I used to create my test file is as follows:

opusenc --bitrate 128 \
        --artist "Jody Marie Gnant" \
        --title "Lucky Night" \
        --date "1995" \
        --album "Treasure Quest Soundtrack" \
        --genre "Soundtrack" \
        luckynight.wav luckynight.opus

More tags are available to add to the syntax above and all can be seen by running opusenc -h from the command line.

3. Ripping audio CDs to Ogg Opus + tagging

Again if you are keen on the command line and you are creating your Ogg Opus audio files from audio CDs under newer versions of Ubuntu you can use abcde to rip, convert as well as tag with a single command. Install abcde as follows:

sudo apt-get install abcde opus-tools

Then place the following configuration file in ~/.abcde.conf:

# -----------------$HOME/.abcde.conf----------------- #
# 
# A sample configuration file to convert music cds to 
#       Opus using abcde version 2.7.2
# 
# http://andrews-corner.org/linux/abcde/index.html
# -------------------------------------------------- #

# Encode tracks immediately after reading. Saves disk space, gives
# better reading of 'scratchy' disks and better troubleshooting of
# encoding process but slows the operation of abcde quite a bit:
LOWDISK=y

# Specify the method to use to retrieve the track information,
# I give the default below but consider setting 'musicbrainz'
# instead, which is my own preferred option:
CDDBMETHOD=cddb

# Make a local cache of cddb entries and then volunteer to use 
# these entries when and if they match the cd:
CDDBCOPYLOCAL="y"
CDDBLOCALDIR="$HOME/.cddb"
CDDBLOCALRECURSIVE="y"
CDDBUSELOCAL="y"

# Specify the encoder to use for Opus. In this case
# the only choice is opusenc.
OPUSENCODER=opusenc

# Specify the path to the selected encoder. In most cases the encoder
# should be in your $PATH as I illustrate below, otherwise you will 
# need to specify the full path. For example: /usr/bin/opusenc
OPUSENC=opusenc

# Specify your required encoding options here. Multiple options can
# be selected as '--preset standard --another-option' etc.
# In vbr mode the bitrate setting allows for a range of bitrates, use
# --cvbr or --hard-cbr for exact bitrate control. See all of the options
# by running ;opusenc -h' from the command line...
OPUSENCOPTS="--vbr --bitrate 128"

# Output type for opus.
OUTPUTTYPE="opus"

# The cd ripping program to use. There are a few choices here: cdda2wav,
# dagrab, cddafs (Mac OS X only) and flac. New to abcde 2.7 is 'libcdio'.
CDROMREADERSYNTAX=cdparanoia            

# Give the location of the ripping program and pass any extra options,
# if using libcdio set 'CD_PARANOIA=cd-paranoia'.
CDPARANOIA=cdparanoia  
CDPARANOIAOPTS="--never-skip=40"

# Give the location of the CD identification program:       
CDDISCID=cd-discid            

# Give the base location here for the encoded music files.
OUTPUTDIR="$HOME/Music"               

# The default actions that abcde will take.
ACTIONS=cddb,playlist,read,encode,tag,move,clean

# Decide here how you want the tracks labelled for a standard 'single-artist',
# multi-track encode and also for a multi-track, 'various-artist' encode:
OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
VAOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'

# Decide here how you want the tracks labelled for a standard 'single-artist',
# single-track encode and also for a single-track 'various-artist' encode.
# (Create a single-track encode with 'abcde -1' from the commandline.)
ONETRACKOUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}'
VAONETRACKOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}'

# Create playlists for single and various-artist encodes. I would suggest
# commenting these out for single-track encoding.
PLAYLISTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}.m3u'
VAPLAYLISTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}.m3u'

# This function takes out dots preceding the album name, and removes a grab
# bag of illegal characters. It allows spaces, if you do not wish spaces add
# in -e 's/ /_/g' after the first sed command.
mungefilename ()
{
  echo "$@" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]"
}

# What extra options?
MAXPROCS=2                              # Run a few encoders simultaneously
PADTRACKS=y                             # Makes tracks 01 02 not 1 2
EXTRAVERBOSE=2                          # Useful for debugging
COMMENT='abcde version 2.7.2'           # Place a comment...
EJECTCD=y                               # Please eject cd when finished :-)

Then simply run the command:

abcde

to set the process running!

In Conclusion:

Under a modern version of Ubuntu you will be spoiled for choices in tagging your Ogg Opus files with good choices from both gui and command line...

3
  • Sorry guys, but EasyTag is a no-go because of bugzilla.gnome.org/show_bug.cgi?id=776110, which has received no love for some time now. In summary, if you use EasyTag on your Ogg/Opus files you'll trash the headers and ruin them. Hardly "absolutely no issues". DO NOT USE
    – tamester
    Commented Nov 14, 2017 at 23:53
  • @tamester Sorry I have been very slow with this, I have added some details of this bug in the answer...
    – andrew.46
    Commented Jan 29, 2018 at 0:19
  • EasyTag is also completely unusable because you can’t just open a file, instead it somehow must scan your entire home directory for audio files. That’s just stupid. Commented Feb 29 at 19:25
2

The opus standard is quite new and hasn't gained good support for tools yet. The opus stream is usually wrapped in ogg containers; when a program which us unaware of opus looks at the containers stream, it looks for the stream codecs it knows (usually vorbis or speex for audio).

The current state of support is stated on opus' Wikipedia page: https://en.wikipedia.org/wiki/Opus_(audio_format)#Support_in_software

VLC version 2.04 is expected to get opus support, but it's not out yet.

I use wine with foobar2000 to tag opus files under linux, and it works well.

4
  • Thanks, a very informative answer exposing current status of the opus support on Linux. I'll tags the files with foobar2000 by now :) Commented Oct 17, 2012 at 13:42
  • The only thing this answer shows is a poor understanding of the actual question. Foobar indeed. A program that can edit tags doesn't have to be able to decode the streams in the container. By the way VLC 2.0.3-0ubuntu0.12.04.1 already plays Opus content. VLC != VLC package in Ubuntu.
    – LiveWireBT
    Commented Oct 17, 2012 at 19:45
  • 1
    Well VLC 2.0.3-0ubuntu0.12.04.1 (revision 2.0.2-93-g77aa89e) neither plays nor tags opus files for me. Have you tried? I was referring to http://trac.videolan.org/vlc/ticket/7185. Since the OP was obviously looking for an easy solution to tag opus files, I was just stating that I'm using foobar for that until native apps gain better support for that. I very much fail to understand the reason for the negative undertone in your comment.
    – phoibos
    Commented Oct 17, 2012 at 21:24
  • Sorry, I just realized that the oga files some podcasters have begun to publish are usual Vorbis files and real Opus files don't work as of now in precise. Though there was some confusion regarding MIME types and containers and all of sudden some oga files were published in places were I wouldn't expect them.
    – LiveWireBT
    Commented Oct 18, 2012 at 3:26
2

I prefer to use “Ex Falso”. It has “Tags from path”, “Rename files”, “Track Numbers” features: https://quodlibet.readthedocs.io/en/latest/screenshots.html

Before I used it for mp3 files. But now I used it for opus file and it works great. My Current Ex Falso version is 4.2.1 (Operating system is Ubuntu 20.04). It can be installed from the “Ubuntu Software” center.

2
  • But mp3 and ogg/opus/vorbis don't use the same tag format. mp3 uses id3 where ogg uses vorbiscomment. So, is this advice compatible?
    – Sandburg
    Commented Sep 8, 2020 at 14:59
  • Quodlibet/Exfalso are packaged with mutagen, a python library with very wide tagging format support, so yes its compatible
    – wbob
    Commented Apr 17, 2021 at 13:27
1

users who prefer the command line have multiple options, one is tracktag from the python-audiotools package to write a Vorbis Comment to an Opus file. opusenc takes the metadata only while transcoding. For Debian/Ubuntu its a quick

apt install audiotools

Usage:

tracktag --name "title" --artist "interpret" file.opus

another option to edit any music file is music-tag.

pip3 install --user music_tag
alias musictag='python3 -m music_tag'

Usage:

musictag --set "title:Title" --set "artist:Artist" --set "album:Album" file.opus

It is depending on mutagen to do this and thus has wide file support.

3
  • I don't think music-tag works. I got here looking for a way around mutagen's mid3v2 not changing the album name and mutagen-inspect giving me the error "can't sync to MPEG frame." When I try $ musictag --set "album:Saint Marry of the Woods (opus)" jm\ --\ 01.opus it errors out with the same error mutagen's mid3v2 does: "mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame".
    – bvargo
    Commented Mar 25, 2023 at 20:01
  • tracktag errors out as well: tracktag --name "title" --artist "interpret" jm\ --\ 01.opus ... SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
    – bvargo
    Commented Mar 25, 2023 at 20:08
  • xxd or file command is your friend, check if you have a container (ogg or mkv) to write the tags to. The opus audio most likely could/should be in an ogg container that can take the tag writes, try different files
    – wbob
    Commented Mar 25, 2023 at 22:40

You must log in to answer this question.

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