Skip to content

Keep lyrics when converting music (#2077) - #2083

Draft
cre8ive-marketing wants to merge 1 commit into
KnifeLemon:mainfrom
cre8ive-marketing:feature/2077-keep-lyrics
Draft

cre8ive-marketing wants to merge 1 commit into
KnifeLemon:mainfrom
cre8ive-marketing:feature/2077-keep-lyrics

Conversation

@cre8ive-marketing

@cre8ive-marketing cre8ive-marketing commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2077.

Filee's FFmpeg (9.0.2) already copies the source's tags, lyrics included, but players don't see them in some outputs:

  • MP3: FFmpeg writes the lyrics tag as a TXXX frame named "USLT", not a real USLT frame, so players, Windows and phones show nothing. New Id3Lyrics.ToUslt runs after the encode and turns that frame into a real USLT frame (language XXX, empty description) in the ID3v2.3 tag FFmpeg writes. Only the tag is rewritten; the audio is copied as it is. It touches only plain v2.3 tags (no unsynchronisation or extended header) and leaves the file alone otherwise. An I/O error there is logged and the conversion still succeeds.
  • Other names: lyrics stored as UNSYNCEDLYRICS (foobar2000, MusicBee) or read from an MP3 (lyrics-eng) are written as lyrics, so M4A (©lyr) and FLAC/Ogg/Opus (LYRICS) carry them too. MediaInfo now reads the lyrics tag from the probe.
  • Shortcut: lyrics longer than 16,000 characters keep their original name, to stay clear of the command-line length limit. An ffmetadata input file would lift that if it is ever needed.
  • Not done: synced lyrics (SYLT), as FFmpeg doesn't read them. Timed LRC text inside a LYRICS tag is kept as it is. No new setting: lyrics follow the tags, so removing metadata removes them too.
  • Seen while testing, not fixed here: Ogg/Opus sources keep their tags on the stream, so -map_metadata 0 drops all of them (title too) when converting from Ogg/Opus. Separate issue.

Tests:

  • Id3LyricsTests: FFmpeg's frame becomes USLT, UTF-16 keeps its encoding, other tags are kept, other lyrics names are written as lyrics, the probe names the lyrics tag.
  • MediaTests.Lyrics_are_kept_where_players_read_them: FLAC with UNSYNCEDLYRICS → MP3 (real USLT, title kept) → M4A → FLAC, lyrics in each.
  • CHANGELOG line under 2.6.0 Fixes.

Full run here: Core 2037 pass; Engines 5297/5298; App 3669/3671. The 3 failures also fail on main on this machine: MediaTests.A_photo_becomes_a_still_video_in_full_colour (no decode delegate ... hald:8) and two SliceLabelLayoutTests that depend on the installed fonts.

Not checked here: playing the MP3 in a real player or on a phone.

MP3 gets a real USLT frame instead of FFmpeg's TXXX named USLT, and lyrics
under UNSYNCEDLYRICS or lyrics-xxx are written as lyrics so M4A, FLAC, Ogg
and Opus keep them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Preserve Embedded Lyrics During Audio Conversion

1 participant