Giter Club home page Giter Club logo

idntag's Introduction

Idntag

Linux Mac
Linux macOS

Idntag is a command-line tool that identifies artist and song name in specified audio files and updates their ID3-tag meta-data with correct data, and renames the files on format Artist_Name-Track_Name.

Warning: This tool modifies and renames its input files. The quality of song identification is not perfect and may have some false detections. It is therefore recommended to first make a copy of the files to be identified, so there is a backup in case the results are not good.

Example Usage

$ idntag tests/song.mp3 
tests/song.mp3 : OK : tests/Broke_For_Free-Night_Owl.mp3
$ ls tests/
Broke_For_Free-Night_Owl.mp3
$ ffprobe tests/Broke_For_Free-Night_Owl.mp3 2>&1 | grep -e artist -e title
artist          : Broke For Free
title           : Night Owl

Supported Platforms

Idntag is developed and tested on Linux and macOS.

Installation

Pre-requisites Ubuntu:

sudo apt install git cmake mp3info python3-pip libtag1-dev libchromaprint-dev libchromaprint-tools ubuntu-restricted-extras ffmpeg

Pre-requisites Debian (incl. Debian-based like Raspbian):

sudo apt install git cmake mp3info python3-pip libtag1-dev libchromaprint-dev libchromaprint-tools ffmpeg

Pre-requisites Python:

pip3 install pyacoustid pytaglib

Download the source code:

git clone https://github.com/d99kris/idntag && cd idntag

Generate Makefile and build:

mkdir -p build && cd build && cmake .. && make -s

Optionally run tests:

ctest --output-on-failure

Optionally install in system:

sudo make install

Installation - Third-Party Packages

Disclaimer: The following packages are not maintained nor reviewed by the author of idntag.

Fedora

Idntag

Usage

General usage syntax:

idntag [-k] [-l] path [path ...]
idntag -h
idntag -v

Options:

path            path of a file or directory
-h, --help      show this help message and exit
-k, --keepname  keep original filename
-l, --uselib    use chromaprint lib instead of tools
-v, --version   show program's version number and exit

License

Idntag is distributed under the MIT license. See LICENSE file.

Keywords

linux, macos, fingerprint, music, mp3, automatically tag.

idntag's People

Contributors

d99kris avatar monsieurh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

idntag's Issues

error with certain mp3-files

[cheese@localhost work]$ ffprobe 02\ Into\ the\ Void.mp3
ffprobe version 5.0.1 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-librtmp --enable-librubberband --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
[mp3 @ 0x562ae6ef1640] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '02 Into the Void.mp3':
Metadata:
title : Into the Void
artist : abc
album_artist : fehler
album : Between Heaven and Hell
disc : 01/01
comment : E2120D0F
track : 02/15
date : 1995
Duration: 00:06:14.18, start: 0.000000, bitrate: 193 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)
Metadata:
comment : Cover (front)

i modified an mp3-file (by altering artist and album_artist) and tried to "solve" that by issuing
idntag 02\ Into\ the\ Void.mp3
/tmp/c/work/02 Into the Void.mp3 : Traceback (most recent call last):
File "/usr/bin/idntag", line 94, in
main()
File "/usr/bin/idntag", line 90, in main
identify_and_update_file(path, args.keepname)
File "/usr/bin/idntag", line 53, in identify_and_update_file
song.save()
File "src/taglib.pyx", line 140, in taglib.File.save
AttributeError: 'NoneType' object has no attribute 'encode'

some other files worked great so far, but some files bail out with the given error.
if needed i can provide you with the mp3-file, but would prefer not to do this in publicity.

Dependencies

Hello. Some dependencies are missing in installation instructions.

I had to install python3-taglib python3-acoustid and libtag1-dev to succeed.

So I guess the line
sudo apt install python3-pip
should be
sudo apt install python3-pip python3-taglib python3-acoustid libtag1-dev

Also I had to sudo the pip3 install commands

Output new assigned name

It would be very useful to output the renamed file path.
I need to manipulate the new file after it has been rename and as it is I have no way to know its new name.

not working

After installing dependencies ( including the missing mp3info tool, as I've mentioned here #1 (comment) ) and successfully building idntag, it fails to fingerprint any file, including the 'tests/song.mp3' file included in the repo.

./idntag -k ../tests/song.mp3
idntag/build/../tests/song.mp3 : FAIL : fingerprint generation error

I'm testing this from Ubuntu 16.04.6

Dont save music :(

/home/stepan7/Музыка/AC DC - Back In Black.mp3 : Traceback (most recent call last): File "./idntag", line 94, in <module> main() File "./idntag", line 90, in main identify_and_update_file(path, args.keepname) File "./idntag", line 53, in identify_and_update_file song.save() File "src/taglib.pyx", line 140, in taglib.File.save AttributeError: 'NoneType' object has no attribute 'encode'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.