Extracting native AAC and Opus audio without re-encoding
Separating dialogue, music stems, or lecture recordings with a browser video audio extractor avoids re-quantizing compressed audio samples twice. Inspecting container headers inside local memory lets you discard heavy video bitstreams and copy native audio packets directly into a clean audio file without uploading footage.
Demuxing standard and fragmented MP4 audio into M4A
According to the Library of Congress MPEG-4 File Format specification, ISO 14496-14 stores multiplexed track indexes inside moov atoms separately from raw media payloads inside mdat. When you open an MP4 or MOV clip, extractLosslessAudioFromIso scans every trak box for the soun media handler.
For mp4a AAC streams declaring objectTypeIndication 0x40 inside esds, the demuxer parses stsz, stco (32 bits), and co64 (64 bits) tables alongside fragmented moof and trun runs. It remuxes raw frames via mp4-muxer into a fast-start .m4a track while leaving video silencing workflows to Mute Video.
Copying unlaced WebM Opus blocks into audio-only WebM
When reading WebM or MKV files prefixed with EBML magic bytes (1A 45 DF A3), the worker inspects Tracks entries for audio type 2 carrying the A_OPUS codec ID. It captures sample rate, channel count, and CodecPrivate configuration before walking Cluster blocks.
Each unlaced SimpleBlock and BlockGroup packet copies bit-for-bit with monotonic microsecond timestamps into webm-muxer, building a standalone .webm audio file. Extracting only the Opus audio stream discards VP8, VP9, or AV1 video frames immediately without decoding or altering compressed packets.
When should you pick lossless stream copy over PCM WAV?
Pick lossless stream copy whenever your MP4, MOV, or unlaced WebM carries native AAC or Opus audio and you want identical fidelity at minimal file sizes. Switch to uncompressed 16 bits PCM WAV when importing sound into strict desktop DAWs, processing laced WebM files, or cleaning raw waveform samples.
Preserving original AAC frames for fast mobile playback
Under the Library of Congress MPEG-4 AAC format description, perceptual encoders discard masked frequencies once during original camera recording. Re-encoding AAC into another lossy format compounds quantization noise, whereas stream copying preserves every frame inside a lightweight .m4a wrapper ready for mobile sharing.
Stream-copied audio typically sheds 80% to 95% of source video bytes because video bitstreams dominate storage. Clicking Load sample MP4 video builds an offline 320x180 H.264 clip containing 48,000 Hz stereo AAC so you can verify lossless extraction before loading client files.
Decoding 16-bit PCM WAV for DAW editing and cleanup
Selecting Uncompressed PCM (.wav) serves as a reliable video to WAV converter by expanding compressed frames into planar buffers and writing 16 bits per sample RIFF WAVE inside everyday.worker.ts. Expect larger outputs around 10 MB per stereo minute at 44,100 Hz for uncompressed editing headroom.
Raw WAV tracks open in hardware samplers, transcription pipelines, and acoustic plugins without proprietary decoders. If a camera microphone picked up room fan rumble or electrical buzz during shooting, route that exported WAV through remove 50/60 Hz mains hum and static right away.
Extraction modes, stream compatibility, and output formats
Choosing between direct bitstream copying and browser PCM decoding depends on container structure, codec framing, and downstream software compatibility. Uncompressed exports follow the Library of Congress Broadcast WAVE specification while keeping original channel counts across mono and stereo recordings.
| Source container & codec | Extraction mode | Output format | Audio re-encoding | Typical file size impact |
|---|---|---|---|---|
MP4 / MOV (mp4a AAC) |
Lossless stream copy (.m4a / .webm) | .m4a (audio/mp4) |
None (bit-exact copy) | Drops 75% to 95% of source bytes |
Fragmented MP4 (moof/trun) |
Lossless stream copy (.m4a / .webm) | .m4a (audio/mp4) |
None (bit-exact copy) | Copies raw AAC chunks sequentially |
WebM (unlaced A_OPUS) |
Lossless stream copy (.m4a / .webm) | .webm (audio/webm) |
None (bit-exact copy) | Strips video clusters completely |
WebM (laced A_OPUS) |
Uncompressed PCM (.wav) | .wav (audio/wav) |
Decoded to 16 bits PCM | Larger uncompressed PCM output |
| MP4 / MOV / MKV (supported) | Uncompressed PCM (.wav) | .wav (audio/wav) |
Decoded via Web Audio API | Around 10 MB per minute at 48 kHz |
Checking the Detected audio streams panel confirms sample rate, kbps or VBR bitrate, and channel layout before clicking Extract audio. After extracting a long interview or webinar track to WAV, use chapter and silence-based track splitting to divide the recording into standalone segments.
Tip: Always test Lossless stream copy (.m4a / .webm) first on MP4 and MOV videos. It avoids extra decoding time, preserves original AAC framing, and keeps mobile file sizes compact.
Decoding audio tracks and handling edge cases locally
Local processing lets journalists, educators, and video editors extract dialogue and music tracks without uploading confidential raw footage to remote clouds. Understanding how browser decoders handle multi-frame blocks and exotic codecs helps avoid failed exports on unusual recordings.
Inspecting track bitrates, sample rates, and silent clips
Upon drop, videoInspect scans stsd, esds, dOps, and WebM Tracks headers inside a dedicated Web Worker to display every audio stream summary. Clips containing zero audio tracks display a clear notice immediately rather than generating an empty audio file.
When switching to Uncompressed PCM (.wav), the MDN BaseAudioContext decodeAudioData guide describes how browsers expand compressed audio frames into planar Float32Array channels inside client RAM. Those decoded arrays pass straight to the worker’s encodeWav serializer with zero network requests.
Troubleshooting laced WebM audio and unsupported codecs
Certain WebM muxers pack multiple Opus frames inside a single SimpleBlock using EBML lacing flags (0x06 bitmask). Because frame-level stream copy requires unlaced blocks, Lossless stream copy (.m4a / .webm) prompts you to switch to Uncompressed PCM (.wav) so Web Audio decodes laced audio cleanly.
Conversely, synthetic test videos or legacy broadcast surround formats such as AC-3 cannot be decoded by decodeAudioData, though native AAC tracks still copy losslessly via stream copy. Teams re-shooting cleaner spoken commentary after checking an extracted take can record fresh camera voiceovers offline without uploads inside the same suite.