CPI File Documentation
Summary
A CPI (AVCHD Clip Information File) is a small binary sidecar that a Sony, Panasonic or Canon camcorder writes for every recorded clip. It holds technical metadata only — resolution, frame rate, stream attributes and a seek table — not video. The matching footage is the .mts or .m2ts file of the same name in the STREAM folder. Its MIME type is application/octet-stream. You do not open a .cpi directly; you keep the whole AVCHD folder intact.
Technical details
| Feature | Value |
|---|---|
| Full name | AVCHD Clip Information File |
| File extension | .cpi |
| MIME type | application/octet-stream |
| Format type | Binary clip-metadata sidecar (no video payload) |
| Part of | AVCHD folder structure (PRIVATE/AVCHD/BDMV/) |
| Location on card | BDMV/CLIPINF/ |
| Developer | Sony and Panasonic (AVCHD consumer HD camcorder standard) |
| Introduced | 2006 |
| Also used by | Canon, JVC and other AVCHD camcorders |
| Byte order | Big-endian |
| Type tag (offset 0) | HDMV (ASCII, varies by recorder generation) |
| Open standard | No — based on the Blu-ray BDMV clip-information model |
| Contains video | No — metadata only |
| Matching video file | .mts / .m2ts (same base name, in STREAM/) |
| Companion files | .mpls playlist, index files in BDMV/PLAYLIST/ |
| Video codec described | H.264/AVC (the codec of the stream it indexes) |
| Safe to delete | No — some editors need it to import the AVCHD folder |
| Related extensions | .mts, .m2ts, .mpls, .clpi, .bdmv, .tod |
What is a CPI file?
CPI stands for Clip Information. A .cpi file is a small binary metadata file that belongs to AVCHD, the high-definition camcorder format Sony and Panasonic introduced in 2006 and that Canon, JVC and others later adopted. On a camera’s memory card the recording is not a single video file but a fixed folder tree. The actual footage lives as .mts or .m2ts streams in a STREAM folder, and each clip has a same-named .cpi file in the neighbouring CLIPINF folder. The clip-information file records how to read and navigate its stream; it carries no picture data of its own.
This is deliberately the consumer-camcorder cousin of Blu-ray’s BDMV layout, where the equivalent file is .clpi. Because the format is derived from the Blu-ray clip-information model rather than published as an open specification, the exact byte layout is not officially documented for public use. What is known and reliable is the file’s role, its place in the folder tree, and the kind of fields it holds. The rest of this page describes that honestly and avoids inventing offsets the format does not guarantee.
Where a CPI lives: the AVCHD folder tree
A .cpi is meaningless in isolation. It only makes sense inside the AVCHD directory structure that the camera writes as one unit:
PRIVATE/
└─ AVCHD/
└─ BDMV/
├─ index.bdmv disc/volume index
├─ MovieObject.bdmv navigation object
├─ PLAYLIST/
│ └─ 00000.mpls playlist: which clips play, in what order
├─ CLIPINF/
│ └─ 00000.cpi CLIP INFORMATION for clip 00000 ← this file
└─ STREAM/
└─ 00000.mts the actual H.264/AC-3 video+audio
The five-digit stem ties the pieces together: CLIPINF/00000.cpi describes STREAM/00000.mts, and PLAYLIST/00000.mpls lists the order clips are shown. Some camcorders drop the PRIVATE/ layer and place BDMV/ at the card root. This one-to-one naming is why copying only the .mts files, or only the .cpi files, breaks an import: a non-linear editor that ingests through the AVCHD root expects the whole tree to be present and consistent.
What the clip-information file records
The .cpi is a big-endian binary index modelled on the Blu-ray .clpi structure. It groups its data into a few length-prefixed blocks, each covering one aspect of the stream it points at:
| Block | What it holds |
|---|---|
| Clip-info header | A type tag (commonly the ASCII string HDMV) plus a version, identifying the file as clip information |
ClipInfo / SequenceInfo | Stream type, application type and recording attributes for the matching .m2ts |
ProgramInfo | Codec, resolution (1080i / 720p), aspect ratio and frame rate of the video, and the audio stream attributes |
| CPI / EP map | An entry-point table mapping presentation time to byte positions in the stream, so the camera menu and players can seek quickly |
The most useful block for playback is the last one. The EP (entry point) map is a seek index: it lists selected points in the stream where a decoder can start cleanly, each tied to a presentation timestamp and a file offset. Without it a player would have to scan the whole .m2ts to jump to a time position. The ProgramInfo block is what lets an editor show a clip’s properties (say, 1920×1080 at 50i, H.264) before it has decoded a single frame.
Identifying a CPI reliably
Many AVCHD clip-information files begin with the ASCII tag HDMV (hex 48 44 4D 56) at offset 0, followed by a version. That tag is a good hint but not a guarantee: it varies across recorder generations, so a signature check alone can miss valid files. The dependable test is contextual. If a file has a five-digit numeric name, sits in a CLIPINF folder, and has a same-named .mts/.m2ts beside it in STREAM, it is an AVCHD clip-information file regardless of the exact first bytes. A tool such as MediaInfo reads the stream attributes without you ever opening the .cpi by hand.
One naming clash is worth flagging: .cpi is also used by MS-DOS and Windows for a completely unrelated Code Page Information file (such as EGA.CPI), which holds bitmap console fonts. That is a system file, not camcorder media, and has nothing to do with AVCHD despite the shared extension.
Using the footage a CPI points to
Because the .cpi is only an index, working with your recording means working with the stream it indexes. To play the video, open the matching .mts or .m2ts in VLC, which decodes AVCHD directly and needs no clip-information file. To edit, keep the AVCHD tree intact and import the whole folder into an editor such as PowerDirector, Premiere Pro, VEGAS Pro, iMovie or Final Cut; those tools read the .cpi and .mpls automatically to assemble the clips in order. AVCHD video is H.264, so remuxing a clip to an MP4 container (for example with HandBrake or ffmpeg) is often fast and near-lossless — but it is the .mts stream you convert, never the .cpi.
The corollary matters for recovery: if the video stream is gone and only the .cpi survives, the metadata cannot rebuild footage — there are no pictures inside it. The fix is to recover the .mts/.m2ts files from the card with data-recovery software, after which the clip information becomes usable again.
Frequently asked questions
Does a CPI file contain any video?
No. A clip-information file holds only metadata about its stream — resolution, frame rate, stream attributes and a seek table. The video and audio are entirely in the same-named .mts or .m2ts file in the STREAM folder.
Can I delete the CPI files to save space?
Better not to, while the clips still live on the card or in an AVCHD folder. They are tiny, and several editors import the footage through the AVCHD tree and expect the CLIPINF files to be present. Once you have copied or transcoded the video out to standalone files, the .cpi is no longer needed.
I only have the CPI file and my video is gone — can I get the footage back?
Not from the .cpi itself, because it stores no picture data. Run data-recovery software on the memory card to recover the .mts/.m2ts streams; the clip information is only an index into those streams.
References
- Wikipedia — AVCHD (folder structure and clip information)
- MediaInfo — inspect AVCHD stream metadata
- VideoLAN — VLC media player (plays AVCHD / MTS)
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.