GST Launch如何通过认证?

How to pass authentication in 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中通过认证? 如果你有我这边的任何信息,我可以提供更多细节

任何帮助都将不胜感激。

来自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