What is an MTS File?
An MTS file is an MPEG transport stream file, commonly produced by AVCHD cameras. Camera recordings use the Blu-ray-derived variant whose 192-byte source packets add a four-byte timestamp header to each standard 188-byte packet. The stream stores compressed video, audio, timing information, and related stream data in a transmission-oriented container.
How MTS Files work
Files ending in .mts are typically camera-recorded transport streams inside an AVCHD directory structure. AVCHD reuses the Blu-ray BDMV layout with short 8.3 file names, so .MTS is the short form of .m2ts and the two extensions do not indicate different containers. The stream packetizes video and audio with clock references, timestamps, and stream tables, and in AVCHD recordings each 188-byte transport packet is preceded by a 4-byte extra header that holds a 30-bit timestamp and two copy-control bits. AVCHD adopts MPEG-4 AVC/H.264 video with either compressed Dolby Digital or uncompressed linear PCM audio. Playlist and clip-information files elsewhere in the card hierarchy describe the recordings, so a standalone stream is not the whole camera package. In post-production, ingest software detects the packet size first, because the sync byte of a 192-byte source packet sits at offset 4, and then probes the codecs before preserving, remuxing, or transcoding according to editor support.
Key facts
- 1AVCHD places MTS clips under
BDMV/STREAM, next toPLAYLISTandCLIPINFdirectories, which is the Blu-ray layout with 8.3 names (.MTS,.MPL,.CPIfor.m2ts,.mpls,.clpi). In the Blu-ray format each stream file has exactly one clip information file holding the timestamps of its access points, and playlists refer to clips. Copying only the MTS files discards that data, which players and tools that navigate by playlist rely on. - 2Do not infer the packet size from the suffix. FFmpeg’s transport stream demuxer measures whether a file uses 188-, 192-, or 204-byte packets, and TSDuck notes that auto-detection can fail in rare cases when the first timestamp begins with the sync value
0x47. In the other direction, FFmpeg registersmtsfor its transport stream muxer but switches to 192-byte packets automatically only for a.m2tsoutput name, so an.mtsfile it writes has plain 188-byte packets unlessmpegts_m2ts_modeis enabled. - 3The AVCHD format adopts H.264 video with Dolby Digital (AC-3) or linear PCM audio. The audio channel count depends on the camera model: Sony’s Handycam guide lists Dolby Digital 2-channel for some models and 2-channel or 5.1-channel for others. The suffix guarantees none of this, since any transport stream can be saved under
.mts. Read the stream types and audio channel layout from the file before choosing between remuxing and transcoding. - 4One long recording can span several MTS files: Sony documents an AVCHD file size limit of about 2 GB, after which the camera starts a new file automatically. Transport streams with the same codecs and codec parameters can be joined at the file level, but timestamps are not guaranteed to continue across separately recorded clips. MPEG-2 systems permits time-base discontinuities, FFmpeg flags the format as allowing them, and the 33-bit, 90 kHz presentation timestamp wraps after about 26.5 hours. Check timestamps after joining clips.
When MTS Files matter
Inspect the packet size and codecs of MTS files before moving camera footage into editing or web-delivery workflows. Copy the whole AVCHD folder, not only the clips, and expect one long recording to arrive as several files. Remux compatible streams to avoid quality loss, or transcode when the target editor or player lacks support.
How Transloadit helps with MTS Files
Transloadit’s audio and video formats table lists mpegts (MPEG-2 Transport Stream) as a format its FFmpeg-based Robots, such as /video/encode, can read and write.
The table is paginated and sorted by name, so the mpegts row is on a later page. It does not mention 192-byte AVCHD packets or AVCHD folders, so test with your own camera files.
Explore Transloadit’s file formats & compression capabilities
Sources
- Blu-ray Disc Association white paper, BD-ROM Audio Visual Application Format (2011): 2.1.5 Clip, directory structure, 3.1 BDAV MPEG-2 Transport Stream
- ITU-T H.222.0 | ISO/IEC 13818-1, MPEG-2 Systems: transport stream packets, PTS, discontinuity_indicator
- libbluray disc.c: AVCHD 8.3 file name mapping (.MTS, .MPL, .CPI, .BDM)
- FFmpeg n8.0 mpegts.c: transport stream packet size detection (188, 192, 204)
- FFmpeg n8.0 mpegts.h: packet size constants (204, 192, 188)
- FFmpeg n8.0 mpegtsenc.c: m2ts mode selected by output name; muxer extensions
- TSDuck User’s Guide: transport stream file formats (TS, M2TS) and auto-detection
- Sony Cyber-shot User Guide: AVCHD format (video and audio coding)
- Sony Handycam User Guide: About the AVCHD format (audio signal by model)
- Sony Help Guide: File Format (movie), AVCHD file size limit
- FFmpeg wiki: Concatenating media files (concat protocol for MPEG-2 transport streams)