差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 后一修订版 | 前一修订版 | ||
| public:it:rtsp [2024/04/23 09:35] – 创建 oakfire | public:it:rtsp [2025/04/23 10:48] (当前版本) – oakfire | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== RTSP ====== | ====== RTSP ====== | ||
| < | < | ||
| + | |||
| ## 文档 | ## 文档 | ||
| + | |||
| - RTSP [RFC2326](http:// | - RTSP [RFC2326](http:// | ||
| - | - SDP [RFC2327](http:// | + | - RTSP 2.0 [RFC7826](http:// |
| - | - SDP 中音视频媒体的描述:[RFC5939](https:// | + | - SDP [RFC2327](http:// |
| + | - SDP 中音视频媒体的描述:[RFC5939](https:// | ||
| - RTP [格式](https:// | - RTP [格式](https:// | ||
| - RTP 对各种格式的分包:[RTP_payload_formats](https:// | - RTP 对各种格式的分包:[RTP_payload_formats](https:// | ||
| 行 13: | 行 16: | ||
| - Transport: | - Transport: | ||
| - 音视频媒体的编码类型以 `m=` 为准, `a=fmtp`, `a=rtpmap` 可参考; | - 音视频媒体的编码类型以 `m=` 为准, `a=fmtp`, `a=rtpmap` 可参考; | ||
| + | - RTP 头里的时间戳是采样时间,可等同为PTS, 而FLV tag header 里的时间戳涵义是DTS | ||
| ## 关于音频对讲 | ## 关于音频对讲 | ||
| 行 19: | 行 23: | ||
| ## 关于 h264 的分包 | ## 关于 h264 的分包 | ||
| + | - RTP 对 H264 的分包相关: [RFC6184](https:// | ||
| - Table 1. Summary of NAL unit types and the corresponding packet types | - Table 1. Summary of NAL unit types and the corresponding packet types | ||
| - | + | ``` | |
| - | ``` | + | |
| NAL Unit Packet | NAL Unit Packet | ||
| Type Type | Type Type | ||
| 行 34: | 行 38: | ||
| 29 | 29 | ||
| 30-31 reserved | 30-31 reserved | ||
| - | ``` | + | ``` |
| - 三种分包模式: three cases of packetization modes: | - 三种分包模式: three cases of packetization modes: | ||
| 行 60: | 行 64: | ||
| ### STAP-A 包 | ### STAP-A 包 | ||
| - | - 24(0x18)格式,某些 rtsp server 推流会把关键帧前的 sps pps 作为一个STAP-A包发送, 比如 | + | - 24(0x18)格式,某些 rtsp server 推流会把关键帧前的 sps pps 作为一个STAP-A包发送, 比如 mediamtx 的流 |
| - STAP-A 的格式: 头字节 | - STAP-A 的格式: 头字节 | ||
| - | + | | |
| - | ``` | + | |
| | | ||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | ||
| 行 81: | 行 84: | ||
| | : | | : | ||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
| - | ``` | + | ``` |
| </ | </ | ||