Currently am trying to read and write mp3 tags without using any external modules like(eyed3).
I have successfully read the audio tags of a mp3 file using the following code:
f = open(filepath,"rb")
f.seek(-128,2)
TagContent = f.read(128)
f.close()
title = TagContent[3:33] # currently only id3v1 tags
Now I want to edit the audio tags like artistname,title,album etc of a mp3 file. Now the problem am facing is how to write data to a mp3 file that too at a specific position.
f = open(filepath,"wb")
f.write(**what should come here**)
Is this possible using only python or I have to use an external module to write content to a mp3 file.
In the above statement external module refers to modules like pymedia or GST-Python(I don’t even know whether these are the right modules for this task) not audio tagging modules like eyed3.
PS: This is just part of a learning process.
Use seek for select position and write, to write text from this position. Don’t forget close file 🙂