【发布时间】:2017-01-09 15:05:06
【问题描述】:
我正在尝试使用 Gstreamer 将视频和音频流式传输到 RTMP 服务器 (Wowza),但存在许多问题。
几乎没有关于如何正确使用rtmpsink 的文档,这是一个通过 RTMP 将媒体发送到指定服务器的插件。不仅如此,制作与rtmpsink 兼容的正确 Gstreamer 管道目前只是一个试错练习。
我目前的 Gstreamer 管道是:
sudo gst-launch-1.0 -e videotestsrc ! queue ! videoconvert ! x264enc ! flvmux streamable=true ! queue ! rtmpsink location='rtmp://<ip_address>/live live=true'
在我的 Linux 机器上运行上面的代码会出现这个错误:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not open resource for writing.
Additional debug info:
gstrtmpsink.c(246): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:
Could not connect to RTMP stream "rtmp://31.24.217.8/live live=true" for writing
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data flow error.
Additional debug info:
gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
streaming task paused, reason error (-5)
由于在 Wowza 方面缺乏文档,另一个问题实际上是指出正确的 IP 地址指向 rtmpsink 并且在 Gstreamer 方面缺乏文档,除了一些示例之外,正确的 RTMP 身份验证是难以捉摸的由于其他变量,无法确认其论坛是否有效。
使用rtmpsink 通过RTMP 进行流式传输的正确Gstreamer 管道是什么?我如何正确地实现rtmpsink,无论是否经过身份验证?
【问题讨论】:
标签: streaming gstreamer rtmp wowza