2023-03-02 08:38:23 +01:00
|
|
|
|
.TH opustags 1 "March 2023" "@PROJECT_NAME@ @PROJECT_VERSION@"
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.SH NAME
|
2018-12-09 20:03:15 +01:00
|
|
|
|
opustags \- Ogg Opus tag editor
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
.B opustags --help
|
|
|
|
|
.br
|
|
|
|
|
.B opustags
|
|
|
|
|
.RI [ OPTIONS ]
|
|
|
|
|
.I INPUT
|
|
|
|
|
.br
|
|
|
|
|
.B opustags
|
|
|
|
|
.I OPTIONS
|
2020-09-26 13:12:15 +02:00
|
|
|
|
.B -i
|
|
|
|
|
.R \fIFILE\fP...
|
|
|
|
|
.br
|
|
|
|
|
.B opustags
|
|
|
|
|
.I OPTIONS
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.B -o
|
|
|
|
|
.I OUTPUT INPUT
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
.PP
|
2018-12-09 20:03:15 +01:00
|
|
|
|
\fBopustags\fP can read and edit the comment header of an Ogg Opus file.
|
2023-03-02 08:38:23 +01:00
|
|
|
|
It has two modes: read-only, and read-write for tag editing.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.PP
|
|
|
|
|
In read-only mode, only the beginning of \fIINPUT\fP is read, and the tags are
|
2023-02-13 03:25:37 +01:00
|
|
|
|
printed on standard output. Lines prefixed by tabs are continuation of the previous tag.
|
2018-11-22 03:40:08 +01:00
|
|
|
|
\fIINPUT\fP can either be the name of a file or \fB-\fP to read from standard input.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
You can use the options below to edit the tags before printing them.
|
|
|
|
|
This could be useful to preview some changes before writing them.
|
|
|
|
|
.PP
|
2018-12-02 22:20:10 +01:00
|
|
|
|
In editing mode, you need to specify an output file with \fB--output\fP, or use \fB--in-place\fP to
|
2020-09-26 13:12:15 +02:00
|
|
|
|
overwrite the input files. If the output is a regular file, the result is first written to a
|
2018-12-02 22:20:10 +01:00
|
|
|
|
temporary file and then moved to its final location on success. On error, the temporary output file
|
|
|
|
|
is deleted.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.PP
|
2018-12-02 22:20:10 +01:00
|
|
|
|
Tag editing can be performed with the \fB--add\fP, \fB--delete\fP and \fB--set\fP
|
2018-11-22 03:40:08 +01:00
|
|
|
|
options. Options can be specified in any order and don’t conflict with each other.
|
|
|
|
|
First the specified tags are deleted, then the new tags are added.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.PP
|
2018-11-22 03:40:08 +01:00
|
|
|
|
You can delete all the tags with \fB--delete-all\fP. This operation can be combined with \fB--add\fP
|
|
|
|
|
to set new tags without being bothered by the old ones.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.PP
|
2018-11-22 03:40:08 +01:00
|
|
|
|
If you want to replace all the tags, you can use the \fB--set-all\fP option which will cause
|
|
|
|
|
\fBopustags\fP to read tags from standard input.
|
|
|
|
|
The format is the same as the one used for output: newline-separated \fIFIELD=Value\fP assignment.
|
|
|
|
|
All the previously existing tags as deleted.
|
2013-01-01 22:41:47 +01:00
|
|
|
|
.PP
|
2018-12-09 20:03:15 +01:00
|
|
|
|
The Opus format specifications requires that tags are encoded in UTF-8, so that's the only encoding
|
|
|
|
|
opustags supports. If your system encoding is different, the tags are automatically converted to and
|
2023-03-02 08:38:23 +01:00
|
|
|
|
from your system locale. When you edit an Opus file whose tags contains characters unsupported by
|
|
|
|
|
your system encoding, the original UTF-8 values will be preserved for the tags you don't explictly
|
|
|
|
|
modify.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.SH OPTIONS
|
|
|
|
|
.TP
|
|
|
|
|
.B \-h, \-\-help
|
|
|
|
|
Display a brief description of the options.
|
|
|
|
|
.TP
|
|
|
|
|
.B \-o, \-\-output \fIFILE\fI
|
2018-11-22 03:40:08 +01:00
|
|
|
|
Specify the output file.
|
|
|
|
|
The input file will be read, its tags edited, then written to the specified output file. If
|
|
|
|
|
\fIFILE\fP is \fB-\fP then the resulting Opus file will be written to standard output.
|
|
|
|
|
The output file can’t be the same as the input file.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.TP
|
2018-12-02 22:20:10 +01:00
|
|
|
|
.B \-i, \-\-in-place
|
|
|
|
|
Overwrite the input file instead of creating a separate output file. It has the same effect as
|
|
|
|
|
setting \fB--output\fP to the same path as the input file and enabling \fB--overwrite\fP.
|
2018-11-22 03:40:08 +01:00
|
|
|
|
This option conflicts with \fB--output\fP.
|
2013-01-02 10:59:43 +01:00
|
|
|
|
.TP
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.B \-y, \-\-overwrite
|
2018-12-02 22:20:10 +01:00
|
|
|
|
By default, \fBopustags\fP refuses to overwrite an already-existent file.
|
|
|
|
|
Use \fB-y\fP to allow overwriting.
|
|
|
|
|
Note that this option is not needed when the output is a special file like \fI/dev/null\fP.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.TP
|
2018-12-18 02:50:50 +01:00
|
|
|
|
.B \-d, \-\-delete \fIFIELD[=VALUE]\fP
|
|
|
|
|
If value is not specified, delete all the tags whose field name is \fIFIELD\fP.
|
|
|
|
|
Otherwise, delete all the comments whose field name is \fIFIELD\fP and value is \fIVALUE\fP.
|
|
|
|
|
In both cases, the field names are case-insensitive, and expected to be ASCII.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.TP
|
|
|
|
|
.B \-a, \-\-add \fIFIELD=VALUE\fP
|
2018-11-22 03:40:08 +01:00
|
|
|
|
Add a tag. Note that multiple tags with the same field name are perfectly acceptable, so you can add
|
|
|
|
|
multiple fields with the same name, and previously existing tags will also be preserved.
|
|
|
|
|
When the \fB--delete\fP is used with the same \fIFIELD\fP, only the older tags are deleted.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.TP
|
|
|
|
|
.B \-s, \-\-set \fIFIELD=VALUE\fP
|
|
|
|
|
This option is provided for convenience. It delete all the fields of the same
|
|
|
|
|
type that may already exist, then adds it with the wanted value.
|
|
|
|
|
This is strictly equivalent to \fB--delete\fP \fIFIELD\fP \fB--add\fP
|
|
|
|
|
\fIFIELD=VALUE\fP. You can combine it with \fB--add\fP to add tags of the same
|
|
|
|
|
type. As deletion occurs before adding, \fB--set\fP won’t erase the tags
|
|
|
|
|
added with \fB--add\fP.
|
|
|
|
|
.TP
|
|
|
|
|
.B \-D, \-\-delete-all
|
2018-11-22 03:40:08 +01:00
|
|
|
|
Delete all the previously existing tags.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.TP
|
|
|
|
|
.B \-S, \-\-set-all
|
2018-11-22 03:40:08 +01:00
|
|
|
|
Sets the tags from scratch.
|
|
|
|
|
All the original tags are deleted and new ones are read from standard input.
|
|
|
|
|
Each line must specify a \fIFIELD=VALUE\fP pair and be separated with line feeds.
|
2023-02-13 03:25:37 +01:00
|
|
|
|
Empty lines and lines starting with \fI#\fP are ignored.
|
|
|
|
|
Multiline tags must have their continuation lines prefixed by a single tab (in other words, every
|
|
|
|
|
\fI\\n\fP must be replaced by \fI\\n\\t\fP).
|
2020-10-10 16:17:32 +02:00
|
|
|
|
.TP
|
|
|
|
|
.B \-e, \-\-edit
|
|
|
|
|
Edit tags interactively by spawning the program specified by the EDITOR
|
|
|
|
|
environment variable. The allowed format is the same as \fB--set-all\fP.
|
2020-10-24 12:00:19 +02:00
|
|
|
|
If TERM and VISUAL are set, VISUAL takes precedence over EDITOR.
|
2020-12-26 13:16:52 +01:00
|
|
|
|
.TP
|
2023-02-21 07:20:48 +01:00
|
|
|
|
.B \-\-output-cover \fIFILE\fP
|
2023-02-28 08:16:34 +01:00
|
|
|
|
Save the cover art of the input Opus file to the specified location.
|
2023-02-21 07:20:48 +01:00
|
|
|
|
If the input file does not contain any cover art, this option has no effect.
|
|
|
|
|
To allow overwriting the target location, specify \fB--overwrite\fP.
|
|
|
|
|
In the case of multiple pictures embedded in the Opus tags, only the first one is saved.
|
|
|
|
|
Note that the since the image format is not fixed, you should consider an extension-less file name
|
|
|
|
|
and rely on the magic number to deduce the type. opustags does not add or check the target file’s
|
|
|
|
|
extension.
|
|
|
|
|
You can specify \fB-\fP for standard output, in which case the regular output will be suppressed.
|
|
|
|
|
.TP
|
2023-02-28 08:16:34 +01:00
|
|
|
|
.B \-\-set-cover \fIFILE\fP
|
|
|
|
|
Replace or set the cover art to the specified picture.
|
2023-03-02 08:18:27 +01:00
|
|
|
|
Specify \fB-\fP to read the picture from standard input.
|
2023-02-28 08:16:34 +01:00
|
|
|
|
In theory, an Opus file may contain multiple pictures with different roles, though in practice only
|
|
|
|
|
the front cover really matters. opustags can currently only handle one front cover and nothing else.
|
|
|
|
|
.TP
|
2023-05-04 03:58:44 +02:00
|
|
|
|
.B \-\-vendor
|
|
|
|
|
Print the vendor string from the OpusTags packet and do nothing else. Standard tags operations are
|
|
|
|
|
not supported when specifying this flag.
|
|
|
|
|
.TP
|
2020-12-26 13:16:52 +01:00
|
|
|
|
.B \-\-raw
|
|
|
|
|
OpusTags metadata should always be encoded in UTF-8, as per RFC 7845. However, some files may be
|
|
|
|
|
corrupted or possibly even contain intentional binary data. In that case, --raw lets you edit that
|
|
|
|
|
kind of binary data without ensuring the validity of the tags encoding. This option may also be
|
|
|
|
|
useful when your system encoding is different from UTF-8 and you wish to preserve the full UTF-8
|
|
|
|
|
character set even though your system cannot display it.
|
2018-11-24 18:05:55 +01:00
|
|
|
|
.SH EXAMPLES
|
|
|
|
|
.PP
|
|
|
|
|
List all the tags in file foo.opus:
|
|
|
|
|
.PP
|
|
|
|
|
opustags foo.opus
|
|
|
|
|
.PP
|
|
|
|
|
Copy in.opus to out.opus, with the TITLE tag added:
|
|
|
|
|
.PP
|
|
|
|
|
opustags in.opus --output out.opus --add "TITLE=Hello world!"
|
|
|
|
|
.PP
|
|
|
|
|
Replace all the tags in dest.opus with the ones from src.opus:
|
|
|
|
|
.PP
|
|
|
|
|
opustags src.opus | opustags --in-place dest.opus --set-all
|
|
|
|
|
.PP
|
|
|
|
|
Remove the previously existing ARTIST tags and add the two X and Y ARTIST tags, then display the new
|
|
|
|
|
tags without writing them to the Opus file:
|
|
|
|
|
.PP
|
|
|
|
|
opustags in.opus --add ARTIST=X --add ARTIST=Y --delete ARTIST
|
2020-10-10 16:17:32 +02:00
|
|
|
|
.PP
|
|
|
|
|
Edit tags interactively in Vim:
|
|
|
|
|
.PP
|
|
|
|
|
EDITOR=vim opustags --in-place --edit file.opus
|
2018-12-18 02:50:50 +01:00
|
|
|
|
.SH CAVEATS
|
|
|
|
|
.PP
|
|
|
|
|
\fBopustags\fP currently has the following limitations:
|
|
|
|
|
.IP \[bu]
|
|
|
|
|
Multiplexed streams are not supported.
|
|
|
|
|
.IP \[bu]
|
2023-02-13 03:25:37 +01:00
|
|
|
|
Control characters inside tags are printed raw rather than being escaped.
|
2018-12-18 02:50:50 +01:00
|
|
|
|
.PP
|
|
|
|
|
Internally, the OpusTags packet in an Ogg Opus file may contain extra arbitrary binary data after
|
|
|
|
|
the comments. This block of data is currently not editable, but is always preserved. The same
|
|
|
|
|
applies for the vendor string.
|
|
|
|
|
.PP
|
|
|
|
|
If you need a feature not currently supported, feel free to open an issue or send an email with your
|
|
|
|
|
use case.
|
2013-01-01 22:28:43 +01:00
|
|
|
|
.SH AUTHOR
|
2023-02-13 03:25:37 +01:00
|
|
|
|
Frédéric Mangano <fmang+opustags@mg0.fr>
|
2018-11-25 18:11:36 +01:00
|
|
|
|
.PP
|
|
|
|
|
Report bugs at <https://github.com/fmang/opustags/issues>
|