mp3 - ID3 tag editing in programming language -
i've been trying write program edits id3 tags of songs of given artist, given folder structure "musicfolder\artist\year album\## song.mp3". edit tags title, artist, album artist, album, year , track (song number), while keeping genre value. i've tried far in python none of id3 plugins have worked out. i've described problem had when using mutagen here: some mutagen tags don't work .
so, need plugin in language (and tell me version of both!) can things above, , appreciate example of how set value of said tags, (if necessary) required measures make sure genre tag untouched. know python , java, if provided language not 1 of appreciate if me converting pseudocode provided below (or of same effect) actual code.
import id3plugin artist = next_input() path = "e:\musik\" + artist folder in folder_list(path): # folders strings path2 = path + "\" + folder year = int(folder.substring(0,4)) # characters 0,1,2,3 of folder name album = folder.substring(5,end)) # character 4 space file in file_list(path2): if file.substring(end-4,end) == ".mp3": continue # skip next item in list path3 = path2 + "\" + file tracknumber = int(file.substring(0,2)) songtitle = file.substring(3, end-4) # if previous tags cleared when editing, save genre here... id3plugin.set_title(path3, title) id3plugin.set_artist(path3, artist) id3plugin.set_albumartist(path3, artist) id3plugin.set_album(path3, album) id3plugin.set_year(path3, year) id3plugin.set_track(path3, tracknumber) # ... , set genre here
i have used jaudiotagger in java players.
jaudiotagger audio tagging library used jaikoz tagging data in audio files. supports mp3, mp4 (mp4 audio, m4a , m4p audio) ogg vorbis, flac , wma, there limited support wav , real formats.
- supports mp3 id3v1,id3v11, id3v2.2, v2.3 , v2.4 transparently
Comments
Post a Comment