GXF: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(add format description) |
||
Line 3: | Line 3: | ||
The GXF is a container format associated with SMPTE360. | The GXF is a container format associated with SMPTE360. | ||
== Format Description == | |||
A GXF file is comprised of a series of packets. Multi-byte numbers are stored in big endian format. | |||
== Packet Header == | |||
Each packet begins with a 16-byte header that has the following format: | |||
bytes 0-3 all 0 | |||
byte 4 set to 1 | |||
byte 5 packet type | |||
bytes 6-9 length of packet, including this 16-byte header | |||
bytes 10-13 all 0 | |||
byte 14 set to 0xE1 | |||
byte 15 set to 0xE2 | |||
Note that the length must be at least 16 (size of header) and that the top byte (bits 31-24) must be all 0. | |||
== Packet Types == | |||
* 0xBC: map packet | |||
* 0xBF: media packet | |||
* 0xFB: end-of-stream (EOS) indicator packet | |||
* 0xFC: FLT packet (?) | |||
* 0xFD: UMF packet (?) | |||
A GXF file should start with a map packet and end with an EOS packet. | |||
== Map Packet == | |||
The payload of a map packet has the following format: | |||
byte 0 0xE0 | |||
byte 1 0xFF | |||
bytes 2-3 length of material data | |||
bytes 4.. material data | |||
2 bytes length of track description | |||
bytes .. track description | |||
1 byte track type (bit 7 must be set) | |||
1 byte track ID (valid track IDs must have top 2 bits set) | |||
2 bytes length of track description | |||
There may be data remaining in the map packet which can be skipped. | |||
The bottom 7 bits of the track type determine the format for the stream identified by the bottom 6 bits of the track ID: | |||
* type 3 or 4: [[MJPEG]] video | |||
* type 13 or 15: [[dvc]] video | |||
* type 14 or 16: [[dvcp]] video | |||
* type 11, 12, or 20: [[MPEG-2]] video | |||
* type 22 or 23: [[MPEG-1]] video | |||
* type 9: [[PCM]] audio | |||
** 24-bit, signed, little-endian, mono, 48000 Hz PCM | |||
* type 10: [[PCM]] audio | |||
** 16-bit, signed, little-endian, mono, 48000 Hz PCM | |||
* type 17: [[AC3]] audio | |||
** stereo, 48000 Hz audio | |||
== Media Packet == | |||
A media packet contains encoded media data with the following format: | |||
byte 0 track type | |||
byte 1 track ID | |||
bytes 2-5 field number | |||
bytes 6-9 field information | |||
bytes 10-13 timeline field number | |||
byte 14 flags | |||
byte 15 reserved | |||
bytes 16.. remaining bytes contain encoded media | |||
[[Category:Container Formats]] | [[Category:Container Formats]] |
Revision as of 10:22, 2 July 2006
- Samples: http://samples.mplayerhq.hu/GXF/
- Organization: SMPTE
The GXF is a container format associated with SMPTE360.
Format Description
A GXF file is comprised of a series of packets. Multi-byte numbers are stored in big endian format.
Packet Header
Each packet begins with a 16-byte header that has the following format:
bytes 0-3 all 0 byte 4 set to 1 byte 5 packet type bytes 6-9 length of packet, including this 16-byte header bytes 10-13 all 0 byte 14 set to 0xE1 byte 15 set to 0xE2
Note that the length must be at least 16 (size of header) and that the top byte (bits 31-24) must be all 0.
Packet Types
- 0xBC: map packet
- 0xBF: media packet
- 0xFB: end-of-stream (EOS) indicator packet
- 0xFC: FLT packet (?)
- 0xFD: UMF packet (?)
A GXF file should start with a map packet and end with an EOS packet.
Map Packet
The payload of a map packet has the following format:
byte 0 0xE0 byte 1 0xFF bytes 2-3 length of material data bytes 4.. material data 2 bytes length of track description bytes .. track description 1 byte track type (bit 7 must be set) 1 byte track ID (valid track IDs must have top 2 bits set) 2 bytes length of track description
There may be data remaining in the map packet which can be skipped.
The bottom 7 bits of the track type determine the format for the stream identified by the bottom 6 bits of the track ID:
- type 3 or 4: MJPEG video
- type 13 or 15: dvc video
- type 14 or 16: dvcp video
- type 11, 12, or 20: MPEG-2 video
- type 22 or 23: MPEG-1 video
- type 9: PCM audio
- 24-bit, signed, little-endian, mono, 48000 Hz PCM
- type 10: PCM audio
- 16-bit, signed, little-endian, mono, 48000 Hz PCM
- type 17: AC3 audio
- stereo, 48000 Hz audio
Media Packet
A media packet contains encoded media data with the following format:
byte 0 track type byte 1 track ID bytes 2-5 field number bytes 6-9 field information bytes 10-13 timeline field number byte 14 flags byte 15 reserved bytes 16.. remaining bytes contain encoded media