The basics
What is a WEBA file?
A .weba file is a WebM file that contains only audio. WebM is the royalty-free media format of the web, and when there's no picture, its audio track is almost always Opus, sometimes Vorbis. The a at the end just marks it as audio, the way .oga marks Ogg audio.
The WebM project itself uses .webm for every file, with or without video. .weba is a convention that comes from media type tables: MDN's list of common types, for example, pairs .weba with audio/webm and .webm with video/webm. Software that picks a file name from the media type, and some converters and recording apps, therefore save audio-only WebM as .weba. In our test, Chrome itself named a downloaded audio/webm file .webm, so you'll find the same audio under both names.
Where WEBA files usually come from:
- Recordings made in a browser. Voice recorders, podcast tools and dictation apps that run in a web page use the MediaRecorder API. Chrome and Edge record audio as
audio/webm; codecs=opus; Firefox can record WebM or Ogg; Safari can record WebM since version 18.4. - Audio extracted from WebM videos without re-encoding: the Opus track is copied into a new, audio-only WebM.
- Converters that offer WebM as an output format for audio.
Anatomy
What's inside a WEBA file
A WEBA file has exactly the structure of a WebM video, minus the video track: EBML elements, each an ID, a size and the data, nested inside each other. Below is the element tree of a 5,021-byte file we recorded for this page in Chromium 141 with the MediaRecorder API: 0.3 seconds of a 440 Hz tone, collected in 100 ms slices as recording apps usually do. It isn't offered for download, but it's a real browser recording, with the quirks that come with it.
rec.weba: 0.3 s recorded by Chrome's MediaRecorder, Opus stereo, 5,021 bytes
offset element ID bytes content
0 EBML header 1A 45 DF A3 31 bytes
21 DocType 42 82 "webm"
28 DocTypeVersion 42 87 4
36 Segment 18 53 80 67 size: 01 FF FF FF FF FF FF FF (unknown)
48 Info 15 49 A9 66 25 bytes
53 TimestampScale 2A D7 B1 1,000,000 ns (1 ms)
60 MuxingApp 4D 80 "Chrome"
(no Duration)
78 Tracks 16 54 AE 6B
83 TrackEntry AE
98 TrackType 83 2 = audio
101 CodecID 86 "A_OPUS"
109 CodecPrivate 63 A2 OpusHead, 19 bytes:
4F 70 75 73 48 65 61 64 01 02 00 00 80 BB 00 00 00 00 00
133 Audio: SamplingFrequency 48,000, Channels 2
146 Cluster 1F 43 B6 75 size unknown
158 Timestamp E7 0 ms
161 SimpleBlock A3 963 bytes: 81 00 00 80 FF 03 …
1,127 SimpleBlock A3 at +61 ms
2,093 Cluster 1F 43 B6 75 size unknown, Timestamp 120 ms
2,108 SimpleBlock × 2
4,040 Cluster 1F 43 B6 75 size unknown, Timestamp 240 ms
4,055 SimpleBlock the last 60 ms
5,021 end of file (no Cues)- 1
1A 45 DF A3 · DocType "webm"The EBML header
Every WebM and Matroska file starts with these four bytes. The DocType
webmis the same for audio and video: nothing in the header says the file has no picture. Only the track list does. - 2
01 FF FF FF FF FF FF FFA Segment of unknown size
An 8-byte size field with every value bit set to 1 means "unknown". The browser writes the file as a stream and never goes back to fill in sizes. Readers then take the Segment as running to the end of the file.
- 3
Info: no DurationNo duration
The Info element has the timestamp scale and the name of the writer, but no Duration, because the length isn't known when recording starts. There's no SeekHead (table of contents) either. Players then have to scan the whole file to show a length, and many show none.
- 4
TrackType 2 · A_OPUSOne audio track
The only TrackEntry is type 2, audio, with codec ID
A_OPUS. A WebM file with Vorbis hasA_VORBISinstead. This is what makes it a WEBA file in all but name. - 5
4F 70 75 73 48 65 61 64 01 02 00 00 80 BB …CodecPrivate: the OpusHead
The same 19-byte header that starts an Opus file: version 1, 2 channels, a pre-skip of 0 samples (
00 00), 48,000 Hz. Chrome wrote no CodecDelay element, which the pre-skip of 0 makes unnecessary. - 6
Cluster · TimestampClusters of unknown size
Chrome started a new Cluster at 0, 120 and 240 ms, each with an unknown size too. Each Cluster's Timestamp is the base for the blocks inside it.
- 7
81 00 00 80A SimpleBlock header
Track 1 (
81), a time offset of 0 ms from the Cluster's timestamp (00 00) and the keyframe flag (80). Every block in this file is marked as a keyframe. - 8
FF 03The Opus packet
TOC byte
FF: configuration 31 (CELT only, fullband, 20 ms frames), stereo, several frames per packet;03says three. So each block holds 60 ms of sound in 959 bytes of Opus data, about 128 kbps. - 9
end of file (no Cues)No seek index
A finished WebM usually ends with Cues, an index of where each Cluster starts. Without one, seeking means guessing and scanning.
Under the hood
How a WEBA file is organised
Everything in WebM is an EBML element: an ID, a size and the content, with variable-length numbers so that small values take one byte. A complete audio-only WebM has the same top-level elements as a video: Info (timing and duration), Tracks (one audio track), Clusters with the compressed audio, and Cues for seeking. The WebM explainer goes through a full video file element by element.
| Element | In an Opus WEBA file | Notes |
|---|---|---|
| CodecID | A_OPUS (or A_VORBIS) | The only codecs WebM allows for audio. |
| CodecPrivate | The 19-byte OpusHead | For Vorbis, the three Vorbis header packets instead. |
| SamplingFrequency | 48,000 | Opus always decodes at 48 kHz. |
| CodecDelay | Pre-skip, in nanoseconds | Samples to drop at the start. FFmpeg writes 6,500,000 ns (312 samples); our Chrome recording had a pre-skip of 0 and no CodecDelay. |
| SeekPreRoll | 80,000,000 ns (80 ms) | How much audio to decode and discard before a seek point, so Opus can settle after a jump. |
| DiscardPadding | On the last block | Padding to trim at the end, so the length comes out exact. |
Opus audio is the same whether it's in WebM or in Ogg; only the wrapping differs. That's why moving it between .weba and .opus with FFmpeg's -c copy is lossless and instant.
Recordings
Why browser recordings have no duration
MediaRecorder hands audio to the page in slices while recording. The browser can't go back and change bytes it has already handed over, so it writes the Segment and Clusters with unknown sizes and leaves out Duration and Cues, as in the anatomy above. The result is a valid WebM file built for streaming, but players show no length or a wrong one, seeking is slow or impossible, and some editors refuse it.
In our test, recent Chrome added Duration, sizes and Cues when the whole recording was collected in one piece at the end (MediaRecorder without a timeslice). With 100 ms slices, which recording apps need for long sessions and uploads in progress, the file had none of them.
The fix is a remux: copying the audio into a new file, which writes the missing elements without touching the sound.
# rewrite a browser recording with a duration and a seek index
ffmpeg -i recording.weba -c copy -f webm fixed.webaRelated formats
.weba vs .webm, .opus and .ogg
| Extension | Container | Usual audio | Notes |
|---|---|---|---|
.weba | WebM | Opus, Vorbis | Audio-only WebM, served as audio/webm. |
.webm | WebM | Opus, Vorbis | Video, or audio only. The official WebM extension. |
.opus | Ogg | Opus | The standard file form of Opus (RFC 7845). The same sound as an Opus WEBA, rewrapped. |
.ogg, .oga | Ogg | Vorbis, Opus, FLAC | The older open audio format; Firefox can record into it. |
.m4a | MP4 | AAC | Plays in every browser and on every iPhone. The safe choice to share. |
.mp3 | MP3 | MP3 | Plays on everything, including old hardware. |
Renaming a .weba file to .webm is harmless and sometimes helps software that doesn't know the .weba extension. Renaming it to .opus or .ogg isn't enough: those are a different container, so use ffmpeg -i in.weba -c copy out.opus instead.
Compatibility
Where WEBA files play
| Platform | WebM with Opus | WebM with Vorbis |
|---|---|---|
| Chrome, Edge | Yes | Yes |
| Firefox | Yes | Yes |
| Safari | Since Safari 15 (2021), on macOS, iOS and iPadOS | MDN's tables disagree; don't rely on it |
| Desktop apps | VLC, mpv, Audacity | VLC, mpv, Audacity |
| Apple Music, QuickTime, many phone apps | No | No |
We checked playback of both Opus and Vorbis .weba files served as audio/webm in Chrome 141 and Firefox 142. For a page that must also work in apps that ignore WebM, offer an M4A (AAC) or MP3 copy:
<audio controls>
<source src="note.weba" type='audio/webm; codecs="opus"'>
<source src="note.m4a" type="audio/mp4">
</audio>Troubleshooting
Common WEBA problems and their causes
- No duration, or seeking doesn't work: it's a browser recording without Duration and Cues. Remux it with
ffmpeg -i in.weba -c copy -f webm out.weba. - FFmpeg says "Unable to choose an output format": FFmpeg doesn't recognise
.webaas an output name (we saw this with FFmpeg 6.1). Add-f webmbefore the output file. - Won't open in Apple Music, QuickTime, Windows apps or a chat app: they don't read WebM. Convert to M4A or MP3, or play it in a browser or VLC.
- An upload form rejects it: the form may only accept common extensions, or check for
video/webm. Rename it to.webm, or convert it. - Sounds fine but the file is unexpectedly large: in our test, Chrome recorded at about 128 kbps stereo, plenty for music but far more than a voice needs. Re-encode speech at 24 to 32 kbps mono Opus.
How to
How to open and convert a WEBA file
- Play it: drag it into Chrome, Edge, Firefox or Safari, or open it with VLC or mpv on Windows, macOS or Linux.
- Edit it: Audacity imports WebM audio. Export to WAV for editing, then to the format you need.
- Inspect it:
ffprobe file.webashows the codec, channels and whether a duration is known; MKVToolNix'smkvinfolists every element.
# to MP3 (re-encodes)
ffmpeg -i in.weba -c:a libmp3lame -q:a 2 out.mp3
# to M4A with AAC (re-encodes)
ffmpeg -i in.weba -c:a aac -b:a 160k out.m4a
# to an Ogg Opus file, without re-encoding
ffmpeg -i in.weba -c:a copy out.opus
# to WAV for editing
ffmpeg -i in.weba out.wavConverting to MP3 or M4A is lossy to lossy, so use a good bit rate. Copying into .opus keeps the original sound exactly.
Is a WEBA file safe?
It's audio and can't run code; WebM doesn't allow attachments. A crafted file could target a decoder bug, so keep browsers and players updated. Remember that a recording made in a browser contains whatever the microphone heard, background conversations included.
Sample files
There are no sample WEBA files on this page. To make one, run ffmpeg -f lavfi -i "sine=frequency=440:duration=10" -c:a libopus -b:a 64k -f webm test.weba, or record a few seconds with a MediaRecorder demo in Chrome or Firefox.
Put it online
Have a WEBA file? Give it a link.
Drop a .weba recording on 99helpers and it gets its own address that plays in the browser: in Chrome, Edge and Firefox, and in Safari 15 and later. Handy for sharing a voice memo or a recording made in a web app without converting it first.
Questions
WEBA files, frequently asked
What is a .weba file?
An audio-only WebM file, usually holding Opus audio. Browser-based recorders and some converters create them.
How do I open a WEBA file?
Drag it into Chrome, Edge, Firefox or Safari 15 or later, or use VLC. Apple Music, QuickTime and many phone apps can't open it; convert it to M4A or MP3 for those.
How do I convert WEBA to MP3?
Use VLC's Convert/Save option, Audacity, or FFmpeg: ffmpeg -i in.weba -c:a libmp3lame -q:a 2 out.mp3.
What's the difference between WEBA and WebM?
None in the file itself: a WEBA file is a WebM file with no video track. The .weba extension just signals audio, and the media type is audio/webm instead of video/webm.
Why does my browser recording have no length?
Browsers write recordings as a stream and leave out the duration and seek index. Remux it with ffmpeg -i in.weba -c copy -f webm out.weba to add them.
Can an iPhone play WEBA files?
Safari plays WebM audio with Opus since iOS 15, but most other iPhone apps don't. Convert to M4A to be safe.
Is WEBA better than MP3?
Opus in WEBA usually sounds better than MP3 at the same bit rate, especially for speech. MP3 plays on far more devices and apps.
Can I rename .weba to .webm?
Yes. It's the same format, and some software only recognises .webm. Renaming it to .mp3 or .opus doesn't work: those need a conversion or a remux.
Related formats
Other file types explained
Keep going
Related
Sources
- MDN: Common media types (.weba, audio/webm)
- MDN: Media container formats (WebM)
- The WebM Project: container guidelines
- RFC 9559: Matroska Media Container Format Specification
- Apple: Safari 15 release notes (Opus in WebM)
- WebKit: features in Safari 18.4 (MediaRecorder WebM, Ogg)
Last reviewed 27 October 2026.