Compress M2TS Online — Free File Size Reducer

Compress M2TS files within the BDAV MPEG-2 Transport Stream container, re-encoding video with H.264 (libx264) at CRF 23 and audio with AAC at 128k to significantly reduce file size while preserving Blu-ray and AVCHD compatibility. Ideal for archiving camcorder footage or trimming oversized Blu-ray rips without changing the container format.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

Because the input and output are both M2TS, the container itself does not change — but this tool performs a full re-encode of both the video and audio streams rather than a simple remux. The video is decoded from its original codec (commonly H.264 or MPEG-2 as found on Blu-ray and AVCHD sources) and re-encoded using libx264 with a Constant Rate Factor of 23, which is a perceptually balanced quality setting that typically yields substantial file size reduction compared to the high-bitrate streams found in native Blu-ray or camcorder M2TS files. The audio is simultaneously transcoded to AAC at 128 kbps. Subtitle tracks embedded in the M2TS stream are preserved where possible, and multiple audio tracks in the source are handled according to FFmpeg's default stream selection. The resulting M2TS file remains compatible with Blu-ray players and AVCHD-aware software.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary, the open-source multimedia processing engine that handles all decoding, re-encoding, and container muxing for this M2TS-to-M2TS compression.
-i input.m2ts Specifies the source M2TS file — a BDAV MPEG-2 Transport Stream as produced by Blu-ray discs or AVCHD camcorders — as the input to be decoded and compressed.
-c:v libx264 Re-encodes the video stream using the H.264 encoder (libx264), which is natively compatible with both AVCHD and many Blu-ray players and produces excellent compression efficiency compared to the high-bitrate MPEG-2 or raw H.264 streams often found in source M2TS files.
-crf 23 Sets the Constant Rate Factor for libx264 to 23, the default balanced quality point where perceptual quality is high but bitrate is substantially lower than a typical Blu-ray or AVCHD source; lower values (e.g., 18) preserve more detail while higher values (e.g., 28) compress more aggressively.
-c:a aac Transcodes the audio stream — which in a Blu-ray or AVCHD M2TS source may be lossless TrueHD, DTS-HD MA, or LPCM — to AAC, a widely compatible lossy codec supported natively by the M2TS container and most Blu-ray-capable devices.
-b:a 128k Sets the AAC audio bitrate to 128 kbps, a standard quality level for stereo audio that produces transparent sound for most listeners while keeping the audio portion of the compressed M2TS file small.
output.m2ts Specifies the output file as an M2TS container, preserving the BDAV MPEG-2 Transport Stream format so the compressed result remains compatible with Blu-ray players, AVCHD software, and broadcast-aware media tools.

Common Use Cases

  • Compressing raw AVCHD camcorder M2TS footage to a manageable size for long-term archiving on external drives without converting to a different container
  • Reducing the file size of a Blu-ray rip stored as M2TS so it fits on a smaller USB drive while remaining playable on a Blu-ray player or media center like Kodi
  • Re-encoding high-bitrate M2TS broadcast captures from a TV tuner card to free up disk space while keeping the transport stream format intact for compatibility with broadcast editing tools
  • Preparing compressed M2TS copies of home videos for sharing with family members who use AVCHD-compatible Blu-ray players or Sony handycam software
  • Batch-reducing the size of a multi-episode Blu-ray M2TS library before streaming them locally via a home media server such as Plex or Jellyfin
  • Lowering the bitrate of an M2TS file captured from a high-end camera before uploading to a video editing workflow where storage quotas are limited

Frequently Asked Questions

Yes, re-encoding always introduces some generation loss because the original high-bitrate stream — often 20–40 Mbps on Blu-ray — is decoded and re-compressed at a much lower bitrate using H.264 CRF 23. At CRF 23 the visual difference is typically imperceptible for most content, but it is not lossless. If you need to preserve every bit of the original quality, you would need to use a lossless CRF value of 0 or stream-copy the video, though the latter defeats the purpose of compression.
FFmpeg does attempt to map subtitle streams from the M2TS source, and the M2TS container format supports subtitles, so embedded subtitle tracks such as PGS (Presentation Graphic Stream) subtitles common on Blu-ray may be preserved. However, the default FFmpeg stream selection may not automatically include all subtitle tracks depending on the source. For guaranteed subtitle retention across all tracks when running the command locally, add '-map 0' before the output filename to explicitly copy every stream.
High-definition Blu-ray M2TS files frequently carry lossless audio codecs like Dolby TrueHD, DTS-HD MA, or LPCM, which are not compatible with the AAC output specified in this compression command. FFmpeg will decode whichever audio stream it selects by default and re-encode it to AAC at 128 kbps, which is a significant reduction from lossless. If your source has multiple audio tracks — for example, a lossless surround track plus a stereo commentary — only the highest-priority track is encoded by default unless you use '-map 0:a' to capture all audio streams.
The '-crf 23' value controls the video quality-to-size tradeoff. Lower CRF values (e.g., '-crf 18') produce higher quality at larger file sizes, while higher values (e.g., '-crf 28') compress more aggressively at the cost of visible quality. For audio, replace '-b:a 128k' with a higher value like '-b:a 192k' or '-b:a 256k' if you want better audio fidelity, or lower it to '-b:a 96k' for maximum audio compression. Both adjustments can be made directly in the command shown on this page.
Yes — replacing '-c:v libx264' with '-c:v libx265' will encode the video using HEVC, which typically achieves the same visual quality as H.264 at roughly half the file size. When using libx265 the CRF scale differs slightly; a CRF of 28 with libx265 is roughly equivalent to CRF 23 with libx264. Note that HEVC-encoded M2TS files may not be supported by older Blu-ray players or AVCHD devices, so test playback compatibility before committing to this approach.
The command shown processes a single file, but on a desktop you can batch process M2TS files using a shell loop. On Linux or macOS, run: 'for f in *.m2ts; do ffmpeg -i "$f" -c:v libx264 -crf 23 -c:a aac -b:a 128k "compressed_$f"; done'. On Windows Command Prompt use a 'for %f in (*.m2ts)' loop with the same flags. Files over 1GB are best handled this way locally rather than through the browser-based tool.

Technical Notes

M2TS wraps video and audio in MPEG-2 Transport Stream packets with a 4-byte timestamp prefix (the 'BD' or 'BDAV' header), distinguishing it from a plain .ts file. When compressing M2TS to M2TS, FFmpeg correctly handles this container framing. The libx264 encoder with CRF 23 is broadly compatible with Blu-ray players and AVCHD software since H.264 is the native codec for AVCHD and is widely supported on Blu-ray hardware. However, the M2TS container does not officially support chapter markers, so any chapter metadata in the original Blu-ray structure will not be retained. Transparency is not applicable to M2TS. Multiple audio tracks are supported by the container, but FFmpeg's default behavior selects only the best single audio track unless explicit stream mapping is added. If the source M2TS contains variable-frame-rate video (common in some AVCHD camcorders), libx264 will encode it as constant frame rate, which may alter timing slightly. For very high-bitrate Blu-ray sources (above 30 Mbps), even CRF 23 can produce a dramatically smaller output — often 70–80% smaller — making this compression approach effective for archival use.

Related Tools