Skip to content

fix: conditionally apply aac_adtstoasc bitstream filter in remux - #153

Open
atoy3731 wants to merge 1 commit into
technomancer702:mainfrom
atoy3731:fix/remux-aac-adtstoasc
Open

atoy3731 wants to merge 1 commit into
technomancer702:mainfrom
atoy3731:fix/remux-aac-adtstoasc

Conversation

@atoy3731

Copy link
Copy Markdown

Remux was hardcoded to skip -bsf:a aac_adtstoasc to avoid breaking AC3/EAC3/MP3 audio, but that meant AAC audio from MPEG-TS sources always failed to remux ("Malformed AAC bitstream detected"). Probe results (info.audio) were already available at every call site but never passed through to the remux endpoint.

Thread audioCodec through all four remux call sites (auto-remux and force-remux paths in both WatchPage.js and VideoPlayer.js, adding a probe call to the two force-remux paths that previously had none) and apply the filter server-side only when audioCodec is aac. Also removes a harmless duplicate -user_agent flag in remux.js.

Closes #152

Remux was hardcoded to skip -bsf:a aac_adtstoasc to avoid breaking
AC3/EAC3/MP3 audio, but that meant AAC audio from MPEG-TS sources
always failed to remux ("Malformed AAC bitstream detected"). Probe
results (info.audio) were already available at every call site but
never passed through to the remux endpoint.

Thread audioCodec through all four remux call sites (auto-remux and
force-remux paths in both WatchPage.js and VideoPlayer.js, adding a
probe call to the two force-remux paths that previously had none) and
apply the filter server-side only when audioCodec is aac. Also removes
a harmless duplicate -user_agent flag in remux.js.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SJvfjjDJQW4zPWvjHu8JGn
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.

[BUG] Remux fails for AAC audio from MPEG-TS sources ("Malformed AAC bitstream detected")

1 participant