Converting a 30-second WebM to MP4 on ReelSDK costs about a third of a cent at $0.02 per compute minute, and MKV, MOV and AVI go through the same POST /v1/ffmpeg call. If the codecs already match, -c copy remuxes for less.
Video conversion API
Yes: name the output converted.mp4, pick the codecs with -c:v and -c:a, and ReelSDK returns the 30-second WebM as an H.264 MP4 after about 10 seconds of compute.
Use casesUpdated
The request
POST /v1/ffmpeg
Convert WebM, MKV or MOV to MP4 and back in one ffmpeg call, about a third of a cent for a 30 s clip.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"launch.webm": "https://api.reelsdk.com/f/lib/in/use-cases/launch.webm"
},
"args": [
"-i", "launch.webm", "-c:v", "libx264", "-crf", "20", "-preset",
"veryfast", "-c:a", "aac", "-b:a", "160k", "-movflags", "+faststart",
"converted.mp4"
],
"outputs": ["converted.mp4"]
}'const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"inputs": {
"launch.webm": "https://api.reelsdk.com/f/lib/in/use-cases/launch.webm"
},
"args": [
"-i", "launch.webm", "-c:v", "libx264", "-crf", "20", "-preset",
"veryfast", "-c:a", "aac", "-b:a", "160k", "-movflags", "+faststart",
"converted.mp4"
],
"outputs": ["converted.mp4"]
}),
});
const { job } = await res.json();{
"job": {
"id": "job_y5tsbgp882wulu1pqu2v",
"op": "ffmpeg",
"status": "succeeded",
"stage": null,
"created_at": "2026-11-07T01:20:08.738Z",
"finished_at": "2026-11-07T01:20:21.171Z",
"outputs": {
"converted.mp4": "https://api.reelsdk.com/f/out/job_y5tsbgp882wulu1pqu2v/converted.mp4?s=..."
},
"result": null,
"duration_s": 30.016,
"error": null,
"usage": {
"output_seconds": 30.016,
"audio_seconds": 0,
"tts_characters": 0,
"images": 0
},
"poll_url": "https://api.reelsdk.com/v1/jobs/job_y5tsbgp882wulu1pqu2v"
}
}Transcoding vs. remuxing
Converting the 30-second launch.webm to an H.264 MP4 means re-encoding the video and audio, because the source holds VP9 and Opus streams. The job above runs -i launch.webm -c:v libx264 -crf 20 -preset veryfast -c:a aac -b:a 160k -movflags +faststart converted.mp4 and writes a 1080p converted.mp4. Fetching the input, running ffmpeg and storing the file billed about 10 seconds of compute, about a third of a cent, and machine start-up isn't billed.
When the source already has the codecs you want, skip the re-encode and swap the container with -c copy. Taking launch.mkv, H.264 and AAC in Matroska, and running -i launch.mkv -c copy -movflags +faststart remuxed.mp4 copies the same streams into remuxed.mp4 without touching the frames, so the file stays at 18.6 MB. It billed about 2 seconds of compute, under a tenth of a cent.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"launch.mkv": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mkv"
},
"args": [
"-i", "launch.mkv", "-c", "copy", "-movflags", "+faststart",
"remuxed.mp4"
],
"outputs": ["remuxed.mp4"]
}'At a glance
Ways to convert a video
| Option | Price | Limits | What you run |
|---|---|---|---|
| ffmpeg on your own machine | Free; LGPL 2.1 or later, or GPL 2 or later with GPL libraries such as libx264 | Your CPU, disk and bandwidth | ffmpeg builds, a job queue, storage |
| AWS Lambda with an ffmpeg layer | $0.0000166667 per GB-second plus $0.20 per 1M requests (x86, US East) | 900 s per run, 10,240 MB memory and /tmp, 250 MB of code and layers, 6 MB sync payload | The layer, S3 in and out, retries |
| FFmpeg Micro | 1 token per 10 s of input, 500 tokens for $5; this 30 s input: about 3 tokens, $0.03 | 100 MB input on the free plan, 1,024 MB on Starter and Pro | API calls |
| ReelSDK | $0.02 per compute minute; about a third of a cent for this 30 s clip | 500 MB per file, 1 GB per job, 10 minutes of run time | One HTTP call |
Sources: FFmpeg license and legal, AWS Lambda quotas, AWS Lambda pricing, FFmpeg Micro pricing, checked November 2026.
Picking the output format and codecs
ffmpeg reads the container format from the file name you pass in outputs and the end of args: mp4, mov, mkv, webm, avi, ts, flv, 3gp, or mpg. Set the video and audio codecs with -c:v and -c:a, like -c:v libx264 and -c:a aac in the WebM run, or -c copy when both streams already match the target container. Look at the ffmpeg docs for how args is passed directly to the binary without a shell.
For MP4 outputs, pass -movflags +faststart so ffmpeg puts the MP4 index at the front of the file. And since a single job takes up to 20 files in outputs, you can write several containers or bitrates from one input in a single POST /v1/ffmpeg call.
Cost and limits
ReelSDK bills raw ffmpeg jobs at $0.02 per compute minute, metered per second with a 1 s minimum, and failed jobs cost $0. You pay for the time spent fetching inputs, running ffmpeg and storing outputs (see pricing for details, and new accounts start with $0.50 of free credit at sign-up).
If your files aren't on a public URL yet, check the uploads docs for sending local media first.
Uploads accept mp4, m4v, mov, webm, mkv, avi and ts video; a single upload takes up to 100 MiB and is kept 7 days, and files over 100 MiB go up as a multipart upload.
What it costs
What this job cost
- Compute: fetching the input, running ffmpeg and storing the file
- 10.1 s
- Rate
- $0.02 per compute minute
- Charged
- $0.0034
Billed per second with a 1 s minimum. Machine start-up is not billed, and failed jobs cost $0.
Limits
What one request takes
- Input files
- 500 MB each, 1 GB per job
- Job run time
- Up to 10 minutes
- Containers out
- mp4, mov, mkv, webm, avi, ts, flv, 3gp, mpg
- Waiting for a result
- 60 s by default, up to 300 s
- Output retention
- 7 days
How it works
From request to file
Host the input
Any public http or https URL on the default port works, as long as it has no username or password in it; ReelSDK downloads it before ffmpeg starts. A local file goes up with
POST /v1/uploads?filename=clip.mp4first: up to 100 MiB per upload, kept 7 days, and larger files go up as a multipart upload.Send the arguments
The output name picks the container, so
converted.mp4writes MP4.-c:v libx264 -crf 20and-c:a aac -b:a 160kpick codecs that MP4 players expect, and-movflags +faststartputs the index at the front of the file.Download the result
Every file is listed under
job.outputs, and the links work for 7 days, so copy what you keep. For long jobs, send?wait=0with awebhook_urland fetchGET /v1/jobs/{id}when the webhook arrives.
FAQ
Questions, answered
How do I tune H.264 quality and encoding speed?
Pass standard ffmpeg flags in the args array. The example uses -crf 20 with -preset veryfast for video and -b:a 160k for the AAC audio track, producing a 13.2 MB converted.mp4 from the 9.9 MB launch.webm source in under 10 seconds of ffmpeg time. Changing the preset or CRF directly changes how long ffmpeg runs and what the job costs.
Can I convert one video into multiple formats in the same request?
Yes, outputs accepts up to 20 file names per job. List each target file name at the end of args with its own -c:v and -c:a flags and include every output name in the outputs array. ReelSDK fetches the input once, runs the command, and returns a link for each file.
How does the cost compare to FFmpeg Micro or running ffmpeg on AWS Lambda?
This 30-second WebM-to-MP4 transcode costs about a third of a cent on ReelSDK, about 10 seconds billed at $0.02 per compute minute, and the MKV remux costs under a tenth of a cent. On FFmpeg Micro, which charges 1 token per 10 seconds of input and sells top-ups at 500 tokens for $5, a 30 s input uses 3 tokens, or $0.03 at the top-up rate. AWS Lambda bills $0.0000166667 per GB-second (x86, US East) plus $0.20 per 1M requests.
- Convert WebM to MP4 with ffmpegRe-encode a WebM's VP9 and Opus to H.264 and AAC, or copy both streams into an MP4 in under a second without re-encoding.
- Convert MKV to MP4 with ffmpegRemux MKV to MP4 without re-encoding, keep the subtitles as mov_text, and avoid the -c copy that drops them without a word.
- Convert MOV to MP4 with ffmpegRemux an H.264 MOV to MP4 with -c copy in a fraction of a second, and transcode ProRes, which MP4 can't hold, to H.264.
- FFmpeg onlineRun your own ffmpeg command on your files in the browser, free and without installing or uploading anything.
- Video compressionCompress a video to a size budget in one ffmpeg call: a 129 MB 1080p clip fits a 5 MB target at 4.6 MB, for under 1 cent.
- Video to MP3Pull the audio track out of any video as an MP3 with one ffmpeg call, under a tenth of a cent for a 30 s clip.
- Video to GIFTurn a clip of any video into a looping GIF with a palette built from its own colors, for under a tenth of a cent.
- FFmpeg API reference: POST /v1/ffmpegPOST /v1/ffmpeg runs ffmpeg 8.1 with your own arguments: up to 50 inputs of 500 MB, 20 outputs and 600 s per command, with tested recipes for GIFs, thumbnails and subtitles.
- How to code a video in HTML?Embed a video in HTML with the video tag, pick formats and fallbacks, handle autoplay rules, and render HTML into an MP4 file.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
