---
name: video-to-mp3
description: "Extract the audio from a video as MP3, WAV or OGG, in the browser. Nothing is uploaded. Use when someone asks for: video to mp3 converter, video to mp3. Free browser tool on Life2Film (life2film.com): runs in the user's browser, nothing is uploaded."
---

# Video to MP3

Extract the audio from a video as MP3, WAV or OGG, in the browser. Nothing is uploaded.

Page: https://life2film.com/tools/video-to-mp3/?utm_source=skill

## What matters

- MP3 uses LAME compiled to WebAssembly, loaded only when MP3 is chosen.
- WAV size is sampleRate x 2 bytes x channels, there is no bitrate to pick.
- Vorbis lands about 30% under its nominal bitrate, being variable-rate.
- Size predictions read the real channel count and sample rate from the file; assuming stereo doubles the estimate for a mono source.
- A bitrate higher than the source was recorded at enlarges the file without improving it.

## Limits

- Runs entirely in the user's browser. Nothing is uploaded, no account, no watermark.
- Because it runs on the user's machine, you cannot call it as an API: open the page for the person, or drive it with a browser (Playwright) on their machine.

## How to use it as an agent

1. The person has a file and a browser: give them https://life2film.com/tools/video-to-mp3/?utm_source=skill and say what to set. The file stays on their device.
2. You run a browser (Playwright, computer use): open the page, put the file in the drop zone, wait for the result, save the download.

## From code

```js
// npm i mediabunny @mediabunny/mp3-encoder
import { Input, Output, Conversion, BlobSource, BufferTarget, Mp3OutputFormat, ALL_FORMATS } from 'mediabunny';
import { registerMp3Encoder } from '@mediabunny/mp3-encoder';

registerMp3Encoder();   // LAME compiled to WASM; only needed for MP3 output

export async function extractAudio(file, { bitrate = 192_000, mono = false } = {}) {
  const input = new Input({ source: new BlobSource(file), formats: ALL_FORMATS });
  const output = new Output({ format: new Mp3OutputFormat(), target: new BufferTarget() });

  const conversion = await Conversion.init({
    input,
    output,
    video: { discard: true },                      // leave the picture behind
    audio: { bitrate, ...(mono ? { numberOfChannels: 1 } : {}) },
  });

  if (!conversion.isValid) throw new Error('No audio track, or it cannot be decoded');
  await conversion.execute();

  return new Blob([output.target.buffer], { type: 'audio/mpeg' });
}

const mp3 = await extractAudio(file, { bitrate: 192_000 });
```

## Life2Film MCP

Every tool on Life2Film and our other sites, their skills and guides, as a read-only MCP server (`list_tools`, `get_tool`):

```sh
# Claude Code
claude mcp add --transport http life2film https://life2film.com/mcp
# Codex CLI
codex mcp add life2film --url https://life2film.com/mcp
```

Claude.ai, Claude Desktop, ChatGPT: add a custom connector with the URL `https://life2film.com/mcp`.
Cursor and other clients (`mcp.json`): `{"mcpServers":{"life2film":{"url":"https://life2film.com/mcp"}}}`

## Related

- [Trim Video](https://life2film.com/tools/video-trimmer/?utm_source=skill)
- [Compress Video](https://life2film.com/tools/video-compressor/?utm_source=skill)
- [Convert Video](https://life2film.com/tools/video-converter/?utm_source=skill)
- [Remove Audio](https://life2film.com/tools/remove-audio-from-video/?utm_source=skill)
- [Rotate Video](https://life2film.com/tools/rotate-video/?utm_source=skill)
- [Video Info](https://life2film.com/tools/video-info/?utm_source=skill)

---
Life2Film: https://life2film.com/ · llms.txt: https://life2film.com/llms.txt
