Jump to content

Display lyrics from UNSYNCEDLYRICS tag instead of vorbis LYRICS tag


Go to solution Solved by maxmp,

Recommended Posts

@Cyber Pixel thanks for the request. It's unsupported mostly due to the lack of any documentation/sample files/anything, so it's quite hard to know in advance that the tag exists in the wild. If I google it I find links to this forum mostly;-) From other google searches it's not clear how the tag looks exactly, so unfortunately I can't add it just based on the request.

If you have sample files, feel free to share it (e.g. via google drive, share with gpmaxmpz@gmail.com). Thanks!

Link to comment
Share on other sites

MP3Tag, TagScanner, and foobar2000 all seem to be able to handle either LYRICS or UNSYNCEDLYRICS within Vorbis/FLAC tags. foobar2000 prefers to use LYRICS if it finds both tags. If it finds [timecodes] within an UNSYNCEDLYRICS text, it treats the content as synced lyrics anyway, regardless of the name of the tag source.

Given the lax nature of any documentation, I'd suggest one possible fallback solution to cover most eventualities and encodings would be:

  • Look for both LYRICS and UNSYNCEDLYRICS tags in Vorbis. If both are found, prefer LYRICS.
  • Parse both types of tag identically, so plain text gets shown as a simple unsynced list, while finding any [timecode] lines or other ID fields should treat the content as being synced data regardless of which tag they are found in.

Andre

Link to comment
Share on other sites

@andrewilley thanks Andre, I found one flac with UNSYNCEDLYRICS so added it. Poweramp actually always tries to parse any lyrics text as LRC first, then fallbacks to plain text (as it seems there are tracks with LRC inside unsynced lyrics tags and with a plain text in the synced lyrics tags).

Link to comment
Share on other sites

Yes, lyric encoding does seem to have evolved in a very messy ad hoc way, making it hard to allow for all the vagaries out there in the wild - especially where there is timecoded content within tags that are meant to be unsynced.

As you say, the existence of a LRC file should definitely override any embedded tags anyway - otherwise why would the file be there in the first place? I was referring to a processing priority for any embedded tags when there is no LRC file. So maybe:

  1. LRC file (if available) as either synced or single text-block, depending on the formatting of the contents
  2. LYRICS tag, if it contains timecoded/synced content
  3. UNSYNCEDLYRICS tag if it happens to contain timecoded/synced content (which it shouldn't, but probably best to check)
  4. LYRICS tag, any plain content as a text-block *
  5. UNSYNCEDLYRICS tag, any plain content as a text-block *
  6. API-sourced lyrics if some suitable third-party app responds and provides suitable content
  7. Offer the 'Open Lyrics App' button for external search and display

* possibly reverse the priority order for items 4 and 5?

Andre

Link to comment
Share on other sites

Yes, for ID3 tags mostly lyrics seem to be inserted into SYLT regardless of whether they are synced or not. There seems little thought given over to using USLT tags for its intended plain text, or the TXXX commented version - but I'd say they should all fall into the same priority order as above if more than one ID3 tag is populated (with TXXX coming right at the end of the priority order). Have you seen any MP3s in the wild with all three populated?

Andre 

Link to comment
Share on other sites

Thanks for showing interest in this topic!

I've got a few things to mention. Firstly, in my line of music listening, I mostly get my .flac files from Bandcamp. Commonly, the .flac files from Bandcamp usually tend to have lyrics as plain text in the UNSYNCEDLYRICS field as seen using Mp3tag. This can be seen by:

  1. Opening the .flac file in Mp3tag
  2. Selecting the file
  3. Clicking on the 'Extended Tags' option on the top menu bar
  4. Selecting the UNSYNCEDLYRICS tag
  5. Clicking on the 'Edit Field' button to the right

Upon viewing the contents of the tag, it is most commonly found to have plain text as its field value. It seems to render accurately in Notepad with UTF-8 along with line breaks. (See screenshot)

image.thumb.png.ed025ba4ccdc88e8492b167555c28cd1.png

Second thing is that if I want Poweramp to actually display the lyrics as plain text for the .flac file, I have to:

  1. Create a new extended tag called LYRICS
  2. Copy the exact same plain text lyrics that was in the UNSYNCEDLYRICS tag
  3. Paste it as the plain-text value for the LYRICS tag

This seems to work fine in Poweramp and render the lyrics correctly (not synced ofcourse)

One other oddity that I have sometimes (rarely) observed for the UNSYNCEDLYRICS tag is that there might be a "eng|" language marker before the lyrics. When copying the tag contents to the LYRICS tag for a file that has this language marker, Poweramp interprets that as part of the lyrics, and doesn't hide it. It gets rendered in like any normal text.

For reference, I have attached two .flac files that have been downloaded from Bandcamp (Google Drive Upload, note that it is not embeded, please replace (dot) with ' . ').

[drive(dot)google.com/drive/folders/1vSsm49DDPSemdTkK9jmDN41T8ym_UOSS?usp=sharing]

 

So what is the final story?

(Hopefully) this should be relatively easy to implement, as this tag only contains plain text. As suggested by @andrewilley that order seems to be the best choice (and possible with reversing 4 and 5 order).

I hope this feature is added soon and I can't wait to use the new lyrics feature with most of my files after the update :P (seriously, I've got over 600 flac files that have lyrics in the UNSYNCEDLYRICS tag just begging to be viewed XD)

Cheers!

Link to comment
Share on other sites

2 hours ago, Cyber Pixel said:

One other oddity that I have sometimes (rarely) observed for the UNSYNCEDLYRICS tag is that there might be a "eng|" language marker before the lyrics. 

So what is the final story?

1) That would mean the content was originally created for MP3/ID3 use, and presumably sloppily copied over. The spec - what little there is of it! - states that ID3 lyric tags (e.g. USLT) should commence with a three-character language identifier code followed by two bar characters - so in the format "xxx||Actual lyric words go here...".   Max: to cover cases of poorly-generated content like this in the wild, it might be a good idea to check for "???||" at the start of any lyric tag and ignore it, to handle any cases where the ID3 language prefix has been incorrectly included in a Vorbis tag.

2) Reading the Vorbis UNSYNCEDLYRICS tag should be supported in a future release of PA, so don't go editing all your FLAC files just yet! :)

Andre

Link to comment
Share on other sites

Not to say it's neat, or even defend its sloppiness, well maybe I am..

Bandcamp does have to make due with a "one size fits most" attitude for its tags across all the formats :P

Screenshot_20230314-060852.thumb.png.6f3485ae824abd2513f5c5733482d337.png

 

If there's no convenient way to batch process lyric text bouncing between tags in mp3tag, I'll be relieved to know Poweramp will support these in the near future!

Edited by Fitzian
Link to comment
Share on other sites

Ideally, master copies of lyrics would not have an "xxx||" prefix at all, that would be inserted as part of the technical process of building the content of an MP3 file. Not sure whether Bandcamp builds each downloadable version on-the-fly from a master lossless file, or if separate versions in each format are manually uploaded in advance.

Regardless, I know Max wants to support as many variants found in the wild as he can, and not displaying false "eng||" strings should be easy enough. We love giving him more work to do don't we? :)

Andre

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...