Convert MTS to MP4 — Free Online Tool

Convert MTS files from Sony or Panasonic AVCHD camcorders into MP4, re-encoding the H.264 video stream with optimized CRF settings and transcoding AC-3 or AAC audio into widely compatible AAC — producing a file ready for web playback, editing, and sharing without proprietary container limitations.

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

MTS files use the MPEG-2 Transport Stream (M2TS) container, which wraps H.264 video alongside AC-3 or AAC audio in a format designed for broadcast and camcorder recording rather than general playback. During this conversion, FFmpeg re-encodes the video using libx264 with a CRF of 23, which recompresses the H.264 stream to ensure clean compatibility with the MP4 container — unlike a simple remux, this step eliminates transport stream artifacts and timestamp irregularities common in AVCHD footage. The audio is transcoded to AAC at 128k, replacing AC-3 surround sound (if present) or re-encoding existing AAC into a clean MP4-compatible stream. The -movflags +faststart flag relocates the MP4 index (moov atom) to the beginning of the file, enabling progressive streaming and immediate playback in browsers and video players before the full file has loaded.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, which handles demuxing the AVCHD MPEG-2 Transport Stream, decoding both the H.264 video and AC-3/AAC audio, and re-encoding them into the MP4 container.
-i input.mts Specifies the source MTS file — the raw AVCHD recording from your Sony or Panasonic camcorder. FFmpeg automatically detects the MPEG-2 Transport Stream container and identifies the H.264 video and audio streams inside it.
-c:v libx264 Re-encodes the video using the libx264 H.264 encoder, producing a clean H.264 stream properly structured for the MP4 container — necessary because the original H.264 stream in the MTS Transport Stream cannot be directly copied into MP4 without timestamp and container compatibility issues.
-c:a aac Transcodes the audio to AAC using FFmpeg's built-in AAC encoder, converting AC-3 Dolby Digital or existing AAC audio from the AVCHD stream into a universally compatible audio format for the MP4 container.
-crf 23 Sets the Constant Rate Factor for the libx264 encoder to 23, which is the standard default balancing visual quality against file size for typical camcorder footage — resulting in an output file noticeably smaller than the original MTS while remaining visually equivalent at normal viewing distances.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, which is appropriate for stereo dialogue and ambient sound from camcorder recordings. If your MTS contained AC-3 5.1 surround and spatial audio fidelity matters, increasing this to 192k or 256k is advisable.
-movflags +faststart Moves the MP4 moov atom index to the beginning of the output file after encoding completes, enabling progressive playback and immediate streaming of your converted camcorder footage in browsers, video players, and social media platforms without requiring the full file to be downloaded first.
output.mp4 Specifies the destination filename and triggers FFmpeg to use the MP4 (MPEG-4 Part 14) container for the output, which will hold the re-encoded H.264 video and AAC audio streams in a format compatible with virtually all modern devices and platforms.

Common Use Cases

  • Uploading camcorder footage from a Sony Handycam or Panasonic HC series directly to YouTube, Vimeo, or social media platforms that don't reliably accept raw MTS files
  • Importing AVCHD camcorder clips into video editing software like DaVinci Resolve, iMovie, or Premiere Elements that may struggle with the MPEG-2 Transport Stream container
  • Sharing family event recordings (weddings, graduations, school plays) shot on an AVCHD camcorder with family members who cannot play MTS files on their phones or computers
  • Archiving camcorder footage into a universally readable format before long-term storage, ensuring files remain playable on future devices without needing special software
  • Preparing camcorder interview or documentary footage for delivery to a client or post-production house in a standardized MP4 format with proper streaming metadata
  • Converting MTS clips recorded at events for embedding directly into a website or presentation where MP4 with faststart is required for inline browser playback

Frequently Asked Questions

Yes, there is a small quality loss because the H.264 video stream is re-encoded rather than copied. MTS files already contain compressed H.264 video, so transcoding them again is a generation loss. However, at the default CRF 23 setting, the visual difference from the original is negligible for typical camcorder footage at HD resolutions — you would need to pixel-peep at 1:1 to notice any degradation. If you need to minimize quality loss, lower the CRF value (e.g., to 18) at the cost of a larger output file.
While both MTS and MP4 can carry H.264 video, the MPEG-2 Transport Stream container packages the stream with broadcast-style timestamps, program tables, and sync markers that are incompatible with the MP4 (ISO Base Media File Format) container structure. Attempting a direct stream copy often produces files with broken timestamps, A/V sync drift, or playback failures. Re-encoding with libx264 produces a clean, self-contained H.264 stream properly formatted for the MP4 container with no timestamp irregularities.
AC-3 (Dolby Digital) audio is transcoded to AAC during this conversion. MP4 does support AC-3 in some contexts, but AAC is the universally compatible audio codec for MP4 across browsers, phones, smart TVs, and editing software. If your camcorder recorded 5.1 surround in AC-3, FFmpeg will downmix or re-encode all channels into AAC — the default 128k bitrate is suitable for stereo, but you may want to increase it to 192k or 256k if preserving multichannel spatial audio fidelity matters for your project.
The +faststart flag moves the MP4 moov atom (the file's index containing codec parameters, timing, and track information) from the end of the file to the beginning. By default, FFmpeg writes the moov atom at the end after the conversion completes. Moving it to the front means a video player or browser can begin decoding and playing the file immediately without downloading the entire file first — essential for web embedding, streaming servers, and social media uploads of your camcorder footage.
Adjust the -crf value in the command to control the quality-to-file-size tradeoff. Lower CRF values produce higher quality and larger files — use -crf 18 for near-lossless quality suitable for archiving original camcorder recordings. Higher values like -crf 28 reduce file size significantly at the cost of visible compression artifacts, which can work well for preview copies or web-optimized versions of long event footage. The full command with a higher quality setting would look like: ffmpeg -i input.mts -c:v libx264 -c:a aac -crf 18 -b:a 192k -movflags +faststart output.mp4
Yes — on Linux or macOS, you can batch process all MTS files in a directory with: for f in *.mts; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.mts}.mp4"; done. On Windows Command Prompt, use: for %f in (*.mts) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.mp4". This is particularly useful when offloading a full memory card from a camcorder that contains dozens of MTS clip files in the AVCHD directory structure.

Technical Notes

AVCHD MTS files present several specific challenges during conversion that differ from simpler container remuxing jobs. The MPEG-2 Transport Stream format uses a 90kHz clock with PCR timestamps designed for continuous broadcast streams, and camcorders often produce clips with discontinuous timestamps at recording boundaries — FFmpeg handles these with its default demuxer but re-encoding the video ensures clean PTS/DTS values in the output. MTS files may contain multiple program streams (useful in broadcast) but consumer camcorder footage typically has one video and one or two audio streams; this conversion captures the primary streams. If your camcorder recorded in AVCHD 3D or used dual recording modes, inspect your source file with ffprobe before converting. Subtitle and chapter data embedded in AVCHD recordings are not typically present in consumer MTS files and are not mapped by this command. The output MP4 fully supports subtitles and chapters if you want to add them post-conversion using additional FFmpeg -map flags. Metadata such as recording date may be preserved in stream metadata tags depending on your camcorder model, but geolocation or custom camera metadata embedded in proprietary AVCHD structures will not carry over to the MP4 output.

Related Tools