启用Auth / TLS时,Gstreamer在流式传输中失败

时间:2016-03-08 07:50:26

标签: gstreamer

我也失败了使用TLS和身份验证的gstreamer演示。从客户端我无法访问流。我还为服务器/客户端启用了调试日志,这是错误日志。

Server:

0:00:08.457924872 13546 0x8758400 DEBUG GST_REGISTRY gstregistry.c:1363:gst_registry_scan_path_internal: scanning path /usr/lib/i386-linux-gnu/gstreamer-1.0

0:00:08.458218532 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/home/zcam/.frei0r-1/lib) failed: Error opening directory '/home/zcam/.frei0r-1/lib': No such file or directory

0:00:08.458235068 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib/i386-linux-gnu/frei0r-1) failed: Error opening directory '/usr/lib/i386-linux-gnu/frei0r-1': No such file or directory

0:00:08.458248094 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib/frei0r-1) failed: Error opening directory '/usr/lib/frei0r-1': No such file or directory

0:00:08.458260771 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib/frei0r-1) failed: Error opening directory '/usr/local/lib/frei0r-1': No such file or directory

0:00:08.458272452 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib32/frei0r-1) failed: Error opening directory '/usr/lib32/frei0r-1': No such file or directory

0:00:08.458283767 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib32/frei0r-1) failed: Error opening directory '/usr/local/lib32/frei0r-1': No such file or directory

0:00:08.458294682 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib64/frei0r-1) failed: Error opening directory '/usr/lib64/frei0r-1': No such file or directory

0:00:08.458305114 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib64/frei0r-1) failed: Error opening directory '/usr/local/lib64/frei0r-1': No such file or directory

0:25:53.406568056 13546 0x8881290 INFO rtspclient rtsp-client.c:2372:handle_request: client 0x8828440: received a request OPTIONS rtsp://127.0.0.1:8554/test 1.0

0:25:53.406591435 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.url'

0:25:53.407338684 13546 0x8881290 INFO rtspclient rtsp-client.c:2372:handle_request: client 0x8828440: received a request DESCRIBE rtsp://127.0.0.1:8554/test 1.0

0:25:53.407356700 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.url'

0:25:53.407364899 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: inspect: /test 0x87620f8

0:25:53.407371316 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: prefix: /test 0x87620f8

0:25:53.407376672 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: result: /test 0x87620f8

0:25:53.407381633 13546 0x8881290 INFO rtspmountpoints rtsp-mount-points.c:294:gst_rtsp_mount_points_match: found media factory 0x87620f8 for path /test

0:25:53.407387357 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.media.factory.access'

0:25:53.407393389 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:348:default_authenticate: authenticate

0:25:53.407398028 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:381:default_authenticate: no authorization header found

0:25:53.407402002 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:428:ensure_authenticated: no authorization token found

0:25:53.407446055 13546 0x8881290 ERROR rtspclient rtsp-client.c:645:find_media: client 0x8828440: not authorized to see factory path /test

0:25:53.407453993 13546 0x8881290 ERROR rtspclient rtsp-client.c:2204:handle_describe_request: client 0x8828440: no media

0:25:53.407974988 13546 0x8881290 INFO rtspclient rtsp-client.c:3157:closed: client 0x8828440: connection closed

0:25:53.407992854 13546 0x8881290 INFO rtspclient rtsp-client.c:3383:client_watch_notify: client 0x8828440: watch destroyed

0:25:53.408002874 13546 0x8881290 DEBUG rtspserver rtsp-server.c:999:unmanage_client: unmanage client 0x8828440

0:25:53.408012196 13546 0x8881290 DEBUG rtspserver rtsp-server.c:979:free_client_context: free context 0x88854c0

0:25:53.408027277 13546 0x8881290 DEBUG default rtsp-thread-pool.c:173:gst_rtsp_thread_stop: stop thread 0x87547a0

0:25:53.408031920 13546 0x8881290 DEBUG default rtsp-thread-pool.c:176:gst_rtsp_thread_stop: add idle source to quit mainloop of thread 0x87547a0

Client:

Progress: (open) Retrieving media info 0:00:00.193900827 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5403:gst_rtspsrc_try_send: received response message

0:00:00.193918406 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5418:gst_rtspsrc_try_send: got response message 401

0:00:00.193928678 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5310:gst_rtspsrc_setup_auth: Attempting authentication using credentials from the properties

0:00:00.193939675 13655 0x8c19980 WARN rtspsrc gstrtspsrc.c:5630:gst_rtspsrc_send: error: Got error response: 401 (Unauthorized).

0:00:00.193970211 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:6903:gst_rtspsrc_retrieve_sdp: free connection

0:00:00.193980213 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:4208:gst_rtsp_conninfo_close: closing connection... ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.

有没有人和我面对面?好像我无法将授权信息发送到服务器。以下是来自客户的管道:

gst-laucnh-1.0 -v rtspsrc location = rtsps://127.0.0.1:8554 tls-validation-flags = generic-error user-id = user user-pwd = password! decodebin! autovideosink

感谢您的建议和支持。

1 个答案:

答案 0 :(得分:1)

我现在可以开始工作了。 从客户端启用对解析对象影响的太多日志级别。 来自客户端的正确管道应该是:

gst-launch-1.0 -v rtspsrc location = rtsps:// user:password@127.0.0.1:8554 / stream tls-validation-flags = generic-error! decodebin! autovideosink

感谢。