Skip to content

fix(converter): disable copy_art for Vorbis and OPUS to prevent FFmpeg muxer error#991

Closed
berettavexee wants to merge 2 commits into
nathom:devfrom
berettavexee:fix/converter-copy-art-ogg-opus
Closed

fix(converter): disable copy_art for Vorbis and OPUS to prevent FFmpeg muxer error#991
berettavexee wants to merge 2 commits into
nathom:devfrom
berettavexee:fix/converter-copy-art-ogg-opus

Conversation

@berettavexee

Copy link
Copy Markdown

Problem

Converting to OGG (Vorbis) or OPUS fails with a cryptic error when the source file contains a cover art video stream:

ERROR Error downloading track: FFmpeg output: (None, b'')

The root cause: when a FLAC or MP3 source has embedded artwork, FFmpeg includes a video stream. The Converter base class then adds -c:v copy to the FFmpeg command — but the OGG and Opus muxers do not support video streams, so FFmpeg exits with an error.

A secondary bug compounded this: Vorbis and OPUS defined copy_art = False as class attributes, but Converter.__init__ always overwrote them with self.copy_art = copy_art (default True), so the class attribute was silently ignored.

Fix

Two changes:

  1. Vorbis and OPUS: add copy_art = False class attribute to opt out of artwork copying.
  2. Converter.__init__: change copy_art parameter default from True to Optional[bool] = None, and use the class attribute as the fallback when no value is passed explicitly:
    self.copy_art = getattr(type(self), "copy_art", True) if copy_art is None else copy_art
    This lets subclasses opt out via a class attribute without being overridden by the constructor default.

Test plan

  • rip -c ogg url <url> — no FFmpeg error, .ogg files produced
  • rip -c opus url <url> — no FFmpeg error, .opus files produced
  • rip -c mp3 url <url> — unchanged behaviour (artwork still embedded)
  • rip -c aac url <url> — unchanged behaviour (artwork still embedded)

🤖 Generated with Claude Code

berettavexee and others added 2 commits June 14, 2026 21:26
OGG and OPUS muxers don't support -c:v copy when the source is a
FLAC or MP3 file, causing FFmpeg to fail silently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Converter.__init__ was unconditionally setting self.copy_art from the
parameter default (True), shadowing the class attribute. Changed the
parameter to Optional[bool]=None so subclasses can declare copy_art=False
as a class attribute and have it respected when no explicit value is
passed.

Also reinstalled the venv in proper editable mode (-e) to fix a stale
site-packages copy that was masking the AAC libfdk_aac fallback fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@berettavexee

Copy link
Copy Markdown
Author

Superseded by #992, which replaces the copy_art = False workaround with a proper fix: -vn to discard video in the FFmpeg command, and mutagen post-conversion embedding via METADATA_BLOCK_PICTURE.

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.

1 participant