[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
JANE file formats are an adaptation of the beautiful PPM format. They consist of an ASCII header and a binary data section. The header consists of:
The last line of the header must have as a key either data
or
datafile
. The value is the data length in ASCII for
data
, or a filename for datafile
.
Keys and values cannot contain whitespace. A data
line must
have exactly one newline after the length number. The frame data
begins immediately thereafter.
Times are specified in seconds, in order to be agnostic about the source format (30000/1001 is evil!).
The start_time
key is followed by the start time (from the
perspective of the sending plugin) as a floating-point number (in
ASCII. If start_time
is negative, it refers to a negative time
with respect to the end of the clip.
The duration
key is followed by the duration of the data, also
as a floating-point number.
Plugins that have no concept of start or end time (such as live feeds
or computer-genreated data) should set start_time
and
duration
to whatever was requested.
Calculating the frame rate from the above information is left as an exercise for the reader.
The header may contain any other key-value pairs that the creator finds useful or thought-provoking. Plugins must gracefully preserve unknown key-value pairs.
4.1 JANE Video Formats 4.2 JANE Audio Format
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
JANE video frame files start with the magic line JaneVideoFormat\n
Required keys are height
, width
, and format
. For
now, there are two defined formats: RBGA-uint8-packed
and
YUVA-uint8-packed
. Since this is byte-oriented format, endianness
should not be an issue (though X11 seems to worry about it
neurotically, to the point of specifying bit order in a byte, while
bytes are supposed to be atomic... WTF? Anyway, I digress.)
Both formats are a list of pixels in English reading order (left to right, top to bottom). Each pixel consits of four one-byte integers - three for color, one for opacity.
Frames may be interlaced. If so, they should have a header with key
interlace
and value top-first
or
bottom-first
. Interlace of none
may be specified as
well.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
JANE audio files represent a single (mono) audio channel.
JANE audio files start with the line JaneAudioFormat\n
.
The only defined format so far is pcm-float32
. The data payload
consists of IEEE 754 floating-point numbers in the range -1.0 to
1.0.
The frames
key specifies the number of frames contained in the
data payload. A frame in a discrete sample, so for audio frames, this
is what would normally be called the sample count.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |