Skip to content

fix(converter): fall back to native aac encoder when libfdk_aac unavailable#990

Open
berettavexee wants to merge 1 commit into
nathom:devfrom
berettavexee:fix/converter-aac-fallback
Open

fix(converter): fall back to native aac encoder when libfdk_aac unavailable#990
berettavexee wants to merge 1 commit into
nathom:devfrom
berettavexee:fix/converter-aac-fallback

Conversation

@berettavexee

@berettavexee berettavexee commented Jun 14, 2026

Copy link
Copy Markdown

Problem

libfdk_aac is not included in most standard FFmpeg builds (Ubuntu, Debian, Homebrew without --with-fdk-aac…). When a user runs rip -c aac, the conversion silently fails because FFmpeg exits with an error when it can't find the encoder — and with -loglevel panic the output is suppressed, making the error opaque.

Fix

Detect libfdk_aac availability once at module import time using ffmpeg -encoders. If unavailable, fall back to the built-in native aac encoder which ships with every standard FFmpeg build.

Test plan

  • System with libfdk_aac: AAC.codec_lib == "libfdk_aac" (unchanged behaviour)
  • System without libfdk_aac (most users): AAC.codec_lib == "aac", conversion succeeds
  • rip -c aac url <url> produces .m4a files without errors

🤖 Generated with Claude Code

…ilable

libfdk_aac is not included in most standard FFmpeg builds. Detect
availability once at import time and use the built-in aac encoder
as fallback.

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

Copy link
Copy Markdown
Author

I forgot to include a info message when it fall back on the FFMPEG AAC lib. This might be of interest to someone, although, to be honest, the difference in encoding quality at 256 kbps is negligible.

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