Compress MKV
Compress one MKV up to 50 MB locally in your browser. Video is re-encoded to H.264; selected audio tracks, subtitles, fonts and chapters stay in MKV by default.
How to use
- Choose one MKV file: Drop a file onto the box or click to pick it. One file per run, up to 50 MB; anything larger is skipped with a note saying so. Other video formats are accepted too, but the page will point out that Compress Video suits them better.
- Read what is inside it: The page reads the file and lists the codec, resolution, audio tracks, subtitles and chapters it found. The first file of the session downloads about 31 MB of processing engine first, so give it a moment.
- Pick quality, resolution and tracks: Quality offers High (larger file), Recommended (balanced) and Smaller (size first). Set a Resolution cap if the picture is bigger than you need, untick any audio track you don't want, and leave Keep all subtitle tracks and font attachments ticked.
- Compress, check, save: Click Compress MKV. You can press Cancel at any stage. When it finishes you get the size before and after, a line for each thing that was kept or dropped, and Download — Save to device on a phone.
Compress MKV without losing subtitles
Compress one MKV up to 50 MB in your browser without uploading it. The output stays MKV, with video re-encoded to H.264. Embedded subtitles, fonts and chapters are kept by default; choose which audio tracks to retain.
As soon as you choose a file the page reads it once and lists what is inside: the video codec, the resolution, whether the picture is 10-bit or HDR, and how many audio tracks, subtitle tracks and chapters there are. Each audio track is listed with its own title, language, codec, channel layout, bitrate and whether it is flagged as the default — so a rip with an original soundtrack, a dub and a commentary track is three clearly labelled rows rather than a guess. That read needs the FFmpeg engine, so the first file of a session downloads roughly 31 MB of engine (ffmpeg.wasm with the multi-threaded FFmpeg core) before the list appears; after that it is already in the tab and the wait is gone.
The whole job runs on your own computer or phone. Processing stays in your browser; if it fails, the page reports an error. There is no server fallback anywhere in this code path, so a file your device cannot manage is never sent somewhere else to be processed. Close the tab and nothing remains.
Because re-encoding needs the multi-threaded core, which needs SharedArrayBuffer, these pages are served cross-origin isolated. If your browser withholds that capability — private windows and some in-app browsers do — you are told to open the page in an up-to-date Chrome, Edge or Firefox the moment you pick a file, before the 31 MB download starts rather than after it.
Cancel covers every stage: the engine download, the track read and the encode itself. Pressing it stops the worker and returns you to the form with no error line. One honest limitation: if you cancel while the engine is still downloading, that network request is not aborted — the page stops waiting for it, but the bytes already in flight keep arriving. Compress also stays pressable while the tracks are still being read; press it early and the run starts by itself with the defaults as soon as the list is ready, so you never have to click twice.
Why the output stays MKV
There is no output-format choice on this page: the result is always MKV, and that is the whole reason the page exists. Matroska is the container that can hold several subtitle tracks, several audio tracks, chapters and subtitle fonts side by side, and an MP4 cannot — PGS graphic subtitles have no place in MP4 at all, and ASS styling has nowhere to keep its fonts. A general video compressor that flattens everything to MP4 therefore throws those tracks away.
Subtitles here are stream-copied, so the subtitle format does not matter: SRT and ASS text subtitles and PGS-style graphic subtitles all take the same path, because copying a stream is independent of how it is encoded. They are never burned into the picture, and your player still switches them on, off and between languages exactly as before. On a test file carrying one SRT track tagged chi and one ASS track tagged eng, both came back out of the compressed MKV unchanged, with their codecs and language tags intact; the same copy path applies to graphic subtitles, although we have not measured a real PGS file.
Font attachments ride along with the subtitles — that is where the typeface an ASS subtitle asks for actually lives, which is why ASS styling looks right on a device that has never seen that font. The one thing to know is that attachments are tied to the same tick box: untick Keep all subtitle tracks and font attachments and the fonts go with them. Chapters are different again. They are always carried over, whatever else you change, so chapter titles and their start and end times survive even a run with the subtitles switched off.
Track-level language and title tags travel with their streams too, so a track labelled "Director's commentary" or tagged eng is still labelled and tagged in the result. If you do not need any of this and would rather have the broadest possible compatibility in a single MP4, that is a different job.
Don't need the subtitle and chapter tracks? Compress Video does the same H.264 encode and writes MP4.
Which quality, resolution and audio setting to choose
High → CRF 23 → keep detail Recommended → CRF 28 → starting point Smaller → CRF 32 → size first Up to 1080p / 720p → cap on the short edge Keep as they are → audio copied, not re-encoded Convert to AAC → stereo 128 kbps, 5.1 and above 384 kbps Desktop FFmpeg reference only: synthetic 6.61 MiB MKV, 1920×1080, 30 fps, 6 seconds; all tracks kept. High / original: 4.29 MiB Recommended / original: 2.36 MiB Smaller / original: 1.71 MiB Recommended / 720p: 1.04 MiB
Quality is a constant rate factor (CRF), the number H.264 uses to decide how much data each scene deserves. A higher CRF generally uses less video data at the cost of detail; compare the output size for your file. Start on Recommended and only step down if the result still doesn't fit.
The resolution cap applies to the short edge of the picture, so Up to 1080p limits a landscape clip to 1080 pixels tall and a portrait one to 1080 wide. It only ever shrinks: a video already below the cap is never enlarged, and the page only offers a cap it could actually apply — on a 720p file, Keep original resolution is the only option and the whole block disappears. If the short edge is above 1080 the page starts you on Up to 1080p, because re-encoding a 4K picture in a browser tab is slow in a way that lowering the resolution genuinely fixes. Note that Keep original resolution is not quite pixel-for-pixel: odd dimensions are rounded down to even numbers, so 641×481 comes out as 640×480.
Audio is where an MKV often hides most of its weight. Every track is ticked by default and copied byte for byte, so nothing is re-encoded and nothing is lost. Untick a track and it is simply not written — dropping a 5.1 commentary track you will never play costs the picture nothing. Untick all of them and the result is silent, which the page warns you about before you start. The Audio choice only appears when a track you kept is not already AAC; converting re-encodes those tracks at 128 kbps for mono and stereo, and 64 kbps per channel up to a ceiling of 384 kbps for anything bigger, while tracks that are already AAC are still copied.
Whether converting to AAC is worth it depends entirely on the bitrate of the source track. Lossless and high-bitrate formats such as TrueHD or DTS commonly run from roughly 1.5 to 6 Mbps, and replacing one of those with a 384 kbps AAC track removes real weight. In our synthetic test, converting a 384 kbps AC3 5.1 track to AAC left the total file size at about 2.36 MiB; savings on other files depend on the source bitrate.
The figures above come from desktop FFmpeg run on exactly the parameters this page uses, not from the browser, and the source was a six-second test pattern already encoded as modest H.264. Treat them as a reference measured under those conditions rather than a compression ratio to expect: real footage, and especially a high-bitrate HEVC rip, behaves differently, and the page shows you the before and after size of your own file.
What is kept and what is dropped
Kept by default: the first real video track, re-encoded to H.264; every audio track, copied untouched unless you untick it or convert it; every embedded subtitle track, copied untouched; font and other attachments; all chapters with their titles; the language and title tags on each track; and the date the video was shot, which is written back deliberately so players and photo libraries still sort the file by time.
Dropped by default: GPS coordinates, device make and model, and the name of the software that produced the file — the privacy-relevant part, and the main reason to run a clip through this page before sharing it. Untick Remove location, device model and other recording details if you want to keep them. Data and timecode tracks are dropped, and so is any video track beyond the first, which includes a cover-image track. If a file genuinely contains two picture versions, only the first is written.
The original picture codec and bit depth are not kept. Output is always 8-bit H.264 in YUV 4:2:0, so HEVC, AV1, VP9 and 10-bit sources all come out as 8-bit H.264 — there is no lossless mode, no "change the container only" option and no H.265 output. Lowering the bit depth is not the same as converting HDR to SDR, and this tool does not do the latter: the filter chain scales and sets the pixel format, and FFmpeg treats tone mapping as a separate operation that is not applied here. HDR footage can therefore look grey or flat in the compressed copy, which the page warns about when it detects HDR. Keep the original of anything graded in HDR.
Subtitles are all or nothing. You can pick individual audio tracks, but there is no way to keep three subtitle tracks out of twelve, no way to convert a subtitle format, and no way to burn subtitles into the picture. Chapters cannot be selected or retitled either — they are simply carried over.
Limits worth knowing before you start
The hard limit is 50 MB per file, which means a full-length film is out of scope: a 1080p feature is routinely several gigabytes. What fits comfortably is the kind of MKV that is already short — a single clip, a trimmed scene, a stream recording cut down to a few minutes, a sample pulled out of a larger file. One file per run; there is no batch mode, and the page offers no way to trim or split a file to get it under the limit.
Other video formats are accepted, because the engine reads anything FFmpeg understands, but the output is still MKV and the page says plainly that Compress Video fits them better. A file that is really audio-only is caught after the read, with a note that no video track was found. A damaged, truncated or mislabelled file fails at the same point, telling you it isn't a video we can read. And if the browser runs out of memory or the encoder gets stuck part-way, the run reports that it could not finish — nothing is uploaded as a consolation prize. A failed encode is automatically retried once with faster, less demanding encoder settings before giving up, and a run that stops producing any activity for over a minute is treated as stuck and stopped rather than left hanging.
There is no target-size setting here. Adjust quality, cap the resolution, remove unwanted audio tracks, or convert high-bitrate audio to AAC, then compare the resulting size. If a fixed ceiling is the actual requirement, a target-driven encode is the better fit — bearing in mind that it writes MP4, which is exactly the trade-off described above.
Need the file under an exact size limit instead? Use Compress Video to Target Size.
Frequently asked questions
- Will my subtitles survive compressing an MKV here?
- Yes, by default. Every embedded subtitle track is stream-copied into the new MKV without being re-encoded or burned into the picture, so you can still switch languages and turn subtitles off while playing. Because it is a plain stream copy, SRT, ASS and graphic formats such as PGS all travel the same way. Only unticking "Keep all subtitle tracks and font attachments" removes them.
- Can I compress a whole movie with this?
- No. Files larger than 50 MB are skipped, and a full-length 1080p film is usually several gigabytes. This page is for short MKVs — a clip, a trimmed scene, a few minutes of a recording. It cannot trim or split a file for you, so a feature-length file needs a desktop tool.
- Do I get an MKV back, or an MP4?
- Always an MKV. There is no output-format option, because MKV is what makes keeping several subtitle and audio tracks, chapters and subtitle fonts possible in the first place. If you want an MP4, use Compress Video instead and expect subtitle tracks to be dropped.
- Can I keep only one audio track and drop the rest?
- Yes. Every audio track in the file gets its own tick box, labelled with its title, language, codec, channel layout and bitrate, and all of them start ticked. Untick the ones you don't want and they are not written to the result. In a reference run, dropping one 384 kbps AC3 5.1 track took a 2.36 MiB result down to 2.09 MiB with no change to the picture.
- Should I convert a DTS or TrueHD track to AAC?
- Only if that track is large. Converting re-encodes the audio at 128 kbps for stereo and up to 384 kbps for 5.1 and above, so a TrueHD or DTS track running at 1.5 Mbps or more loses real weight. In our synthetic test, converting a 384 kbps AC3 5.1 track to AAC left the total file size at about 2.36 MiB; savings on other files depend on the source bitrate.
- How much smaller will my MKV get?
- There is no fixed compression ratio. In a desktop FFmpeg reference run on a synthetic 6.61 MiB, six-second 1080p MKV, Recommended produced 2.36 MiB at the original resolution and 1.04 MiB with the 720p cap. Real footage can differ, and the result can be larger than the original.
- Are chapters and subtitle fonts kept?
- Chapters are always kept, with their titles and timings, no matter what else you change. Font attachments are kept too, but they are tied to the subtitle tick box: if you remove the subtitle tracks, the fonts go with them. That matters for ASS subtitles, which rely on the attached font to look the way they were styled.
- Is my video uploaded anywhere?
- No. The file is read and re-encoded inside your browser tab by ffmpeg.wasm, and there is no server fallback in this code path at all — a file your device cannot handle fails with a message rather than being sent away. GPS coordinates and device model are also stripped from the output by default. Close the tab and nothing is left behind.
- Why does the page tell me to use a different browser?
- Re-encoding needs multi-threaded processing, which needs SharedArrayBuffer and cross-origin isolation. Private windows and some in-app browsers switch that capability off, and the single-threaded engine cannot re-encode at all. Open the page directly in an up-to-date Chrome, Edge or Firefox and reload. The check runs as soon as you pick a file, so you are never made to wait for the 31 MB engine download first.