-
Notifications
You must be signed in to change notification settings - Fork 73
Home
Adobe was not specifies that HEVC over RTMP until now. but it's very easy to extend the CodecID in the RTMP protocol.
Field | Type | Comment |
---|---|---|
FrameType | UB[4] |
Frame Type Type of video frame. The following values are defined: 1 = key frame (for AVC and HEVC, a seekable frame) 2 = inter frame (for AVC and HEVC, a non-seekable frame) 3 = disposable inter frame (H.263 only) 4 = generated key frame (reserved for server use only) 5 = video info/command frame |
CodecID | UB[4] |
Codec Identifier. The following values are defined: 2 = Sorenson H.263 3 = Screen video 4 = On2 VP6 5 = On2 VP6 with alpha channel 6 = Screen video version 2 7 = AVC 12=HEVC |
HEVCPacketType |
If CodecID == 12 HEVCVIDEOPACKET |
Video frame payload or UI8 (see note following tables) |
Field | Type | Comment |
---|---|---|
HEVCPacketType | UI8 |
The following values are defined: 0 = HEVC sequence header 1 = HEVC NALU 2 = HEVC end of sequence (lower level NALU sequence ender is not required or supported) |
CompositionTime | SI24 |
if HEVCPacketType == 1 Composition time offset else 0 |
Data | UI8[n] |
if HEVCPacketType == 0 HEVCDecoderConfigurationRecord else if HEVCPacketType == 1 One or more NALUs (can be indevidual slices per FLV packets; that is, full frames are not strictly required) else if HEVCPacketType == 2 Empty |
aligned(8) class HEVCDecoderConfigurationRecord
{
unsigned int(8) configurationVersion = 1;
unsigned int(2) general_profile_space;
unsigned int(1) general_tier_flag;
unsigned int(5) general_profile_idc;
unsigned int(32) general_profile_compatibility_flags;
unsigned int(48) general_constraint_indicator_flags;
unsigned int(8) general_level_idc;
bit(4) reserved = ‘1111’b;
unsigned int(12) min_spatial_segmentation_idc;
bit(6) reserved = ‘111111’b;
unsigned int(2) parallelismType;
bit(6) reserved = ‘111111’b;
unsigned int(2) chroma_format_idc;
bit(5) reserved = ‘11111’b;
unsigned int(3) bit_depth_luma_minus8;
bit(5) reserved = ‘11111’b;
unsigned int(3) bit_depth_chroma_minus8;
bit(16) avgFrameRate;
bit(2) constantFrameRate;
bit(3) numTemporalLayers;
bit(1) temporalIdNested;
unsigned int(2) lengthSizeMinusOne;
unsigned int(8) numOfArrays;
for (j=0; j < numOfArrays; j++)
{
bit(1) array_completeness;
unsigned int(1) reserved = 0;
unsigned int(6) NAL_unit_type;
unsigned int(16) numNalus;
for (i=0; i< numNalus; i++)
{
unsigned int(16) nalUnitLength;
bit(8*nalUnitLength) nalUnit;
}
}
}