Repository navigation
Keep lyrics when converting music (#2077) - #2083
Draft
cre8ive-marketing wants to merge 1 commit into
Draft
cre8ive-marketing wants to merge 1 commit into
cre8ive-marketing wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
lyricstag as aTXXXframe named "USLT", not a realUSLTframe, so players, Windows and phones show nothing. NewId3Lyrics.ToUsltruns after the encode and turns that frame into a realUSLTframe (languageXXX, 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.UNSYNCEDLYRICS(foobar2000, MusicBee) or read from an MP3 (lyrics-eng) are written aslyrics, so M4A (©lyr) and FLAC/Ogg/Opus (LYRICS) carry them too.MediaInfonow reads the lyrics tag from the probe.SYLT), as FFmpeg doesn't read them. Timed LRC text inside aLYRICStag is kept as it is. No new setting: lyrics follow the tags, so removing metadata removes them too.-map_metadata 0drops 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 aslyrics, the probe names the lyrics tag.MediaTests.Lyrics_are_kept_where_players_read_them: FLAC withUNSYNCEDLYRICS→ MP3 (real USLT, title kept) → M4A → FLAC, lyrics in each.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 twoSliceLabelLayoutTeststhat depend on the installed fonts.Not checked here: playing the MP3 in a real player or on a phone.