Common Clip Format
Proposal for a common video clip format for simple sharing of video data between applications.
---
Clip format proposal --salsaman, Mon, 11 Dec 2006 21:29:50 +0100 reply
Here is my original proposal. Note that the file can be parsed as-is, by searching for a line starting <section>, or it can be embedded in an xml template and then parsed by an xml parser.
Common clip format proposal v1.0
Video: a sequence of jpeg or png*, numbered consecutively 00000001.jpg, 00000002.jpg, etc. for jpeg, and 00000001.png, 00000002.png, etc. for png.
(In future we could consider using tiff files as well.)
Audio: a raw pcm file, channels are interleaved if applicable. File name is just "audio".
header.clip file: a header file with the following contents:
<header_version>
integer: currently 100 for this version
</header_version>
<bpp>
integer: number of bits per pixel (usually 24)
</bpp>
<frames>
integer: number of frames in the clip
</frames>
<pb_frame>
(optional) integer: frame to start playback from
</pb_frame>
<width>
integer: image width in pixels
</width>
<height>
integer: image height in pixels
</height>
<unique_id>
int64 : a randomly assigned 64 bit integer, used to uniquely identify
the clip
</unique_id>
<fps>
double: frames per second, must be >0, may be omitted or 0 if frames is 0
</fps>
<pb_fps>
(optional) double: playback frames per second (can be 0 or negative)
</pb_fps>
<audio_channels>
integer: number of audio channels (0,1 or 2). 0 means no audio
</audio_channels>
<audio_rate>
integer: audio rate (Hz). May be ommitted or 0 if audio_channels is 0
</audio_rate>
<pb_audio_rate>
(optional) integer: audio rate (Hz) for playback - may be negative
</pb_audio_rate>
<audio_sample_size>
integer: audio sample size in bits (16 or 8). May be ommitted or 0 if audio_channels is 0
</audio_sample_size>
<audio_signed>
boolean: if audio is signed, value is "true", otherwise "false". May
be ommitted if audio_channels is 0
</audio_signed>
<audio_endian>
integer: 0 means little-endian, 1 means big-endian. May be ommitted if
audio_sample_size is 8, or if audio_channels is 0
</audio_endian>
<clipname>
string: freeform text, max 256 characters
</clipname>
<title>
string: freeform text, max 256 characters
</title>
<author>
string: freeform text, max 256 characters
</author>
<comments;>
string: freeform text, max 256 characters
</comments>
<keywords;>
string: freeform text, max 1024 characters
</keywords>
Notes: the radix for double (decimal point) is "."
No white space is allowed before <section> or </section>. They must start a new line. White space is allowed between one section and the next.
For transfer between systems, the entire directory can be tarred and gzipped, and the output given the extension .ccf

