Convert HEVC to M2TS — Free Online Tool

Convert HEVC/H.265 video files to M2TS (Blu-ray BDAV) format, re-encoding the video stream to H.264 using libx264 for maximum compatibility with Blu-ray players, AVCHD devices, and broadcast systems. This conversion trades H.265's compression efficiency for the near-universal hardware support of H.264 within the transport stream container.

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

HEVC source files store video in H.265 encoding, which the M2TS container can technically hold but which most Blu-ray players and AVCHD devices do not support in practice. This conversion re-encodes the video stream from H.265 to H.264 (libx264) at CRF 23 — a moderate quality setting that balances file size and visual fidelity. Since HEVC files typically carry no audio stream (they are raw video), AAC audio is initialized as the output audio codec at 128k bitrate to satisfy the M2TS container's expectation of an audio track. The result is a fully spec-compliant BDAV transport stream with a .m2ts extension, ready for use with Blu-ray authoring tools, AVCHD-compatible camcorder workflows, or broadcast ingest pipelines.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that performs the HEVC-to-M2TS transcode. In the browser, this runs as a WebAssembly (FFmpeg.wasm) build with no server involvement.
-i input.hevc Specifies the input file — a raw HEVC elementary stream containing H.265-encoded video with no audio or container metadata. FFmpeg reads this bare video bitstream as the source for transcoding.
-c:v libx264 Selects libx264 as the video encoder, re-encoding the H.265 video stream to H.264 (AVC). This is necessary because the M2TS/Blu-ray ecosystem has near-universal H.264 hardware support but very limited H.265 compatibility.
-c:a aac Sets the audio codec to AAC for the M2TS output. Since raw HEVC files contain no audio, this ensures the output transport stream has a valid, well-formed audio track as expected by Blu-ray players and AVCHD-compatible devices.
-crf 23 Sets the Constant Rate Factor for the H.264 encode to 23, which is libx264's default quality level. Lower values (e.g., 18) produce higher quality and larger files; higher values (e.g., 28) compress more aggressively with greater quality loss.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a standard quality level sufficient for stereo audio in Blu-ray and broadcast M2TS files. Since the HEVC source has no audio, this controls the quality of the silent or generated audio track in the output.
output.m2ts Defines the output filename with the .m2ts extension, telling FFmpeg to wrap the encoded H.264 video and AAC audio into a BDAV MPEG-2 Transport Stream container — the standard format for Blu-ray disc video and AVCHD recordings.

Common Use Cases

  • Preparing H.265 footage from a modern camera or drone for import into Blu-ray authoring software like Sony Vegas or Nero Blu-ray, which requires M2TS-wrapped H.264
  • Converting HEVC recordings to a format compatible with AVCHD camcorder folder structures so they can be played back on consumer Blu-ray players
  • Delivering high-definition video to broadcast or digital signage systems that accept MPEG-2 Transport Stream input but lack H.265 decoding capability
  • Archiving H.265 video content in M2TS format to ensure long-term playback compatibility on legacy Blu-ray disc hardware without relying on software decoders
  • Creating M2TS files from HEVC source material for use with video editing timelines that have established Blu-ray or transport stream workflows
  • Transcoding HEVC surveillance or security camera footage to H.264 in a transport stream container for ingestion into broadcast-grade monitoring systems

Frequently Asked Questions

Yes, this is a lossy transcode — the video is decoded from H.265 and re-encoded to H.264, which is a generation of quality loss. H.264 at the same visual quality level also requires a higher bitrate than H.265, so the output M2TS file will typically be larger than the original HEVC source. The default CRF 23 setting produces visually good results for most content, but if your source is already compressed HEVC footage, each re-encode accumulates artifacts. Use the lowest CRF value you can tolerate for quality-critical work.
While H.265 video can technically be wrapped in an MPEG-2 Transport Stream, virtually no consumer Blu-ray players and very few AVCHD devices support HEVC decoding from an M2TS file. The Blu-ray specification is built around H.264 (AVC) as its primary video codec, so converting to H.264 ensures the widest compatibility with the devices and software that specifically use M2TS. If you need to preserve H.265 encoding and your target system supports it, you would need a different container like MKV or MP4.
Raw HEVC (.hevc) files are often bare video streams with no embedded audio track. The M2TS container is designed as a multiplexed transport stream that typically includes both audio and video, and some players and authoring tools may reject or mishandle an M2TS with no audio stream. Including the AAC codec flag ensures a valid audio track is present in the output — FFmpeg will produce a silent audio track if no source audio exists, keeping the container well-formed and broadly compatible.
Adjust the -crf value in the command to control H.264 output quality. Lower numbers mean higher quality and larger files — CRF 18 is often considered visually near-lossless for H.264, while CRF 28 produces noticeably smaller files with more compression artifacts. The default CRF 23 is a reasonable middle ground. For example, to increase quality run: ffmpeg -i input.hevc -c:v libx264 -c:a aac -crf 18 -b:a 128k output.m2ts
Yes. On Linux or macOS you can use a shell loop: for f in *.hevc; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.hevc}.m2ts"; done. On Windows Command Prompt use: for %f in (*.hevc) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.m2ts". This is particularly useful for batch converting HEVC footage from a camera session into M2TS files for Blu-ray authoring. The browser-based tool processes one file at a time, so the FFmpeg command is recommended for large batches.
M2TS does support subtitle streams, and if you add subtitle input to the FFmpeg command you can include them in the output. However, raw HEVC files carry essentially no metadata — no title, author, chapter markers, or embedded subtitles — so there is nothing to preserve from the source in this specific conversion. If you need to add subtitle tracks to the M2TS output, you would need to provide a separate subtitle file and extend the FFmpeg command with the appropriate -c:s and input flags.

Technical Notes

HEVC (.hevc) is a raw elementary stream format — it contains only compressed H.265 video data with no container structure, meaning it carries no audio, no metadata, no chapters, and no subtitle tracks. M2TS is a packetized transport stream container derived from the MPEG-2 TS specification and defined in the Blu-ray BDAV standard, designed to multiplex video, audio, and data streams for disc-based and broadcast delivery. The conversion from HEVC to M2TS necessarily involves a full video transcode from H.265 to H.264 because Blu-ray hardware compatibility requires AVC/H.264 as the video codec. H.265 offers roughly 40–50% better compression than H.264 at equivalent quality, meaning the M2TS output will be noticeably larger than the HEVC source for the same perceived quality level. The libx264 encoder used here is the industry-standard open-source H.264 implementation and produces output fully compliant with Blu-ray AVC requirements. The M2TS container also supports multiple audio tracks, which is useful for authoring multi-language discs — the FFmpeg command can be extended with additional -map flags and audio inputs to include extra tracks. One known limitation is that the M2TS format does not support chapter markers via this conversion path, and HDR metadata present in the HEVC source (such as HDR10 or Dolby Vision tone mapping) will be lost during the H.264 transcode since H.264 in standard Blu-ray profiles does not carry HDR signaling.

Related Tools