Faststart MP4
Rewrites one MP4 up to 50 MB with its playback index at the front (ffmpeg's +faststart), so players that stream progressively can begin sooner. The picture and sound are copied, not re-encoded, and the file never leaves your device.
How to use
- Choose one MP4: Drop a .mp4 or .m4v onto the box or click to pick it — one file per run, up to 50 MB. The file picker will show other videos too, but anything that isn't .mp4 or .m4v is refused with a note instead of being processed.
- Read the note under the file name: The page reads the file's top-level boxes straight away and tells you what it can do for this file: index at the end (what this tool moves), already at the front, a fragmented MP4 that already streams, a missing index, or a structure that stops partway. The note is advice — the button stays available either way.
- Click Optimize MP4: The first run shows "Getting the engine ready…" while it fetches about 31 MB of processing engine, then a percentage. Cancel works during the file read, the engine download and the rewrite, and returns you to the form with no error.
- Check the result and save it: The first line of the result is read back off the produced file: either the index is now at the front, or it says the position didn't change. Preview it if your browser can play it, then press Download — Save to device on a phone — to get a file named after the original with -faststart added.
What is a faststart MP4?
A faststart MP4 is an MP4 whose playback index — the moov atom — is written at the front of the file. This page repacks an MP4 (.mp4 or .m4v) into that layout with ffmpeg's -movflags +faststart, run together with -c copy, so the video and audio data are copied bit for bit and nothing is re-encoded. The output is still an MP4 and still plays with the same codecs as the original.
The moov atom contains an MP4's duration, track list and sample index. Putting it before the media data lets compatible progressive-download players read that information earlier. An encoder that doesn't know the final size until it stops writing usually leaves the moov after the media data instead: ffmpeg's own default layout without the flag is ftyp / free / mdat / moov, index last.
The playback benefit depends on connection speed, server Range support and the player. Faststart does not reduce the amount of encoded video or audio to download. What the move changes is when the map can be read: with the index at the end, a progressive player has to reach the end of the file first, which is why an embedded video can sit there doing nothing or refuse to let you drag the progress bar.
Everything runs inside the browser tab, through ffmpeg.wasm — FFmpeg compiled to WebAssembly and downloaded with the page. There is no server fallback in the code: the list of tools allowed to fall back to a server is empty, and the fallback function only throws, so a file your device can't finish is an error message rather than an upload. Nothing is kept either — close the tab and the result is gone.
Rewriting the container needs the multi-threaded build of the engine, which needs SharedArrayBuffer, so this page is served with cross-origin isolation. An up-to-date Chrome, Edge or Firefox has it; private windows and some in-app browsers switch it off, and there the tool stops you on the click rather than after a 31 MB download it couldn't have used.
Does your file even need it? The note on pick
Index at the end (moov after mdat) → this is the file faststart helps Index already at the front → no faststart gain; track and metadata changes still apply Fragmented MP4 (moof boxes) → already streamable by design No moov found at all → index missing; the run will probably fail Structure stops partway → the file may be truncated or damaged No ftyp/moov boxes at all → not MP4-shaped; refused on click
As soon as you pick a file, the page walks its top-level boxes and prints one of the lines above. It reads only the 16-byte header of each box through File.slice, so the check needs no ffmpeg, loads nothing into memory and is immediate even on a 50 MB file. The engine may already be downloading in the background while it runs, and the full file is read only when you click the button.
This matters because "faststart" is a yes-or-no property, not a dial. If the index is already at the front, another pass offers no faststart benefit, but still applies this tool's track and metadata changes. In our parameter check, running these arguments on an already-optimized 3,645,356-byte file returned a file of exactly 3,645,356 bytes with the box order unchanged. Reading that in the note, instead of after the engine download finishes, is the whole reason it exists.
The scan reads up to 64 top-level boxes. A file with more than that is unusual, but its verdict may stop at "as far as we read". The note never blocks the run: asking for an optimization you don't need is still a legal request, and the result screen will tell you honestly that the index position didn't change.
What is kept, what is dropped, and what the size does
Kept unchanged: resolution, frame rate, bitrate, codec, every audio track, chapters, title/comment tags Dropped: subtitle tracks, data and timecode tracks, picture tracks after the first one (cover art) Removed: location (GPS) metadata Not copied: the original creation_time (shoot date) Rewritten: HEVC sample entries are tagged hvc1 for Apple players
Because the media streams are copied, the picture and the sound come out identical: same codec, same resolution, same frame rate, same bitrate, same channels. There is no quality setting on this page, and there is nothing to choose — no profile, no container option, no metadata switch. The encoded video and audio are copied without quality loss; container layout, retained tracks and metadata can change.
So the size barely moves. In a parameter check with desktop FFmpeg 9.0.2 on a synthetic 1280×720 30 fps 10-second H.264 clip of 3,645,391 bytes with its index at the end, the optimized file came out at 3,645,356 bytes — 35 bytes smaller, about 0.001%, because reordering changes the size of the offset tables. Expect roughly that: a file about as big as before.
The exception is a file carrying extra tracks. The arguments keep the first video track and all audio tracks and discard subtitles, data and timecode (-map 0:v:0 -map 0:a? -sn -dn), so a second sample with two audio tracks, one subtitle track and a cover image went from 513,989 to 470,844 bytes, 8.4% smaller — and that 8.4% is the subtitle track and the cover art being gone, not compression. Keep the original if you need those. Chapters do survive: a two-chapter sample came back with both chapters at the same timings.
Two pieces of metadata change on every run. Location (GPS) tags are cleared, because every local output on this site is written with the nine location keys blanked, including Apple's com.apple.quicktime.location fields, and this page has no switch to keep them. The original shoot date (creation_time) is not carried into the output either, so a photo library may file the result under today's date. Titles, comments and similar global tags stay. If the source video is HEVC (H.265), the output's sample entries are tagged hvc1 rather than the hev1 ffmpeg would otherwise write when copying from a container with no codec tag — Safari, QuickTime and the iPhone photo library generally want hvc1. We have no measured Apple-device playback test for that, only the written tag.
When faststart is the wrong tool
It does not make videos smaller. A 40 MB clip still requires roughly the same download after faststart; the 0.001% reduction above belongs only to our synthetic test sample. Making the download smaller is a job for re-encoding.
It cannot repair a broken MP4. If the index is missing entirely (media data but no moov, typically an interrupted download or recording), if the structure stops partway, or if media data is missing, there is no index to move and the run is likely to fail outright. The note on pick flags those cases; it doesn't fix them.
It also can't promise that a stubborn progress bar starts working. Scrubbing and start-up depend on more than the index: very long gaps between keyframes, odd timestamps, a server that doesn't answer HTTP range requests, or the player's own behaviour will each keep a video sluggish after a perfect faststart pass. And because web delivery is a server matter too, your page still has to serve the file as video/mp4 and support range requests; genuinely large videos usually want a smaller encode or a segmented format like HLS instead of a single progressive file.
Need the file to actually be smaller rather than faster to start? Compress Video re-encodes it instead.
The limits of this page
One file at a time, 50 MB maximum, MP4 in and MP4 out. It won't convert MOV, MKV or AVI into MP4 — that's a different job and this site doesn't have that page yet — it won't let you pick which tracks to keep, it won't preserve the shoot date, and it won't trim, mute or resize anything.
The whole file is read into memory when you click, with input and output both present inside the engine, so a large file on an older phone can run out of memory and end in an error. The structure check on pick is not affected: it reads only box headers, and the full read happens after the click.
Need to meet an upload size limit? Use Compress Video to Target Size to re-encode toward a target size.
Frequently asked questions
- What is a faststart MP4, and what is the moov atom?
- A faststart MP4 is one whose moov atom sits at the front of the file. The moov atom is the index: duration, track list and the map of which bytes hold which frame. A player streaming the file over HTTP needs that map before it can show anything, so when it sits at the end — the default for many encoders — playback waits for the download. Moving it to the front is what this tool does.
- Will optimizing make my MP4 smaller?
- No — this is not a compressor. Nothing is re-encoded, so the size barely moves: a 3,645,391-byte test clip came out 35 bytes smaller, about 0.001%. The one case where it shrinks noticeably is a file carrying extra tracks, because subtitles, timecode and cover art are dropped; a 513,989-byte sample with two audio tracks, a subtitle track and cover art lost 8.4% that way. For a genuinely smaller file, use a video compressor.
- Does it lose quality?
- No. The video and audio streams are copied bit for bit with ffmpeg's -c copy, so resolution, frame rate, bitrate, codec, channels and sample rate are exactly as they were. It cannot improve quality either: the encoded video and audio are copied without quality loss; container layout, retained tracks and metadata can change.
- How much faster will my video start after this?
- There is no single answer and this page doesn't quote one. The gain depends on file size, connection speed, whether your server answers HTTP range requests, and how the player behaves. The mechanism is what you can rely on: with the index at the end a progressive player has to reach the end of the file before it can read the map, and after the move it can read it immediately.
- Can faststart fix “moov atom not found”?
- No. Faststart moves an existing moov atom; it cannot rebuild a missing one. That error means the index is gone rather than misplaced — an interrupted recording or a half-finished download — so the run will probably fail. The page checks the structure when you pick the file, without needing the processing engine. The engine may download in the background while this check runs. A truncated file gets the same warning.
- Does it keep subtitles, cover art and the shoot date?
- No to all three. The arguments keep the first video track, every audio track and the chapters, and discard subtitle, data and timecode tracks plus any picture track after the first — which is where a cover image lives. Location (GPS) metadata is removed on every run, and the original creation_time isn't copied over, so a photo library may show today's date. Titles and comments are kept.
- Is my video uploaded to a server?
- No. The rewrite happens in your browser with ffmpeg.wasm, and the code has no server fallback — the fallback path is disabled and its function only raises an error, so nothing is ever sent. Closing the tab discards the file and the result.
- Can I convert MOV or MKV to MP4 here, or run several files at once?
- Neither. This page takes one .mp4 or .m4v up to 50 MB and returns an MP4; other containers are refused with a note. Changing container is a separate job and isn't on this site yet. For a batch, run the files one at a time.