I have been creating an MP3 tag editor with Python 3.7 and Mutagen on a Windows 10 PC. I would like to write to the URL frame WFED but it does not respond. I have been able to successfully update another URL frame, WXXX using the code below.
The code below works for WXXX
new_url = unicode("http://url.com").encode('raw_unicode_escape').decode("utf-8")
tags.add(WXXX(encoding=0, url=new_url))
The code below does not work on WFED
new_feed = unicode("http://url.com").encode('raw_unicode_escape').decode("utf-8")
tags.add(WFED(encoding=0, url=new_feed))
Can anyone provide any guidance on how I can write to WFED?
Not only is
WFEDnot a standard frame, but it doesn't even seem to have the standard format for aW...frame!WXXXframes have an encoding field butW...frames do not. In ID3, URLs are always encoded in ISO-8859-1 and thus don't need an encoding field. The reasonWXXXdoes have one is for its description field.But with
WFED, which I believe is an undocumented Apple iTunes extension, every MP3 file I have with this frame begins with a NULL byte, followed by the URL in ASCII (or ISO-8859-1), which makes me think Apple made theWFEDframe use aT...frame format rather than aW...frame format.I haven't tested with other ID3 reading/writing tools or libraries, but Exiftool does report every
WFEDas being blank because it follows the actual standard.So yes maybe the problem is that Mutagen doesn't support
WFEDor maybe it expects it to follow theW...standard format and your software the uses the frame expects it to be in the undocumented format. Check your file in a hex editor to see if Mutagen changes it.