Questions tagged [eyed3]

eyeD3 is a Python tool for working with audio files, specifically mp3 files containing ID3 metadata (i.e. song info).

It provides a command-line tool (eyeD3) and a Python library (import eyed3) that can be used to write your own applications or plugins that are callable from the command-line tool.

For example, to set some song information in an mp3 file called song.mp3:

$ eyeD3 -a Nobunny -A "Love Visions" -t "I Am a Girlfriend" -n 4 song.mp3

With this command we’ve set the artist (-a/--artist), album (-A/--album), title (-t/--title), and track number (-n/--track-num) properties in the ID3 tag of the file.
This is the standard interface that eyeD3 has always had in the past, therefore it is also the default plugin when no other is specified.

The results of this command can be seen by running the eyeD3 with no options.

$ eyeD3 song.mp3
song.mp3      [ 3.06 MB ]
-------------------------------------------------------------------------
ID3 v2.4:
title: I Am a Girlfriend
artist: Nobunny
album: Love Visions
track: 4
-------------------------------------------------------------------------

The same can be accomplished using Python.

import eyed3

audiofile = eyed3.load("song.mp3")
audiofile.tag.artist = u"Nobunny"
audiofile.tag.album = u"Love Visions"
audiofile.tag.title = u"I Am a Girlfriend"
audiofile.tag.track_num = 4

audiofile.tag.save()

eyeD3 is written and maintained by Travis Shirk and is licensed under version 2 of the GPL.

Features

  • Python package for writing application and/or plugins.
  • Command-line tool driver script that supports plugins. viewer/editor interface.
  • Easy editing/viewing of audio metadata from the command-line, using the ‘classic’ plugin.
  • Support for ID3 versions 1.x, 2.2 (read-only), 2.3, and 2.4.
  • Support for the MP3 audio format exposing details such as play time, bit rate, sampling frequency, etc.
  • Abstract design allowing future support for different audio formats and metadata containers.
88 questions
3
votes
5 answers

How to get detail (Title,Artist) from .mp3 files in python using eyed3

Here is my code import eyed3 audiofile = eyed3.load("19 Calvin Harris - Summer.mp3") print(audiofile.tag.artist) This is an error Traceback (most recent call last): File "C:\Python34\testmp3.py", line 5, in
3
votes
3 answers

what's the difference between eyed3 and eyeD3, and how can i edit mp3 tags with python

I'm trying to update my mp3 tags through python. I've downloaded eyed3, but i can only import eyed3 and not eyeD3. I saw some options for code with eyeD3 that do what i need. for example something like: tag =…
Shahar
  • 31
  • 3
3
votes
2 answers

get mp3 play time using eye3d with python

I'm having a hard time returning the play time of an mp3 using the eye3d python module...I can retrieve tag information, etc, with the following: import eyed3 def getInfo(): srcPath = r'C:\aaa' os.chdir(srcPath) #change working directory …
user1526973
  • 45
  • 1
  • 5
3
votes
1 answer

Renaming ID3 tag in Bash script with eyeD3

I have the following script that finds any file with the .mp3 extension in the incoming directory and moves it to the complete directory - it works perfectly! #!/bin/bash find /usr/audio/incoming -name '*.mp3' -exec mv {} /usr/audio/complete…
Grant
  • 1,297
  • 2
  • 16
  • 39
3
votes
1 answer

How to decode cp1252 string?

I am getting an mp3 tag (ID V1) with eyeD3 and would like to understand its encoding. Here is what I try: >>> print(type(mp3artist_v1)) >>> print(type(mp3artist_v1.encode('utf-8'))) >>>…
LA_
  • 19,823
  • 58
  • 172
  • 308
2
votes
0 answers

How to solve AttributeError: 'NoneType' object has no attribute 'tag'

I'm using the eyed3 and this is a part of my long code: if new_file.exists(): print(f'{data[i][0]} has been\033[1;32;40m successfully downloaded.\033[m ') mySong = eyed3.core.load(new_file) print(new_file) …
Melabr
  • 21
  • 3
2
votes
0 answers

'NoneType' object has no attribute 'initTag' : how can I solve this?

I had an error:'NoneType' object has no attribute 'tag' so I found it can be solved with running initTag. but as I ran initTag, I got an error : 'NoneType' object has no attribute 'initTag'. and there was no tag in the MP3 files. Below are the code…
in_zet
  • 21
  • 1
2
votes
2 answers

AttributeError: 'NoneType' object has no attribute 'tag' (using eyed3)

I want to create a list of dictionaries with the keys: Title, Album, and Artist. I get the error: AttributeError: 'NoneType' object has no attribute 'tag' line 17: song_title = mediafile.tag.title, Here is my code: import glob import…
Younes Gouyd
  • 23
  • 1
  • 6
2
votes
3 answers

Finding the eyeD3 executable

I just installed the abcde CD utility but it's complaining that it can't find eyeD3, the Python ID3 program. This appears to be a well-known and unresolved deficiency in the abcde dependencies, and I'm not a Python programmer, so I'm clueless. I…
Peter Flynn
  • 235
  • 2
  • 10
2
votes
1 answer

How to access the release date or year from an mp3 file with eyed3 and python2.7

I'm trying to access some mp3 tags like the release year from the mp3 file's album, which is stored in the id3v2 tags under TYER. I found out that attributes like track_num are located in class eyed3.core.Tag Then the python command looks like…
delaflota
  • 159
  • 1
  • 3
  • 12
2
votes
1 answer

Tagging mp3 files in python 2.7 using eyeD3

I am trying go create a taste profile for a directory of mp3 files using python 2.7 script, but it seems there's something wrong with my eyed3 module. first I had to import it with 'd' instead of 'D' import eyed3 then I had to change deprecated…
8-Bit Borges
  • 9,643
  • 29
  • 101
  • 198
2
votes
1 answer

I can't install eyeD3 0.7.5 into Python in windows

could you help me with that. I can't manage to install this plugin. I tried: 1) install it through pip 2) through setup.py in win console 3) through anaconda3 but still no. 4) I searched about it in web and here, but insructions are made to older…
rocendroll
  • 51
  • 5
2
votes
1 answer

How to use line breaks in eyeD3

Recently I started experimenting with eyeD3 to manage my large collection of MP3's. Using the commandline on Linux ('BASH') I want to add comments to MP3's according to this structure: Line 1 Line 2 Line 3 So I need to insert a line break. I tried…
wie5Ooma
  • 281
  • 1
  • 4
  • 15
2
votes
1 answer

Installing eyed3 in windows

trying to install eyed3 under python 2.7.5 I have done a google search and have been following what I found to install eyed3. The instructions were as follows extract the zip file to a temp folder (filename eyeD3-0.7.3.zip) I did using a temp…
Don Thomson
  • 21
  • 1
  • 2
2
votes
1 answer

Importing certain modules suppresses Flask console output

I'm writing an application in Flask, that consists of two files, app.py and tags.py. app.py imports tags.py, which in turn contains from eyed3 import load. Eyed3 is a Python module to extract mp3 tags from files. For some reason import of Eyed3…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166