如何使用gstreamer从亚马逊服务器流式传输视频文件到互联网

时间:2014-03-07 05:34:43

标签: gstreamer rtsp

通过在gst-rtsp-server examples目录的test-video.c文件中调用这些函数,我找到了将videotestsrc元素流式传输到Internet的方法:

gst_rtsp_server_set_address(server,"10.xxx.xx.xxx");
gst_rtsp_server_set_service(server,"8555");

并解锁aws控制台中的端口。

但现在用test-video.c中的以下内容替换videotestsrc,如下所示:

gst_rtsp_media_factory_set_launch (factory, "( "
  "filesrc location=/home/ubuntu/DELTA.mpg ! mpeg2dec ! x264enc ! rtph264pay name=pay0 pt=96 "
  ")");

我无法在vlc播放器上看到流。

尝试以下命令会产生以下输出:

ubuntu@ip-xx-xxx-xx-xxx:~/gst-rtsp-server-1.2.3/examples$ /usr/local/bin/gst-launch-1.0 playbin uri=rtsp://10.xxx.xx.xxx:8555/test
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://10.185.10.118:8555/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request

(lt-test-video1:9027): GLib-CRITICAL **: unblock_source: assertion `!SOURCE_DEST
ROYED (source)' failed
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSP
Src:source: Could not read from resource.
Additional debug info:
gstrtspsrc.c(4367): gst_rtspsrc_reconnect (): /GstPlayBin:playbin0/GstURIDecodeB
in:uridecodebin0/GstRTSPSrc:source:
Could not receive any UDP packets for 5.0000 seconds, maybe your firewall is blo
cking it. Retrying using a TCP connection.
♥handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:22.473442001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
ubuntu@ip-10-xxx-xx-xxx:~/gst-rtsp-server-1.2.3/examples$

我在这里做错了什么?

0 个答案:

没有答案