问题描述
我在系统#1上获得了一个高清视频"ed_hd.avi".希望通过网络进行流传输并播放System#2中的内容.我在Ubuntu 11.04上使用GStreamer,对此做了很多尝试.各种错误使该目标难以诊断.感谢为系统#1端和系统#2端获得有效的命令.
I have got one HD video "ed_hd.avi" on System#1. Would like to stream it over network and play the content from System#2. I am using GStreamer on Ubuntu 11.04, tried a lot on this. Variety of errors makes this objective difficult to diagnose. Will be thankful for getting a working command for the System#1-end and System#2-end.
我尝试过的方法如下:
系统#1:
gst-launch filesrc location=ed_hd.avi ! decodedin ! x263enc ! video/x-h264 ! rtph264pay ! udpsink host=127.0.0.1 port=5000
系统2:
gst-launch udpsrc port=5000 ! rtph264depay ! decodebin ! xvimagesink
目标是:将avi文件转换为原始视频.从第二个System#2流式传输.
Objective is : Convert avi file to raw video. Stream it from the second System#2.
谢谢.
推荐答案
我认为您的问题是127.0.0.1
部分.那是一个 loopback 地址(检查ifconfig lo0
以查看Link encap:Local Loopback
中的127.0.0.1
地址).尽管在单个系统上可能会正常工作,但这不能在两个系统上工作.
I think your problem is the 127.0.0.1
portion. That is a loopback address (check ifconfig lo0
to see the Link encap:Local Loopback
for the 127.0.0.1
address). This won't work across two systems, though it might work fine on a single system.
相反,请使用第二台计算机公开可见的地址;检查ip addr show
或ifconfig
输出以找到地址.在系统1的命令行中输入系统2的实际地址.
Instead, use the address that is publicly visible for the second machine; check ip addr show
or ifconfig
output to find the address. Write the actual address for System #2 in the command line on System #1.
这篇关于使用GStreamer进行流式传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!