首页 > 解决方案 > 如何在 GST Launch 中通过身份验证?

问题描述

我在 URI 中传递用户名和密码。但是,我收到未经授权的错误。我跟着这个文档https://developer.ridgerun.com/wiki/index.php?title=GstRtspSink_-_Basic_Authentication。根据文档,我可以在 URI 中发送用户名和密码。它适用于 VLC,但不适用于 GST 启动。

对于 VLC:

vlc rtsp://user:pass@127.0.0.1:7001/camera-id

对于 GST 启动:

gst-launch-1.0 rtspsrc location="rtsp://user:pass@127.0.0.1:7001/camera-id" 

错误:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://user:pass@127.0.0.1:7001/camera-id
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Not authorized to access resource.
Additional debug info:
gstrtspsrc.c(5623): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Unauthorized
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

如何在 GSt Launch 中通过身份验证?如果您有任何关于我的事情,我可以提供更多详细信息

任何帮助都是不言而喻的。

标签: gstreamervlcamazon-kinesis

解决方案


来自gst-inspect-1.0 rtspsrc

  user-id             : RTSP location URI user id for authentication
                        flags: readable, writable
                        String. Default: null
  user-pw             : RTSP location URI user password for authentication
                        flags: readable, writable
                        String. Default: null

推荐阅读