gstreamer - 如何在 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
推荐阅读
- javascript - Redux action 和 async/await 函数在类组件和函数中具有不同的行为
- heroku - 此响应无法在 Heroku 中设置 Cookie
- python - 如何在不同的“框架”之间切换
- python - Discord.py 使用 webhook 向特定公会发送消息
- python - 检查泡菜转储的依赖关系
- unity3d - 使用没有 Canvas 的输入字段,或找到任何替代方法
- linux - 从列表中选择文件
- javascript - 从动态生成的列表中动态选择元素
- python - 无法执行脚本 pygame 错误 dist 不起作用
- node.js - 使用客户端进行嵌套查询