8
6
Fork
You've already forked libid3tag
5
fork of the libid3tag library for reading ID3 metadata tags from MP3 files
  • C 94.9%
  • CMake 5.1%
Mary Guillemard 60370c44f2 Do not rewind to the start of stream in search_tags
This function would previously search for tags at the start of the
stream.
This works in general cases but if a user starts passing a fd with
a certain file offset this would get out of allowed ranges.
Additionally, if the actual tags are not at the start of the stream but
instead at the file offset previously saved, this would fail parsing.
So instead of a rewind, this now restore the previous saved position and
query tags from there.
This fixes parsing ID3 tags embedded in AIFF files for example.
Signed-off-by: Mary Guillemard <mary@mary.zone>
2026年06月30日 17:40:13 +02:00
.github/workflows small typo fix rescued from PR #3 2025年12月31日 07:11:49 +01:00
include Fix compatibility with CMake 3.10 2026年02月13日 20:00:06 +01:00
packaging Fix compatibility with CMake 3.10 2026年02月13日 20:00:06 +01:00
src Do not rewind to the start of stream in search_tags 2026年06月30日 17:40:13 +02:00
.codespellrc Document how to build the library shared+static 2026年01月02日 18:05:04 +01:00
.editorconfig Add .editorconfig matching source's style 2026年01月02日 04:37:41 +01:00
.gitignore Document how to build the library shared+static 2026年01月02日 18:05:04 +01:00
CHANGES libid3tag 0.16.4 2026年02月22日 21:37:47 -08:00
CMakeLists.txt CPack: Generate SHA256 hashes during packaging 2026年02月22日 21:07:20 -08:00
COPYING initialize Git repository with code from libid3tag-0.15.1b.tar.gz 2021年08月12日 11:56:49 -05:00
COPYRIGHT initialize Git repository with code from libid3tag-0.15.1b.tar.gz 2021年08月12日 11:56:49 -05:00
CREDITS Remove RCS tags 2026年01月05日 11:00:42 +01:00
genre.dat.cmake Generate genre.dat at build-time using cmake 2025年12月29日 18:21:16 +01:00
libid3tag.list.in initialize Git repository with code from libid3tag-0.15.1b.tar.gz 2021年08月12日 11:56:49 -05:00
README.md Add source packaging support and instructions 2026年02月13日 19:59:22 +01:00

libid3tag - ID3 tag manipulation library

Copyright (C) 2000-2004 Underbit Technologies, Inc.

Copyright (C) 2021-2026 Tenacity Team and Contributors

Introduction

libid3tag is a library for reading and (eventually) writing ID3 tags, both ID3v1 and the various versions of ID3v2.

See the file `id3tag.h' for the current library interface.

Building and Installing

libid3tag depends on zlib. On Linux, install the appropriate development packages for zlib using your system's package manager (e.g., apt, dnf, pacman). On Windows you can use vcpkg, which will build it from source. Alternatively, you can use any MSYS2 environment of your choice or Cygwin.

libid3tag also requires GNU gperf to build.

libid3tag uses the CMake build system. To build it, no matter your platform, run:

$ cmake -DCMAKE_INSTALL_PREFIX=/where/you/want/to/install/to -S . -B build # Configure command
$ cmake --build build --parallel <number-of-cpu-cores> # Build command
$ cmake --install build # Install command

If using vcpkg, add -DCMAKE_TOOLCHAIN_FILE=C:/Path/To/vcpkg/scripts/buildsystems/vcpkg.cmake to the end of your build command.

To build libid3tag as a static library, simply add -DBUILD_SHARED_LIBS=OFF at the end of your build command. If you want to build both shared and static libraries the easiest method is to just use two separate build directories:

$ cmake -DCMAKE_INSTALL_PREFIX=/where/you/want/to/install/to -S . -B build-shared
$ cmake -DCMAKE_INSTALL_PREFIX=/where/you/want/to/install/to -DBUILD_SHARED_LIBS=OFF -S . -B build-static
$ cmake --build build-shared --parallel <number-of-cpu-cores>
$ cmake --build build-static --parallel <number-of-cpu-cores>
$ cmake --install build-shared
$ cmake --install build-static

Packaging the Source Code

First, follow the instructions above, until you get to the "configure command". Do not run any commands after that command and do not follow the rest of the normal build instructions, only return to this section when done. Then, run the following command to package the source code:

$ cmake --build . --target package_source

Alternatively, you can use cpack instead in the following way:

$ cpack --config CPackSourceConfig.cmake

Either of the commands will perform the same task. After running either of the above commands, you will get a variety of tarballs you can use, including a .tar.gz tarball, a .tar.bz2 tarball, a .tar.xz tarball, and even a .tar.Z tarball. Whichever tarball you choose is solely your preference.

Copyright

Please read the COPYRIGHT file for copyright and warranty information. Also, the file COPYING contains the full text of the GNU GPL.

Send inquiries, comments, bug reports, suggestions, patches, etc. to https://codeberg.org/tenacityteam/libid3tag.

See also Tenacity's homepage on the web: http://tenacityaudio.org

Finally, check out libid3tag's original homepage on the web, on Underbit's website: https://www.underbit.com/products/mad/