7

在“gst-rtsp-server/examples/test-video.c”中,似乎可以设置 TLS 证书并启动 rtsp 服务器。我想知道它在客户端是如何工作的,包括命令行参数和证书授权等。谢谢你的教程。

这是经过一些尝试后的更多信息,我认为最重要的错误是“Peer failed to perform TLS handshake”。

服务器端

$ gst-rtsp-server/examples/test-video

客户端

$ GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsps://127.0.0.1:8554/test protocols=tls ! rtph264depay ! avdec_h264 ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsps://127.0.0.1:8554/test
0:00:00.055578735 12767       0xa51230 ERROR                default gstrtspconnection.c:698:gst_rtsp_connection_connect: failed to connect: Peer failed to perform TLS handshake
0:00:00.055643339 12767       0xa51230 ERROR                rtspsrc gstrtspsrc.c:3677:gst_rtsp_conninfo_connect:<rtspsrc0> Could not connect to server. (Generic error)
0:00:00.055679389 12767       0xa51230 WARN                 rtspsrc gstrtspsrc.c:6148:gst_rtspsrc_retrieve_sdp:<rtspsrc0> error: Failed to connect. (Generic error)
0:00:00.055764506 12767       0xa51230 WARN                 rtspsrc gstrtspsrc.c:6227:gst_rtspsrc_open:<rtspsrc0> can't get sdp
0:00:00.055793412 12767       0xa51230 WARN                 rtspsrc gstrtspsrc.c:4525:gst_rtspsrc_loop:<rtspsrc0> we are not connected
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(6148): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
4

0 回答 0