KristoforMaynard / music-tag

Simple interface to edit audio file metadata
MIT License
125 stars 19 forks source link

How to embed lyrics? #33

Closed Mohammad9760 closed 2 years ago

Mohammad9760 commented 2 years ago

I tried f['lyrics'] = str(lyrics) and f.append_tag('lyrics', str(lyrics)) and also tried

f.['lyrics'].value = str(lyrics)

which produced an error

KristoforMaynard commented 2 years ago

What was the error?

On Tue, Nov 1, 2022 at 15:20 Mohammad9760 @.***> wrote:

I tried f['lyrics'] = str(lyrics) and f.append_tag('lyrics', str(lyrics)) and also tried

f.['lyrics'].value = str(lyrics)

which produced an error

— Reply to this email directly, view it on GitHub https://github.com/KristoforMaynard/music-tag/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJGXACYBT3U22RT2MXF5N3WGFURNANCNFSM6AAAAAARULRW3E . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- "I think nature's imagination is so much greater than man's. She's never going to let us relax." -- Richard Feynman

Mohammad9760 commented 2 years ago

@KristoforMaynard hi kristofor thanks for replying! the first two doesnt produce errors but also don't add embeded lyrics to the file. and trying to set value causes this.

f.['lyrics'].value = str(lyrics) AttributeError: can't set attribute

KristoforMaynard commented 2 years ago

I see. What file format? Do you have an example as a script?

Mohammad9760 commented 2 years ago

@KristoforMaynard hey! it's an mp3 file but it's not converted with encoding and been renamed from mp4 to mp3 like such:

new_file = base + '.mp3' os.rename(downloaded_file, new_file)

I couldn't see the embeded lyrics on my phones' music player but I could see it in PotPlayer so I'm guessing it's due to bad file formation and encoding. I will test with better files and Ill close this issue if it resolves. btw thank you! this library is very easy to work with I've starred this repo.

Mohammad9760 commented 2 years ago

if the mp3 file is converted properly it does attach the lyrics to the file and it will show on any player.