Convert MP4 to MTS — Free Online Tool

Convert MP4 files to MTS (AVCHD), the MPEG-2 Transport Stream format used by Sony and Panasonic camcorders, by re-encoding video with H.264 (libx264) and audio with AAC. This is useful when you need footage in a broadcast-compatible or camcorder-native container that devices and editing suites expect from AVCHD workflows.

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

MP4 and MTS both support H.264 video, but they use fundamentally different container structures. MP4 uses an MPEG-4 Part 14 container with a flexible atom-based structure, while MTS wraps content in an MPEG-2 Transport Stream — a fixed-size packet format (188-byte packets) designed for broadcast and streaming robustness. Because the containers are incompatible, the video stream cannot simply be remuxed; it must be re-encoded using libx264 and the audio re-encoded with AAC. The output conforms to the AVCHD specification, making it readable by camcorder-aware software and devices. Notably, MP4 chapter markers and chapter metadata are dropped during this conversion since the MTS/AVCHD container does not support chapters.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all demuxing, decoding, encoding, and muxing for this MP4-to-MTS conversion pipeline.
-i input.mp4 Specifies the source MP4 file as input, telling FFmpeg to demux the MPEG-4 container and expose its H.264 video and audio streams for re-encoding.
-c:v libx264 Re-encodes the video stream using the libx264 H.264 encoder, which is required because the MP4 container's stream cannot be directly copied into the MPEG-2 Transport Stream structure even if the source codec is also H.264.
-c:a aac Encodes the audio using the AAC codec, which is one of the two audio formats supported by the AVCHD/MTS specification (alongside AC-3), and ensures compatibility with camcorder playback and NLE ingest.
-crf 23 Sets the Constant Rate Factor for the libx264 encode to 23, the default balanced setting; lower values (e.g., 18) produce higher quality MTS output at the cost of larger file size, which matters when starting from a lossy MP4 source.
-b:a 128k Targets an AAC audio bitrate of 128 kilobits per second in the output MTS file, which is adequate for stereo camcorder audio; increase to 192k or 256k if the source MP4 contains high-quality or multi-channel audio.
output.mts Specifies the output filename with the .mts extension, which tells FFmpeg to mux the encoded streams into an MPEG-2 Transport Stream container conforming to the AVCHD format used by Sony and Panasonic camcorders.

Common Use Cases

  • Preparing digitally produced or screen-recorded video for ingest into Sony Vegas or other NLEs that expect native AVCHD footage from Sony or Panasonic camcorders
  • Creating MTS files to copy onto a camcorder's SD card or memory stick so the camera can recognize and play back the footage through its own interface
  • Delivering footage to a broadcast workflow or hardware encoder that accepts MPEG-2 Transport Stream input but not MP4
  • Archiving a production in AVCHD format to match the native format of other footage from the same shoot recorded on a camcorder
  • Converting MP4 clips for use with Blu-ray authoring software that expects AVCHD-compliant MTS streams rather than MP4 sources

Frequently Asked Questions

Yes, some quality loss occurs because the video must be re-encoded from scratch even though both formats can use H.264. The default CRF value of 23 produces good general-purpose quality, but since you are starting from an already-compressed MP4 source, each re-encode introduces additional generation loss. For archival purposes, using a lower CRF value (such as 18) will minimize visible degradation at the cost of a larger file.
The MTS/AVCHD container format, based on the MPEG-2 Transport Stream specification, does not support chapter metadata. MP4 files can embed chapter markers as atoms in the container, but there is no equivalent structure in MTS, so chapter information is permanently lost during this conversion. If chapters are important, consider keeping the MP4 original for playback and using MTS only for workflows that require the AVCHD container.
Yes, adjust the -crf flag to control quality. CRF (Constant Rate Factor) ranges from 0 (lossless) to 51 (lowest quality), with 23 as the default. For higher quality output from your MP4 source, lower the value — for example, use -crf 18 for near-transparent quality. Use -crf 28 or higher if file size is a priority and some quality loss is acceptable. Audio bitrate can be changed by replacing 128k in -b:a 128k with values like 192k or 256k.
The MTS container does support subtitle tracks, but the default FFmpeg command shown here does not explicitly map subtitle streams. If your MP4 contains subtitle tracks and you need them in the output, you would need to add -c:s copy (or an appropriate subtitle codec) and ensure the streams are mapped with -map flags. Soft subtitles in MP4 are often stored as MOV_TEXT, which may require transcoding to a compatible format for the MTS container.
On Linux or macOS, you can run: for f in *.mp4; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mp4}.mts"; done. On Windows Command Prompt, use: for %f in (*.mp4) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.mts". This loops through every MP4 in the current directory and converts each one to MTS using the same settings as the online tool.
MTS and M2TS are nearly identical — both are MPEG-2 Transport Stream files used in the AVCHD specification, and they differ mainly in the file extension convention. MTS is typically used for files stored directly on a camcorder, while M2TS appears in Blu-ray AVCHD disc structures. Most software that reads one will read the other, and you can often rename the file extension without any re-encoding. The FFmpeg command produces a valid MPEG-2 Transport Stream regardless of which extension you use.

Technical Notes

Converting from MP4 to MTS involves a full transcode of both streams because the MPEG-2 Transport Stream container uses a rigid packetized structure incompatible with MP4's atom-based layout, even though both support the same H.264 video codec. The libx264 encoder uses the CRF rate control mode, which targets constant perceptual quality rather than a fixed bitrate — ideal for variable-motion camcorder footage. MTS files in AVCHD workflows typically carry audio as AC-3 (Dolby Digital) or AAC; this tool defaults to AAC for broad compatibility. One significant metadata limitation is the loss of MP4 chapter atoms, which have no equivalent in the MPEG-2 Transport Stream structure. The -movflags +faststart optimization used in MP4 production is not applicable here and is omitted. Multiple audio tracks from the source MP4 can be preserved by explicitly mapping streams, though the default command maps only the primary audio stream. File sizes may be larger or smaller than the source depending on the CRF setting and the efficiency of the original MP4 encode.

Related Tools