Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:57:09+00:00 2026-06-17T18:57:09+00:00

I want to write lyrics to an mp3 in an Android application.I have found

  • 0

I want to write lyrics to an mp3 in an Android application.I have found a java library for reading mp3 files and reading/manipulating the ID3 tags (ID3v1 and ID3v2.2 through ID3v2.4), named mp3agic.

I modified mp3agic to write the lyric tag of the ID3v2 tag, writing the tag: USLT. Found in Wikipedia

In a sample Android app I modify the artist, album, title, genre, lyrics, and comment of an MP3. All tags are modified correct except for the lyrics. PowerAMP is used to verify the modified MP3 file and PowerAMP cannot find the lyrics in the MP3.

If anyone is familiar with this library here is my modified code from AbstractID3v2Tag.java:

//define lyric tag for id3v2
public static final String ID_TEXT_LYRICS = "USLT";

//get the lyrics from the tag
public String getLyrics() {
    ID3v2TextFrameData frameData;
    if (obseleteFormat) return null;
    else frameData = extractTextFrameData(ID_TEXT_LYRICS);
    if (frameData != null && frameData.getText() != null) 
        return frameData.getText().toString();
    return null;
}

//set the lyrics in the tag
public void setLyrics(String lyrics) {
    if (lyrics != null && lyrics.length() > 0) {
        invalidateDataLength();
        ID3v2TextFrameData frameData = new ID3v2TextFrameData(useFrameUnsynchronisation(), new EncodedText(lyrics));
        addFrame(createFrame(ID_TEXT_LYRICS, frameData.toBytes()), true);
    }
}

I set the lyrics on an MP3 with a program in Windows and read the USLT tag with my app and getLyrics() returned the string eng. PowerAMP did find these lyrics set by the Windows program.

I have searched and found many posts pointing to MP3 ID3 tag modifier library’s, that’s where I found mp3agic. Which is the only library I could easily modify to incorporate changing of lyrics.

One library I found was MyID3_for_Android which did not have a method to modify lyrics.

I am looking for guidance on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:57:11+00:00Added an answer on June 17, 2026 at 6:57 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 editText objecst in my android application. I want write to such
Hello I want write my own desktop sharing application in Java. The application should
I want write a ruby wrapper for a existing C library (.so files). Can
I have a ASP.NET Application and a MySQL Database. I want write a Class
suppose we have two numbers i want write program which print common bits subsequent
i have a table in database , and i want write query code to
I want write custom TreeCellRenderer to have Root, nodes and leafs in different color.
I have whole page HTML in my database and i want write that html
I have sql select for which I want write criteria. I was googling some
I have not found it anywhere so I am asking. How can I write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.