Skip to content

Keep the album art when converting audio to Opus, Ogg Vorbis and MKA (1.5.2) - #35

Merged
KnifeLemon merged 2 commits into
mainfrom
fix/opus-cover
Oct 4, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
fix/opus-cover

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

What

Reported on Reddit for 1.5.1: converting audio to .opus dropped the album art (the reporter used opustags to put it back).

  • FFmpeg's Ogg muxer rejects picture streams ("Unsupported codec id"), so Opus and Ogg targets never got the cover. 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 (title, artist, album).
  • Matroska audio (MKA) stored a copied cover as a one-frame video track; it now gets a cover.jpg/cover.png attachment, which players read as album art.
  • If preparing the cover fails, the file is converted without it, as before.
  • Version 1.5.2, CHANGELOG section.

Tests

Cover_art_and_tags_are_kept now covers FLAC, M4A, Opus, Ogg and MKA with the real FFmpeg (cover and title kept). New CoverArtTests for the picture block layout, ffmetadata escaping and JPEG/PNG detection. Checked end to end with filee convert song.mp3 --to opus: the cover extracted from the Opus file is byte-identical to the source's.

🤖 Generated with Claude Code

KnifeLemon and others added 2 commits October 4, 2026 22:04
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>
@KnifeLemon KnifeLemon added the bug Something isn't working label Oct 4, 2026
@KnifeLemon
KnifeLemon merged commit 2c1cdac into main Oct 4, 2026
1 check passed
@KnifeLemon
KnifeLemon deleted the fix/opus-cover branch October 4, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant