Quantum

Camera formats, containers, and codecs

At this point it is worth briefly recapping some key elements of media technology.

Most individual media files are based on a standard “container format”, like MOV, MP4, MXF, AVI, WMV, MKV, MTS etc. A container usually has multiple “tracks” or “streams”, most commonly video and audio, though other track types are possible too.

Each of those tracks or streams will be encoded using a particular “codec”:

Common video codecs include PhotoJPEG/M-JPEG, DV, Apple Intermediate, Apple ProRes, Avid DNxHD, MPEG-2 Video, AVC/H.264, AVC-Intra, and the new HEVC/H.265.

Common audio codecs include LPCM/Uncompressed, MP3, AAC, and MPEG-2 Audio.

A lot of these codecs (especially the MPEG codec family like MPEG-2, AVC/H.264, etc.) come in different flavours or “profile levels”, that define which frame sizes, frame rates, colour encodings (like YUV 4:2:0, 4:2:2 or 4:4:4), and most importantly what overall bit rate can be used. The profile level defines what complexity and performance of hardware (and how recent a software version) is required to decode it.

Finally, a particular camera will usually record files using a specific combination of the standard codecs and container formats above, but will actually generate a whole collection of files for each clip, not just a single movie file.

For example, the camera might write an MP4 file containing the video and audio, but also an XML file with non-realtime metadata (eg. codec specification, and camera serial number), a BMP or THM thumbnail, and a binary real-time metadata file (containing timecode and camera exposure details on a frame-by-frame basis). It

might also update an index file on the card with details about the new clip. For long recordings, typically those where the size of the media file goes over a 2GB file size limit, it will often start a new file when it hits that limit and create a “spanned clip” which needs to be played by concatenating the individual movie files. In the case of “op atom” formats used by P2 and Avid separate MXF files are written for the video and each audio channel.

In order to reliably import a clip that was recorded by a camera into the NLE editing software it is usually necessary to keep all the files for that clip, not just the main MP4 or MXF file that contains the movie itself, and also to preserve the original camera card directory structure. CatDV creates metaclips to keep all the files for one clip together. CatDV 12 extended this by introducing the idea of a camera card to link all the files from one card together and discourage users from archiving or moving some files but not others.

Some common camera card formats, and some key directory names and file extensions to help identify them, are summarised below:

P2

CONTENTS/VIDEO/*.MXF, CONTENTS/AUDIO, CONTENTS/CLIP, LASTCLIP.TXT, etc.

XAVC

XDROOT/Clip/*.MXF, *.XML, *.BIM, CUEUP.XML, DISCMETA.XML, MEDIAPRO.XML, etc.

AVCHD

PRIVATE/AVCHD/BDMV/STREAM/*.MTS, INDEX.BDM, MOVIEOBJ.BDM, *.CPI, etc.

Canon XF

CONTENTS/CLIPS001/XXX/*.MXF, *.XML, *.SIF, INDEX.MIF, etc.

XDCAM EX

BPAV/CLPR/XXX/*.MP4, *.SMI, *.XML, CUEUP.XML, MEDIAPRO.XML, etc.

XDCAM HD

Clip/*.MXF, *.XML, Sub/*.MXF, DISCMETA.XML, MEDIAPRO.XML, etc.

XAVC-S

MP_ROOT/101XXX/*.MP4, PRIVATE/M4ROOT/CLIP/*.MP4, etc.

Still cameras

DCIM/101XXX/*.JPG (plus *.MP4, *.THM, *.AVI etc.)

A lot of different factors therefore go to make what “format” a particular clip is in, and whether a particular player can play it!