Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In BDAV's M2TS there are .clpi files, in AVCHD the same files are labeled as .CPI. As i understand, some sort of metadata is written into these files. The question is twofold:

  1. What metadata exists in these files? (both 'by the standard' and 'de facto', if there are differences)
  2. Are there any free/libre/open-source software tools that are able to extract this metadata from them?

An example of such a file is here.

share|improve this question
@BartArondson, Interesting link, but that is talking about something that is within the m2ts file itself, some sort of switch in a stream, for me CPI files are getting generated by my camcoder, i have definitely set no copyright protection on anything. – v010dya Dec 10 '13 at 19:23
up vote 2 down vote accepted

As Professor Sparkles has correctly pointed out (I've just checked and confirm) — the MediaInfo tool can extract some metadata from these files. Here is a sample output from one of mine:

Complete name                            : /Volumes/CAM_SD/PRIVATE/AVCHD/BDMV/CLIPINF/00119.CPI
Format                                   : Blu-ray Clip info
File size                                : 502 Bytes

ID                                       : 4113 (0x1011)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 50.000 fps

ID                                       : 4352 (0x1100)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Language                                 : English

ID                                       : 4608 (0x1200)
Format                                   : PGS
Language                                 : English

(But note that it can output more details in the --full mode.)

Also, it may be helpful to note that the AVCHD standard is proprietary and its spec is not publicly available. Attempts to reverse-engineer its components exist, and one of them is in this forum thread (from 2008):

share|improve this answer

Did some quick research on the Internet and found this:

File extension CPI is AVCHD Video Clip Information File. The AVCHD directory contains a folder for clipinfo which contains one .cpi file for each .mts file in the stream folder. cpi (clip info) contains various contains metadata describing an AVCHD video stream, such as the frame rate, frames per second, and aspect ratio. The video and audio is stored in the mts/m2ts (Transport Stream) files.

It would appear that basic metadata about the camera (frame rate, aspect ratio, etc.) is saved in this format. You might be able to use ffdshow (open source) or similar to extract the metadata.

share|improve this answer
Ffdshow, as i understand it, is a Windows only package. I could try it out under wine of course, but can somebody with Windows confirm that it does actually report something like that from the file i've added as an example. – v010dya Jan 8 '14 at 6:40
MediaInfo should be able to handle these files aswell. – Professor Sparkles Jun 3 '14 at 23:41
Pavtube is a GPL violator. – LordNeckbeard Jan 10 '15 at 1:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.