无法使用gstreamer从服务器流式传输

时间:2015-11-04 12:31:20

标签: gstreamer vlc

我正在尝试将一些内容从Linux VPS流式传输到我的Windows计算机上的VLC播放器。 我用iptables打开了5000端口,它看起来像这样:

 iptables -L -n
 Chain INPUT (policy ACCEPT)
 target     prot opt source               destination
 ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:5000
 ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:5000
 ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:5000

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination
 ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:5000
 ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:5000
 ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:5000

我不认为重复是一个问题 我正在用

开始gstreamer
gst-launch-1.0 -v -m videotestsrc ! x264enc  ! rtph264pay  ! tcpserversink host=127.0.0.1 port=5000

我收到的最后一条消息是

Got message #44 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;

如果它显示new-state=(GstState)GST_STATE_PLAYING

,我猜它应该播放

当我使用此命令在Windows Power shell中打开时

./vlc.exe rtsp://139.162.141.241:5000

它给了我VLC is unable to open the MRL
如果我在浏览器中打开rtsp://139.162.141.241:5000,它似乎无法下载任何内容 问题应与gst-launch有关,但无法弄明白 调试这种情况的任何提示?
感谢

我也尝试了udpsink而不是tcpserversink 尝试使用不同的host也无济于事 还在服务器上安装了ubuntu桌面并尝试以这种方式打开vlc播放器并且没有工作
之前我尝试从像这样的mp4文件流式传输

gst-launch-1.0 -v -m  filesrc location = sample.mp4 ! qtdemux ! video/x-h264 ! rtph264pay ! udpsink host=127.0.0.1 port=5000

这不起作用

0 个答案:

没有答案
相关问题