1

我正在尝试使用 gstreamer 通过网络发送示例文件 .avi。我用来构建管道的代码如下:

gst-launch-1.0 -v rtpbin name=rtpbin latency=200 \
filesrc location=filesrc location=/home/enry/drop.avi ! decodebin name=dec \
dec. ! queue ! x264enc byte-stream=false bitrate=300 ! rtph264pay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink port=5000 host=127.0.0.1 ts-offset=0 name=vrtpsink \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=127.0.0.1 sync=false async=false \
name=vrtcpsink udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0

当我尝试执行此命令时,出现此错误:

gstavidemux.c(5383): gst_avi_demux_loop ():
/GstPipeline:pipeline0/GstDecodeBin:dec/GstAviDemux:avidemux0:
streaming stopped, reason not-linked
Execution ended after 0:00:00.032906515
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

你能帮我解决这个问题吗?

4

1 回答 1

0

我认为您在 decodebin 之前需要一个 demux 元素,因为 avi 文件将包含音频和视频,但您只使用一个 decodebin 来解码它们。

看看这里的 avidemux 元素。您需要它来从文件中获取视频流。

于 2014-06-26T22:08:49.570 回答