Skip to content

feat: adts aac file format for crash-recoverable compressed recordings - #1333

Open
mdydek wants to merge 10 commits into
mainfrom
feat/adts-codec-support
Open

mdydek wants to merge 10 commits into
mainfrom
feat/adts-codec-support

Conversation

@mdydek

@mdydek mdydek commented Oct 6, 2026

Copy link
Copy Markdown
Member

Original idea from #1319 reimplemented after #1183 merged. Confirmed that the recording retrieved after killing app is fully decodable.

⚠️ Breaking changes ⚠️

Introduced changes

  • added new format ADTS AAC, which can survive app crash, because its metadata is written at every frame
  • support for ios (was already supported, only header config was required) and android

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

@mdydek
mdydek marked this pull request as draft October 6, 2026 17:21
@mdydek mdydek changed the title feat:adts aac file format for crash-recoverable compressed recordings feat: adts aac file format for crash-recoverable compressed recordings Oct 6, 2026
@mdydek mdydek added the feature New user-facing features or major capabilities label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

WPT non-regression comparison

PASS — no regressions · 1 improved section(s) · overall 3427 → 3429 (+2)

Spec section Base pass Head pass Delta
AudioBuffer 140 142 +2
Unchanged sections (27)
Spec section Base pass Head pass Delta
Processing model 1 1 0
Other 56 56 0
AnalyserNode 138 138 0
AudioBufferSourceNode 220 220 0
AudioContext 58 58 0
AudioNode 261 261 0
AudioParam 680 680 0
BiquadFilterNode 275 275 0
ChannelMergerNode 30 30 0
ChannelSplitterNode 7 7 0
ConstantSourceNode 64 64 0
ConvolverNode 178 178 0
DelayNode 127 127 0
DestinationNode 0 0 0
DynamicsCompressorNode 4 4 0
GainNode 15 15 0
IIRFilterNode 87 87 0
MediaElementAudioSourceNode 0 0 0
MediaStreamAudioDestinationNode 1 1 0
MediaStreamAudioSourceNode 0 0 0
OfflineAudioContext 35 35 0
OscillatorNode 104 104 0
PannerNode 727 727 0
PeriodicWave 33 33 0
ScriptProcessorNode 0 0 0
StereoPannerNode 104 104 0
WaveShaperNode 82 82 0

Baseline: e39c1826e187a100d8d7ee6855e2a92ab32e8c32 · Candidate: 64cc1d6d72a0b8697e8e3ed2c8e032697c0a55cd

Workflow run · this comment is updated on every push.

@mdydek
mdydek marked this pull request as ready for review October 8, 2026 13:10
@github-actions github-actions Bot added the conflicts This PR has conflicts with the base branch. label Oct 20, 2026
@closetcaiman
closetcaiman self-requested a review October 20, 2026 15:00
Comment thread packages/audiodocs/docs/inputs/audio-recorder.mdx
Comment thread packages/audiodocs/docs/inputs/audio-recorder.mdx Outdated
@github-actions github-actions Bot removed the conflicts This PR has conflicts with the base branch. label Oct 21, 2026
@mdydek
mdydek requested a review from closetcaiman October 23, 2026 08:36
@ryzencool

Copy link
Copy Markdown

+1 for this, and thanks for picking it up after #1183.

Our use case: a voice-notes app where users record long sessions (meetings, sometimes 1h+), often with the app in the background. Today we work around the lack of a crash-safe compressed format by writing two outputs per recording with another library: a 16 kHz PCM WAV (so a force-kill/OOM still leaves something recoverable) plus a compressed AAC/Opus copy for upload. That doubles disk I/O and storage during the session, and an unfinalized M4A is lost entirely if the process dies.

ADTS AAC would let us collapse that into a single small, recoverable file, which is the main thing blocking us from migrating our recorder to react-native-audio-api.

A couple of questions, if you have a moment:

Happy to test a nightly build on real iOS/Android devices (background recording + kill-and-recover) and report back.

@mdydek

mdydek commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

@ryzencool yes to both of your questions, the next release actually will be the major (1.0.0) and it's just around the corner, we are finishing what's left, but it will for sure come in a next release

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New user-facing features or major capabilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants