2011-10-10 188 views
0

系統#1中有一個高清視頻「ed_hd.avi」。想要通過網絡進行流式播放並播放系統#2中的內容。我在Ubuntu 11.04上使用GStreamer,在這方面嘗試了很多。各種各樣的錯誤使得這個目標很難診斷。感謝您爲System#1端和System#2端獲取工作命令。使用GStreamer進行流式傳輸

我已經試過如下:

系統#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文件到原始視頻。從第二個系統#2流式傳輸。

謝謝。

回答

1

你可以試試以下

gst-launch filesrc location=ed_hd.avi ! decodebin ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink host=127.0.0.1 port=5000 

如果不工作,然後繼續:

你嘗試以下?您需要使用視頻垃圾箱取代他的聲音箱

http://delog.wordpress.com/2011/06/01/stream-raw-vorbis-audio-over-udp-or-tcp-with-gstreamer/

而且看看

http://pastebin.com/PtD21Bx7

與您的視頻SRC更換v4l2src

而且

https://metalab.at/wiki/Gstreamer_One_Liners

1

我認爲你的問題是127.0.0.1部分。這是一個環回地址(請檢查ifconfig lo0以查看Link encap:Local Loopback127.0.0.1地址)。這不會跨兩個系統工作,但它可能在單個系統上正常工作。

相反,請使用第二臺機器公開可見的地址;檢查ip addr showifconfig輸出以查找地址。在System#1的命令行中寫入System#2的實際地址。

+0

在您的示例中,您將H263和H264混合使用。同上一篇關於127.0.0.1的評論。 –

+0

@Wes,你可能希望直接對deltasumo的問題發表評論 - 我沒有提到h263和h264 ...... – sarnold