Back to Converter
Audio Troubleshooting & Standards

Fix WebM Unknown Duration (MediaRecorder Recordings)

Why some WebM recordings show “Unknown duration” or “Infinity”, what can affect seeking, and when to choose MP3 conversion or a separate WebM remux.

Illustrative WebM duration display and MP3 playback states; results depend on the player
Illustrative player states, not a playback test: MP3 conversion creates a new audio file; it does not patch the original WebM. Seeking depends on the file and player.

1. Why Some MediaRecorder WebM Files Lack Duration

A browser can write WebM recordings incrementally using MediaRecorder. The navigator.mediaDevices.getUserMedia() API captures a media stream; MediaRecorder records that stream. File output and finalization vary by browser, recording settings, and how the application assembles the chunks.

Live Streaming Architecture

The final recording length is not known when recording starts. Some WebM outputs omit the EBML Segment → Info → Duration element. A player may then show Infinity or 00:00 until it can determine a duration; this is not a universal outcome.

Finalization Varies

After recorder.stop(), an application can collect the final recording data into a Blob. Do not assume every resulting WebM has a duration value or an EBML Cues seek index. Missing duration and missing seek indexes are related but distinct issues; player handling varies.

2. Which Recordings Can Show Unknown Duration?

Check the actual file rather than assuming a particular recording tool is affected. Depending on its output and finalization, a WebM file from these workflows may lack duration or seek metadata:

  • Microphone Recordings: Audio saved directly from a browser recording session.
  • Screen Recordings: Audio/video captured in a browser and saved as WebM.
  • Chunked Captures: Recording chunks assembled into a file without additional container finalization.
  • Web Voice Memos: Dictation, language practice, or interview audio exported as WebM.
  • Interrupted Recordings: Incomplete files may also be damaged; missing media cannot be restored by adding metadata.

3. Why Players Show “Infinity” or 00:00

Players can use container metadata, timestamps, indexes, or scanning to estimate duration and enable seeking. Support varies by browser, codec, container, and player. Missing duration metadata or a seek index may produce symptoms such as:

HTMLMediaElement.duration === Infinity: The browser has not established a finite duration. This can occur with a live stream or a file whose duration is not yet known. Seek controls may be limited; Infinity alone does not establish that the file is damaged.
Stuck at 00:00: A player may display 00:00 / 00:00 when duration is unavailable or the format is unsupported. Some players can scan the file; others cannot play it. The display alone does not identify the cause.

4. How This Converter Creates MP3 Audio

This converter creates a new MP3 audio file locally. It does not repair or rewrite the original WebM container, retain its video, or reconstruct missing audio. Conversion requires a supported file that the browser can decode:

  1. Browser Audio Decoding: The app passes the file to the Web Audio API via decodeAudioData. The browser handles decoding; an app-level demuxer does not iterate the audio packets. Opus/Vorbis support depends on the browser and the actual file.
  2. Decoded Audio Duration: The app reads AudioBuffer.duration after decoding to PCM. This measures the decoded samples per channel, not a repaired original container timeline:
    Decoded duration (seconds) = PCM samples per channel / Sample rate (Hz)
  3. MP3 Encoding and Checks: LAME encodes the decoded PCM into MP3. The app checks complete Layer III frame boundaries before offering the output. Encoder delay and padding can affect the encoded duration. Duration display and seeking depend on the player; these checks do not prove playback or seeking on every device.

5. Separate Manual Options with FFmpeg

If you have ffmpeg installed, these examples illustrate a separate local command-line workflow. This website does not run FFmpeg. Keep the original file and inspect the resulting output; these commands are not a guarantee of repair:

Option A: Remux to a new WebM without re-encoding

ffmpeg -i input_recording.webm -c copy fixed_recording.webm

For a readable input with usable timestamps, remuxing can write a new WebM container with updated duration and seek metadata while copying selected streams without re-encoding. It cannot recover missing audio or guarantee repair of damaged timestamps. Check duration and seeking in your target player.

Option B: Extract audio and convert to MP3

ffmpeg -i input_recording.webm -vn -c:a libmp3lame -b:a 192k output.mp3

Omits video (-vn) and encodes the selected audio stream to a new 192 kbps MP3. This is audio conversion, not WebM repair. Check the output in your intended player.

Zero-Re-Encode EBML Remuxer

Repair WebM Duration & Add Fast-Seek Index Locally

Patches missing Info.Duration, prepends front-loaded Cues + SeekHead entries, and writes finite Cluster lengths directly from cluster timestamps without re-encoding video or audio streams. Keeps your original file untouched.

Drop a Chrome MediaRecorder or live-streamed .webm file here

Streams EBML container slices locally · Preserves VP8/VP9/AV1 video and Opus/Vorbis audio bit-for-bit

Header inspector

WebM, Ogg and voice-note audio track checker

Find out what a file really contains before converting it: WebM or Matroska, Ogg Opus (such as a WhatsApp voice note), Ogg Vorbis, or a renamed MP4, WAV or MP3. The checker reads container headers only. It does not decode, repair or upload the file.

Try a sample header

Check your own file

Or drop a file here. Only the first 64 KB are read, in this browser tab; the file is not uploaded and is not changed.

Sample: screen-recording.webm

WebM with one A_OPUS audio track

Accepted container for this browser converter

The header shows one Opus audio track alongside video, which matches what this browser converter accepts. Header inspection cannot hear the audio: a present track can still be silent if the microphone was muted.

Magic bytes
1A 45 DF A3 9F 42 86 81
Container
WebM (EBML DocType "webm")
File extension
.webm
Tracks
2 (1 audio, 1 video)
Track 1
Video (TrackType 1) · V_VP9
Track 2
Audio (TrackType 2) · A_OPUS · 2 ch · 48000 Hz

Next step: Open the WebM to MP3 converter above or on the home page and select this file. Decoding still depends on your browser.

ffmpeg -i input.webm -map 0:a:0 -vn -c:a libmp3lame -b:a 192k output.mp3

Header checks cannot hear silence: a WebM can contain an audio track whose waveform is silent. Learn more in the WebM codecs guide, the Opus to MP3 guide, the FFmpeg and VLC guide and the MP3 bitrate guide.