Repository navigation
Keep the album art when converting audio to Opus, Ogg Vorbis and MKA (1.5.2) - #35
Merged
Merged
Conversation
FFmpeg's Ogg muxer rejects picture streams, so covers were dropped for Opus and Ogg (reported on Reddit for 1.5.1; the reporter used opustags to put them back). The cover is now extracted and written as a METADATA_BLOCK_PICTURE comment (a base64 FLAC picture block) through an ffmetadata file that also carries the source's tags. Matroska audio gets the cover as a cover.jpg/cover.png attachment. If preparing the cover fails, the file is converted without it as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Reported on Reddit for 1.5.1: converting audio to .opus dropped the album art (the reporter used opustags to put it back).
METADATA_BLOCK_PICTUREcomment (a base64 FLAC picture block) through an ffmetadata file that also carries the source's tags (title, artist, album).cover.jpg/cover.pngattachment, which players read as album art.Tests
Cover_art_and_tags_are_keptnow covers FLAC, M4A, Opus, Ogg and MKA with the real FFmpeg (cover and title kept). NewCoverArtTestsfor the picture block layout, ffmetadata escaping and JPEG/PNG detection. Checked end to end withfilee convert song.mp3 --to opus: the cover extracted from the Opus file is byte-identical to the source's.🤖 Generated with Claude Code