fix(converter): disable copy_art for Vorbis and OPUS to prevent FFmpeg muxer error#991
Closed
berettavexee wants to merge 2 commits into
Closed
fix(converter): disable copy_art for Vorbis and OPUS to prevent FFmpeg muxer error#991berettavexee wants to merge 2 commits into
berettavexee wants to merge 2 commits into
Conversation
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>
5 tasks
Author
|
Superseded by #992, which replaces the |
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.
Problem
Converting to OGG (Vorbis) or OPUS fails with a cryptic error when the source file contains a cover art video stream:
The root cause: when a FLAC or MP3 source has embedded artwork, FFmpeg includes a video stream. The
Converterbase class then adds-c:v copyto 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:
VorbisandOPUSdefinedcopy_art = Falseas class attributes, butConverter.__init__always overwrote them withself.copy_art = copy_art(defaultTrue), so the class attribute was silently ignored.Fix
Two changes:
VorbisandOPUS: addcopy_art = Falseclass attribute to opt out of artwork copying.Converter.__init__: changecopy_artparameter default fromTruetoOptional[bool] = None, and use the class attribute as the fallback when no value is passed explicitly:Test plan
rip -c ogg url <url>— no FFmpeg error,.oggfiles producedrip -c opus url <url>— no FFmpeg error,.opusfiles producedrip -c mp3 url <url>— unchanged behaviour (artwork still embedded)rip -c aac url <url>— unchanged behaviour (artwork still embedded)🤖 Generated with Claude Code