Set Lyrics in MP3 ID3v2 Tag

北城余情 提交于 2019-12-04 09:56:06

Looking at the official ID3 specification at http://id3.org/id3v2.4.0-frames:

Header for 'Unsynchronised lyrics/text transcription', ID: "USLT":
    Text encoding        $xx
    Language             $xx xx xx
    Content descriptor   (text string according to encoding) $00 (00)
    Lyrics/text          (full text string according to encoding)

So, the USLT frame is not just a text frame, which is how you're trying to parse it. By comparison, a text frame looks like this:

Header for 'Text information frame', ID: "T000" - "TZZZ" excluding "TXXX":
    Text encoding                $xx
    Information                  (text string(s) according to encoding)

Note the extra fields in the USLT frame. You'll need a custom frame class (say, ID3v2LyricsFrameData).

The USLT frame is however very similar to a comment frame (COMM), so you can probably re-use some of this code. Perhaps create a superclass that ID3v2CommentFrameData and ID3v2LyricsFrameData both extend.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!