All Projects → supermihi → Pytaglib

supermihi / Pytaglib

Licence: gpl-3.0
Python audio tagging library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytaglib

Savify
Download Spotify songs to mp3 with full metadata and cover art!
Stars: ✭ 227 (+97.39%)
Mutual labels:  metadata, tags
Music Metadata Browser
Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
Stars: ✭ 105 (-8.7%)
Mutual labels:  metadata, tags
audio-tag-analyzer
Extracts metadata music metadata found in audio files
Stars: ✭ 18 (-84.35%)
Mutual labels:  metadata, tags
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (+56.52%)
Mutual labels:  metadata, tags
node-taglib2
A rewrite of the now unmaintained node-taglib
Stars: ✭ 40 (-65.22%)
Mutual labels:  metadata, tags
metadata-action
GitHub Action to extract metadata (tags, labels) from Git reference and GitHub events for Docker
Stars: ✭ 492 (+327.83%)
Mutual labels:  metadata, tags
Music Metadata
Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
Stars: ✭ 455 (+295.65%)
Mutual labels:  metadata, tags
Mustangproject
Open Source Java e-Invoicing library, validator and tool (Factur-X/ZUGFeRD, UNCEFACT/CII XRechnung)
Stars: ✭ 98 (-14.78%)
Mutual labels:  metadata
Opc Ua Ooi
Object Oriented Internet - C# deliverables supporting a new Machine To Machine (M2M) communication architecture
Stars: ✭ 104 (-9.57%)
Mutual labels:  metadata
Agentframework
An elegant & efficient TypeScript metaprogramming API to build software agents
Stars: ✭ 97 (-15.65%)
Mutual labels:  metadata
Protoc Gen Gotag
Add custom struct tags to protobuf generated structs
Stars: ✭ 97 (-15.65%)
Mutual labels:  tags
Ut metadata
BitTorrent Extension for Peers to Send Metadata Files (BEP 9)
Stars: ✭ 98 (-14.78%)
Mutual labels:  metadata
Open Graph
Library that assists in building Open Graph meta tags
Stars: ✭ 112 (-2.61%)
Mutual labels:  tags
Ttgtagcollectionview
Useful for showing text or custom view tags in a vertical or horizontal scrollable view and support Autolayout at the same time. It is highly customizable that most features of the text tag can be configured. 标签流显示控件,同时支持文字或自定义View
Stars: ✭ 1,626 (+1313.91%)
Mutual labels:  tags
Appstream
Tools and libraries to work with AppStream metadata
Stars: ✭ 101 (-12.17%)
Mutual labels:  metadata
Photostructure For Servers
PhotoStructure for Servers
Stars: ✭ 98 (-14.78%)
Mutual labels:  metadata
Gomodifytags
Go tool to modify struct field tags
Stars: ✭ 1,662 (+1345.22%)
Mutual labels:  tags
React Mentions
@mention people in a textarea
Stars: ✭ 1,341 (+1066.09%)
Mutual labels:  tags
Hydrus Presets And Scripts
collection of presets and scripts for Hydrus
Stars: ✭ 101 (-12.17%)
Mutual labels:  tags
Tagify
🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue
Stars: ✭ 2,305 (+1904.35%)
Mutual labels:  tags

pytaglib

CircleCI PyPI

pytaglib is a Python audio tagging library. It is cross-platform, works with all Python versions, and is very simple to use yet fully featured:

pytaglib is a very thin wrapper (≈150 lines of code) around the fast and rock-solid TagLib C++ library.

News

See the Changelog.

Get it

At first, you might need to install taglib with development headers. Ubuntu, Mint and other Debian-Based distributions:

    sudo apt install libtag1-dev

Then install pytaglib with pip:

    pip install pytaglib

For other operating systems and more details, see installation notes below.

Usage

>>> import taglib
>>> song = taglib.File("/path/to/my/file.mp3")
>>> song.tags
{'ARTIST': ['piman', 'jzig'], 'ALBUM': ['Quod Libet Test Data'], 'TITLE': ['Silence'], 'GENRE': ['Silence'], 'TRACKNUMBER': ['02/10'], 'DATE': ['2004']}

>>> song.length
239
>>> song.tags["ALBUM"] = ["White Album"] # always use lists, even for single values
>>> del song.tags["DATE"]
>>> song.tags["GENRE"] = ["Vocal", "Classical"]
>>> song.tags["PERFORMER:HARPSICHORD"] = ["Ton Koopman"] 
>>> song.save()

For detailed API documentation, use the docstrings of the taglib.File class or view the source code directly.

Note: pytaglib uses unicode strings (type str in Python 3 and unicode in Python 2) for both tag names and values. The library converts byte-strings to unicode strings on assignment, but it is recommended to provide unicode strings only to avoid encoding problems.

pyprinttags

This package also installs the pyprinttags script. It takes one or more files as command-line parameters and will display all known metadata of that files on the terminal. If unsupported tags (a.k.a. non-textual information) are found, they can optionally be removed from the file.

Installation Notes

  • Ensure that pip is installed and points to the correct Python version
    • on Windows, be sure to check install pip in the Python installer
    • on Debian/Ubuntu/Mint, install python3-pip (and/or python-pip)
    • you might need to type, e.g., pip-3 to install pytaglib for Python 3 if your system's default is Python 2.7.
  • For Windows users, there are some precompiled binary packages (wheels). See the PyPI page for a list of supported Python versions.
  • If no binary packages exists, you need to have both Python and taglib installed with development headers (packages python3-dev (or python-dev) and libtag1-dev for debian / ubuntu and derivates, python-devel and taglib-devel for fedora and friends, brew install taglib on OS X).

Linux: Distribution-Specific Packages

  • Debian- and Ubuntu-based linux flavors have binary packages for the Python 3 version, called python3-taglib. Unfortunatelly, they are heavily outdated, so you should instally the recent version via pip whenever possible.
  • For Arch users, there is a package in the user repository (AUR).

Manual Compilation: General

You can download or checkout the sources and compile manually:

    python setup.py build
    python setup.py test  # optional, run unit tests
    sudo python setup.py install

Note: The taglib Python extension is built from taglib.cpp which in turn is auto-generated by Cython from taglib.pyx. To regenerate the taglib.cpp after making changes to taglib.pyx, set the environment variable PYTAGLIB_CYTHONIZE to 1 before calling setup.py or pip.

Compilation: Windows

Install MS Visual Studio Build Tools (or the complete IE) and include the correct compiler version as detailed here. Also enable cmake in the Visual Studio Installer.

Then, open a powershell console in the pytaglib repository and run: windows\build.ps1. This will download and compile taglib and create a binary windows wheel in the dist folder.

Contact

For bug reports or feature requests, please use the issue tracker on GitHub. For anything else, contact me by email.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].