观察老版本的流程,看起来rtp打包挺容易的 具体到rtmp 拉流,然后rtp 封装 的关键方法包括: rtmp 拉流,得到h264和aac , aac 要+ adts ( Audio Data Transport Stream, ADTS) 然后封装为rtp 给webrtc 模块 从rtmp里获取H.264并打rtp包 NALU 可以看到有五个bit nalu的类型 type &0x1f0x7表示这个nalu是sps,type &0x1f0x8表示是pps