WebM to MP4 API — Free Tier + Pay-As-You-Go
Convert WebM (VP8/VP9/AV1) to MP4 (H.264/H.265) via API. Re-encode or copy-codec remux mode, full FFmpeg control.
What it does
The WebM to MP4 API converts WebM containers (carrying VP8, VP9, or AV1 video and Vorbis or Opus audio) into MP4 containers with H.264/H.265 video and AAC audio for maximum playback compatibility across iOS, Safari, legacy Android, and embedded players. Two modes are supported: `mode=encode` (default) re-encodes both video and audio for guaranteed compatibility, and `mode=remux-if-possible` swaps containers without re-encoding when the WebM is bizarrely already H.264/AAC-encoded (rare but does happen on some recording pipelines). Re-encoding mode exposes the full FFmpeg parameter surface: video codec (H.264, H.265, AV1), preset (ultrafast through veryslow), CRF or target bitrate, two-pass encoding (`twoPass=true`), audio codec (AAC, MP3, AC3), audio bitrate, sample rate, and rotation.
The pipeline handles WebM-specific quirks like missing duration in malformed live-streamed sources (we ffprobe the actual length) and transparent VP9 (alpha channel is flattened to black for MP4 output, since MP4 doesn't support per-pixel alpha in mainstream players).
Supported formats
Source formats (1)
- webm
Target formats (1)
- mp4
Quick start
All three SDK languages show the same conversion: a single POST to /v1/convert with your API key in the X-Api-Key header.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@input.webm" \
-F "target=mp4"
-F "videoCodec=h264" \
-F "preset=fast"import { ConvertIntoMP4 } from "@convertintomp4/sdk";
import fs from "node:fs";
const client = new ConvertIntoMP4({ apiKey: process.env.CIM4_API_KEY });
const job = await client.convert({
file: fs.createReadStream("input.webm"),
target: "mp4",
});
const result = await client.waitForJob(job.id);
console.log("Output URL:", result.outputUrl);from convertintomp4 import Client
client = Client(api_key="ck_your_api_key")
with open("input.webm", "rb") as f:
job = client.convert(file=f, target="mp4")
result = client.wait_for_job(job.id)
print("Output URL:", result.output_url)Features
- VP8 / VP9 / AV1 → H.264 / H.265
- Vorbis / Opus → AAC audio re-encode
- Encode or remux-if-possible mode
- Full FFmpeg control: CRF, preset, two-pass, rotation
- Transparent VP9 → black-background MP4
- ffprobe for missing-duration WebM live streams
- Resumable multipart upload for large files
Pricing
From $9.99/mo (Pro) or $24.99/mo (Business) — or pay-as-you-go on the API plan.
Free tier: 5 conversions/day, 100 MB file size, no API key required (IP-gated). Pro $9.99/mo: 100/day (2,000/month), 2 GB files. Business $24.99/mo: 1,000/day (20,000/month), 10 GB files, GPU encoding, dedicated support.
See full pricing breakdown →Built for production
99.9% uptime SLA
Multi-region failover, transparent status page, 60-second response-time guarantee on Business.
Encryption + auto-delete
TLS 1.2+ in transit, AES-256 at rest. Files deleted after 1h / 24h / 7d depending on plan, or instantly via DELETE endpoint. See the security page.
~7s median latency
Most sub-100 MB jobs complete in 6-9 seconds. Webhook-driven async for heavier workloads; waitForJob for synchronous flows.
Frequently Asked Questions
Why convert WebM to MP4?
MP4 (H.264/AAC) is the most broadly compatible video format — plays on iOS Safari, Android (all versions), legacy browsers, smart TVs, hardware decoders, video editors. WebM (VP9/Opus) is excellent for the modern web but excluded from many ecosystems (especially Apple's pre-iOS 14 stack and most embedded players).
What CRF value should I pick?
CRF 23 is FFmpeg's default and produces visually-transparent output for most content. CRF 18 is archival quality (no visible quality loss). CRF 28 is web-friendly with noticeable but acceptable artifacts. Lower CRF = larger files; the rough rule is each -6 doubles file size.
How does encode mode differ from remux-if-possible?
Encode (default) re-encodes both video and audio — slower but guaranteed MP4-compatible output. Remux-if-possible checks whether the WebM's tracks are already H.264/AAC (rare); if so, it swaps containers in seconds. If not, it falls back to full encode. Use remux for guaranteed-fast jobs where you control the source.
What about transparency in VP9 WebM?
VP9 supports per-pixel alpha; MP4 in mainstream players does not. The API flattens the alpha channel to a configurable background (`background=#000000` default, black) when converting transparent WebM to MP4. For alpha preservation, convert to HEVC with `enableAlpha=true` for HEVC-with-alpha output that plays in QuickTime.
Can I convert multiple WebM clips into a concatenated MP4?
Yes — POST multiple `file` fields and set `concat=true`. The API decodes each WebM, normalises to common parameters (resolution, frame rate, audio sample rate), and outputs a single concatenated MP4 in source order.
Related APIs
- MP4 to MP3 APIExtract MP3 audio from MP4 video programmatically. Per-job bitrate and sample rate, ID3 tag injection, fast remux mode.
- PDF to JPG APIRender PDF pages to JPG images programmatically. Per-page DPI, page-range selection, batch ZIP output, ImageMagick + pdftoppm pipeline.
- JPG to PNG APIConvert JPG to PNG with optional transparency, lossless compression, and EXIF preservation via API. Sharp-backed.
- MP4 to GIF APIConvert MP4 video to animated GIF programmatically. Per-job width, fps, palette mode, and start/end trim controls.
- PDF to DOCX APIConvert PDF to editable Word DOCX via API. Preserves layout, fonts, tables, and images. pdf2docx + OCR fallback.
- DOCX to PDF APIConvert Word DOCX to PDF programmatically. LibreOffice-rendered with font fallback, headers/footers, and PDF/A archival output.
Or browse the full catalogue of 23 API products →
Get an API key
Start integrating the WebM to MP4 API in five minutes. Read the docs, grab a key, and ship your first conversion before the trial coffee cools.