websocket - 来自 Axis 相机的 Websocket 视频流不是 RTP 格式
问题描述
Axis对此毫无帮助。
Axis 文档说发送了 RTSP 视频流:
RTP Control Protocol (RTCP) is implemented according to the standard in RFC 3550.
但是,当使用我的 Websocket 应用程序并使用他们的网页与 Wireshark 观察 WebSocket 通信时,捕获的数据不符合 RFC 3550 中指定的格式。它在以下形式的记录中:
24 00 00 BB 80 E0 64 37 42 C9 FA 88 96 F7 33 0C
61 E0 01 00 02 05 72 7F 05 31 EE EB 1F 4F 42 0F
1E 6E 6A D2 0B AC CF 30 72 07 0A 68 ....
在哪里:
- 字节 0 始终是消息 0x24,字节 1 始终是 0x00 或 0x01
- 字节 2 和 3 是消息的大小
- 字节 4 始终为 80,字节 5 为 E0 或 c8,具体取决于字节 1 是 0 还是 1
- 字节 6 和 7 是序列号
- 字节 8 - 11 是一个时间戳,其余的我还没有弄清楚。
这不是根据 RFC 3550 的 RTP 格式。那么它是什么?有没有办法在 WEB 浏览器中显示这个?或者有没有办法将其转换为原始 h264,以便我可以将其发送到 jmuxer 之类的东西?
FWIW:我使用以下 Web 套接字消息在我的 Axis 相机上启动流:
OPTIONS rtsp://192.168.125.13/axis-media/media.amp?videocodec=h264&resolution=640x480
RTSP/1.0
CSeq: 1
DESCRIBE rtsp://192.168.125.13/axis-media/media.amp?videocodec=h264&resolution=640x480
RTSP/1.0
CSeq: 2
Accept:application/sdp
SETUP rtsp://192.168.125.13/axis-media/media.amp/stream=0? videocodec=h264&resolution=640x480 RTSP/1.0
CSeq: 3
Blocksize:64000
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Play session: YzkC-FJ8HsS3ns5k
PLAY rtsp://192.168.125.13/axis-media/media.amp?videocodec=h264&resolution=640x480
RTSP/1.0
CSeq: 4
Session:YzkC-FJ8HsS3ns5k
其中当然 192.168.125.13 是相机地址,而 YzkC-FJ8HsS3ns5k 是设置命令返回的会话。
解决方案
推荐阅读
- cxf - Apache cxf 和大型 SOAP 请求
- c# - 将值从 Object[,] Array 复制到 Object[][] Array
- javascript - 找不到算法时打印 console.log 而不是 null
- typescript - 打字稿中的枚举限制为 25 个元素
- react-native - 在 IOS 上使用 expo 自定义图标字体问题反应原生
- reactjs - 在另一个 axios 请求中使用 axios 响应数据
- python - 根据用户在运行时和时间间隔输入的字段对数据框进行分组
- json - 嵌套 Json 数据的平面列表
- ios - 构建 Flutter iOS 应用程序时出错 - Firebase
- prometheus - Prometheus:如何将 grafana 中的历史数据显示为当前数据