美文网首页
框架三:rtmp 负载数据格式

框架三:rtmp 负载数据格式

作者: Wonton_skin | 来源:发表于2020-09-15 21:50 被阅读0次

1、rtmp 负载数据格式,实际上就是 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

相关文章

  • 框架三:rtmp 负载数据格式

    1、rtmp负载数据格式,实际上就是 flvtag格式,flv格式详情可参考 “video_file_format...

  • RTMP 视频数据格式

    RTMP视频数据格式 RTMP视频流格式与FLV很相似,通过查看FLV的格式文档,就能够知道RTMP视频数据应该怎...

  • 框架五:rtsp负载数据格式

    1、交织头格式对于交织传输模式,其RTP/RTCP负载数据之前,还有一个交织头。 2、RTP数据格式 (rfc 3...

  • 2.科普扫盲

    rtmp:协议,需要使用就需要bilibili 的 ijk 第三方框架,默认使用FFMpeg框架 1ijfMedi...

  • flv视频格式

    直播推流的时候需要用到RTMP的视频数据格式,RTMP的视频格式和FLV很像,通过查看FLV的格式文档,可以分析F...

  • 直播推流/拉流开源三方库

    推流 LiveVideoCoreSDK 框架提供IOS苹果手机的RTMP推流填写RTMP服务地址,直接就可以进行推...

  • 推流直播的几种方式

    1 RTMP,HLS,SRT 等 RTMP是目前比较主流的流媒体传输协议, 对CDN支持良好,CDN是基础框架,适...

  • RTMP 应用框架简介

    1、采集推流器 功能:音视频采集、音视频编码、推流 开源方案:rtmpdump 客户端FFmpeg 推流 (可参考...

  • 8) Ribbon客户端负载均衡

    Ribbon简介 负载均衡框架,支持可插拔式的负载均衡规则 支持多种协议,HTTP,TCP等 提供负载均衡客户端R...

  • LFStreamingBuffer 源码阅读

    LFLiveKit框架是一套RTMP推流框架,主要使用OC写的,框架文件十分清晰,并且拓展性非常强,支持动态切换码...

网友评论

      本文标题:框架三:rtmp 负载数据格式

      本文链接:https://www.haomeiwen.com/subject/sjtgektx.html