框架三:rtmp 負(fù)載數(shù)據(jù)格式

1、rtmp?負(fù)載數(shù)據(jù)格式,實(shí)際上就是 flv?tag?格式,flv格式詳情可參考 “video_file_format_spec_v10.pdf” 。

2、Video FLV Tag

2.1、FrameType(4bit)
????????1: keyframe (for AVC, a seekable frame)
????????2: inter frame (for AVC, a nonseekable frame)
????????3: disposable inter frame (H.263 only)
????????4: generated keyframe (reserved for server use only)
????????5: video info/command frame

2.2、CodecID(4bit)? ?
????????1: JPEG (currently unused)
????????2: Sorenson H.263
????????3: Screen video
????????4: On2 VP6
????????5: On2 VP6 with alpha channel
????????6: Screen video version 2
????????7: AVC

????2.3、VideoData

? ? If CodecID == 2
????????H263VIDEOPACKET
????If CodecID == 3
????????SCREENVIDEOPACKET
????If CodecID == 4
????????VP6FLVVIDEOPACKET
????If CodecID == 5
????????VP6FLVALPHAVIDEOPACKET
????If CodecID == 6
????????SCREENV2VIDEOPACKET
????if CodecID == 7
????????AVCVIDEOPACKET

2.3.1、AVCPacketType(1B)
????????0: AVC sequence header
????????1: AVC NALU
????????2: AVC end of sequence (lower level NALU sequence ender is not required or supported)

2.3.2、CompositionTime(3B)
????if AVCPacketType == 1
????????Composition time offset
????else
????????0

2.3.3、Data
????if AVCPacketType == 0
????????AVCDecoderConfigurationRecord (詳情可參考 “ISO-14496-15 AVC file format”? 5.2.4.1.1 )
????else if AVCPacketType == 1
????????One or more NALUs (can be individual slices per FLV packets; full frames are not strictly required)
????else if AVCPacketType == 2
????????Empty? ??

3、Audio FLV Tag

3.1、SoundFormat(4bit)
????????0 = Linear PCM, platform endian
????????1 = ADPCM
????????2 = MP3
????????3 = Linear PCM, little endian
????????4 = Nellymoser 16-kHz mono
????????5 = Nellymoser 8-kHz mono
????????6 = Nellymoser
????????7 = G.711 A-law logarithmic PCM
????????8 = G.711 mu-law logarithmic PCM
????????9 = reserved
????????10 = AAC
????????11 = Speex
????????14 = MP3 8-Khz
????????15 = Device-specific sound

3.2、SoundRate(2bit)
????????0 = 5.5-kHz
????????1 = 11-kHz
????????2 = 22-kHz
????????3 = 44-kHz

3.3、SoundSize(1bit)
????????0 = snd 8Bit
????????1 = snd 16Bit

3.4、SoundType(1bit)
????????0 = sndMono
????????1 = sndStereo

3.5、SoundData

????if SoundFormat == 10
????????AACAUDIODATA
????else
????????Sound data—varies by format

3.5.1、AACPacketType
0: AAC sequence header
1: AAC raw

3.5.2、Data
????if AACPacketType == 0
????????AudioSpecificConfig? (詳情可參考 “SO-14496-3 Audio” 1.6.2.1 )
????else if AACPacketType == 1
????????Raw AAC frame data

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容