Webrtc 我的gst rstp服务器配置是否有问题?
我试图使用gst rtsp服务器代理IP摄像机提供的H264视频流 我正在使用 运行Webrtc 我的gst rstp服务器配置是否有问题?,webrtc,gstreamer,Webrtc,Gstreamer,我试图使用gst rtsp服务器代理IP摄像机提供的H264视频流 我正在使用 运行 ./test-launch "videotestsrc ! video/x-raw,width=960,height=504 ! timeoverlay text='H.264' valignment=top halignment=left ! x264enc ! rtph264pay name=pay0 pt=96" 工作正常,运行时我有一个很好的测试显示 ffplay rtsp://127.0.0.1:8
./test-launch "videotestsrc ! video/x-raw,width=960,height=504 ! timeoverlay text='H.264' valignment=top halignment=left ! x264enc ! rtph264pay name=pay0 pt=96"
工作正常,运行时我有一个很好的测试显示
ffplay rtsp://127.0.0.1:8554/test
现在,当我跑的时候
./test-launch "rtspsrc location=rtsp://user:pass@my.local.ip.adress:554 ! rtph264pay name=pay0 pt=96"
我明白了
stream ready at rtsp://127.0.0.1:8554/test
0:00:04.041775651 8 0x7fdb68003770 WARN default grammar.y:506:gst_parse_no_more_pads:<rtspsrc0> warning: Delayed linking failed.
0:00:04.041848650 8 0x7fdb68003770 WARN default grammar.y:506:gst_parse_no_more_pads:<rtspsrc0> warning: failed delayed linking some pad of GstRTSPSrc named rtspsrc0 to some pad of GstRtpH264Pay named pay0
0:00:04.042011196 8 0x55ebb9fa9370 WARN rtspmedia rtsp-media.c:3014:default_handle_message: 0x7fdb94010400: got warning Delayed linking failed. (./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:media-pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0:
failed delayed linking some pad of GstRTSPSrc named rtspsrc0 to some pad of GstRtpH264Pay named pay0)
0:00:04.043518904 8 0x7fdb88005d40 WARN basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc1> error: Internal data stream error.
0:00:04.043548883 8 0x7fdb88005d40 WARN basesrc gstbasesrc.c:3072:gst_base_src_loop:<udpsrc1> error: streaming stopped, reason not-linked (-1)
0:00:04.043742638 8 0x55ebb9fa9370 WARN rtspmedia rtsp-media.c:3001:default_handle_message: 0x7fdb94010400: got error Internal data stream error. (gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:media-pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
streaming stopped, reason not-linked (-1))
0:00:04.043802176 8 0x55ebb9fa5050 WARN rtspmedia rtsp-media.c:3272:wait_preroll: failed to preroll pipeline
0:00:04.043815921 8 0x55ebb9fa5050 WARN rtspmedia rtsp-media.c:3652:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:04.044665029 8 0x7fdb8c005230 WARN rtspsrc gstrtspsrc.c:6320:gst_rtsp_src_receive_response:<rtspsrc0> receive interrupted
0:00:04.044710262 8 0x7fdb8c005230 WARN rtspsrc gstrtspsrc.c:8648:gst_rtspsrc_pause:<rtspsrc0> PAUSE interrupted
0:00:04.055129828 8 0x7fdb8c005230 WARN rtspsrc gstrtspsrc.c:6561:gst_rtspsrc_send:<rtspsrc0> error: Unhandled error
0:00:04.055182089 8 0x7fdb8c005230 WARN rtspsrc gstrtspsrc.c:6561:gst_rtspsrc_send:<rtspsrc0> error: Method Not Valid in This State (455)
0:00:04.055293147 8 0x7fdb8c005230 WARN rtspsrc gstrtspsrc.c:8072:gst_rtspsrc_close:<rtspsrc0> error: Could not send message. (Generic error)
0:00:04.055650169 8 0x55ebb9fa9370 WARN rtspmedia rtsp-media.c:3001:default_handle_message: 0x7fdb94010400: got error Unhandled error (gstrtspsrc.c(6561): gst_rtspsrc_send (): /GstPipeline:media-pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0:
Method Not Valid in This State (455))
0:00:04.055687457 8 0x55ebb9fa9370 WARN rtspmedia rtsp-media.c:3001:default_handle_message: 0x7fdb94010400: got error Could not write to resource. (gstrtspsrc.c(8072): gst_rtspsrc_close (): /GstPipeline:media-pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0:
Could not send message. (Generic error))
0:00:04.056751894 8 0x55ebb9fa5050 ERROR rtspclient rtsp-client.c:1077:find_media: client 0x55ebba025d20: can't prepare media
0:00:04.057123746 8 0x55ebb9fa5050 ERROR rtspclient rtsp-client.c:2963:handle_describe_request: client 0x55ebba025d20: no media
流准备就绪rtsp://127.0.0.1:8554/test
0:00:04.041775651 8 0x7fdb68003770警告默认语法。y:506:gst\u解析\u无更多\u焊盘:警告:延迟链接失败。
0:00:04.041848650 8 0x7fdb68003770警告默认语法。y:506:gst_parse_no_more_pads:warning:将名为rtspsrc0的GstRTSPSrc的某个pad链接到名为pay0的GSTRTPH264的某个pad失败延迟
0:00:04.042011196 8 0x55ebb9fa9370 WARN rtspmedia rtsp media.c:3014:默认句柄\消息:0x7fdb94010400:获取警告延迟链接失败。(./grammar.y(506):gst_parse_no_more_pads():/GstPipeline:media pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0:
未能延迟将名为rtspsrc0的GstRTSPSrc的某些焊盘链接到名为pay0的GstRtpH264Pay的某些焊盘)
0:00:04.043518904 8 0x7fdb88005d40 WARN basesrc gstbasesrc.c:3072:gst\U base\U src\U循环:错误:内部数据流错误。
0:00:04.043548883 8 0x7fdb88005d40 WARN basesrc gstbasesrc.c:3072:gst\U base\U src\U循环:错误:流停止,原因未链接(-1)
0:00:04.043742638 0x55ebb9fa9370 WARN rtspmedia rtsp media.c:3001:默认句柄\消息:0x7fdb94010400:获取错误内部数据流错误。(gstbasesrc.c(3072):gst_base_src_loop():/GstPipeline:media pipeline/GstBin:bin0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
流停止,原因未链接(-1))
0:00:04.043802176 8 0x55ebb9fa5050警告rtspmedia rtsp media.c:3272:等待\u预滚:预滚管道失败
0:00:04.043815921 8 0x55ebb9fa5050警告rtspmedia rtsp media.c:3652:gst\U rtsp\U media\U prepare:预卷管道失败
0:00:04.044665029 8 0x7fdb8c005230警告rtspsrc gstrtspsrc.c:6320:gst_rtsp_src_接收_响应:接收中断
0:00:04.044710262 8 0x7fdb8c005230警告rtspsrc gstrtspsrc.c:8648:gst\u rtspsrc\u暂停:暂停中断
0:00:04.055129828 0x7fdb8c005230警告rtspsrc gstrtspsrc.c:6561:gst\U rtspsrc\U发送:错误:未处理的错误
0:00:04.055182089 8 0x7fdb8c005230警告rtspsrc gstrtspsrc.c:6561:gst_rtspsrc_发送:错误:方法在此状态下无效(455)
0:00:04.055293147 8 0x7fdb8c005230警告rtspsrc gstrtspsrc.c:8072:gst\U rtspsrc\U关闭:错误:无法发送消息。(一般错误)
0:00:04.055650169 8 0x55ebb9fa9370 WARN rtspmedia rtsp media.c:3001:default_handle_消息:0x7fdb94010400:Get error Unhandled error(gstrtspsrc.c(6561):gst_rtspsrc_send():/GstPipeline:media pipeline/GstBin:bin0/gstrtspsrc:rtspsrc0:
方法在此状态下无效(455))
0:00:04.055687457 8 0x55ebb9fa9370 WARN rtspmedia rtsp media.c:3001:default_handle_消息:0x7fdb94010400:Get错误无法写入资源。(gstrtspsrc.c(8072):gst_rtspsrc_close():/GstPipeline:media pipeline/GstBin:bin0/gstrtspsrc:rtspsrc0:
无法发送消息。(一般错误))
0:00:04.056751894 8 0x55ebb9fa5050错误rtspclient rtsp client.c:1077:查找介质:客户端0x55ebba025d20:无法准备介质
0:00:04.057123746 8 0x55ebb9fa5050错误rtspclient rtsp client.c:2963:句柄描述请求:客户端0x55ebba025d20:无媒体
ffplay显示错误503
我的rtspsrc语法和管道看起来正常
这里怎么了
是url中的登录/密码语法吗
解释:
我想在HTML5标签中显示由IP摄像机提供的H264流。
该视频元素的媒体流将被提供给WEB-RTC流
为此,
有更好的方法吗?
rtpsrc
提供RTP数据包,然后您再次尝试将它们包装到RTP(使用rtph264pay)。我认为你至少应该添加rtph264depay!H264在rtph264pay
之前解析
,但不确定它是否足以让它工作……无论如何,我认为更好的选择是WebRTC
。例如,Janus服务器
(Janus网关
)可以连接到RTSP
cams并将其重新格式化为WebRTC
。此外,我还为Janus Server
实现了GStreamer
插件的概念验证,该插件不仅可以与RTSP
cams一起工作,而且几乎可以与GStreamer支持的任何源一起工作。最新的GStreamer
版本中还有webrtcbin
元素,允许直接从GStreamer
使用WebRTC
。我已经尝试使用以上所有内容,您可以在我的github帐户上找到我的实验。rtpsrc
为您提供RTP数据包,您可以尝试再次将它们包装到RTP(使用rtph264pay)。我认为你至少应该添加rtph264depay!H264在rtph264pay
之前解析
,但不确定它是否足以让它工作……无论如何,我认为更好的选择是WebRTC
。例如,Janus服务器
(Janus网关
)可以连接到RTSP
cams并将其重新格式化为WebRTC
。此外,我还为Janus Server
实现了GStreamer
插件的概念验证,该插件不仅可以与RTSP
cams一起工作,而且几乎可以与GStreamer支持的任何源一起工作。最新的GStreamer
版本中还有webrtcbin
元素,允许直接从GS使用WebRTC