1

网络RTC

在这个项目中,目标是在两个连接到 Web 服务器并相互发送视频流的客户端之间建立连接。

但是,我们有一个 java 客户端(android 项目位于此链接:https://github.com/IhorKlimov/Android-WebRtc.git)。这个 Java 客户端设法从他的相机连接和发送视频流。

另一个用python编写的客户端,它设法连接但不发送视频流。返回相反的错误:

 Traceback (most recent call last):
  File "/home/gael/.local/lib/python3.9/site-packages/socketio/asyncio_client.py", line 465, in _handle_eio_message
    await self._handle_event (pkt.namespace, pkt.id, pkt.data)
  File "/home/gael/.local/lib/python3.9/site-packages/socketio/asyncio_client.py", line 335, in _handle_event
    r = await self._trigger_event (data [0], namespace, * data [1:])
  File "/home/gael/.local/lib/python3.9/site-packages/socketio/asyncio_client.py", line 391, in _trigger_event
    ret = await self.handlers [namespace] [event] (* args)
  File "/home/gael/darknet_detection/webrtc-cli.py", line 133, in message
    await pc.setRemoteDescription (sdp)
  File "/home/gael/.local/lib/python3.9/site-packages/aiortc/rtcpeerconnection.py", line 799, in setRemoteDescription
    description = sdp.SessionDescription.parse (sessionDescription.sdp)
AttributeError: 'str' object has no attribute 'sdp'

NB:连接已经建立,数据交换,我们只是看不到视频。

代码中的 URL 对应于使用的服务器。

您将在此链接上找到我的完整代码:https ://github.com/sidathgueye/CV-WebRTC.git

先感谢您!

4

0 回答 0