通过 udpsrc 流式传输 speex 编码的 ogg 文件

streaming an speex encoded ogg file via udpsrc

目前我正在开发 ubuntu 14.02 LTS。 我按照以下页面上的步骤安装了 gstreamer: http://blog.nicolargo.com/2010/05/installation-de-tout-les-composants-gstreamer-sous-ubuntu.html

我正在尝试流式传输使用命令行创建的文件:

arecord -d 5 -f s16_le -r 8000 | speexenc - /media/ram/test.spx 

我已使用以下命令行播放文件 test.spx 并验证了录制的音频:

gst-launch filesrc location=/media/ram/test.spx ! oggdemux ! speexdec ! alsasink

但是,我需要通过网络传输文件 (filesrc -> udpsrc),所以我使用以下命令。 在主机上:

gst-launch-1.0 filesrc location=/media/ram/test.spx ! oggdemux ! speexdec ! udpsink host=<target@> port=8888

达标:

gst-launch-0.10 udpsrc port=8888 ! audioconvert ! alsasink sync=false

但是什么也没有收到,我也不知道出了什么问题。

提前致谢。

顺便使用RTP怎么样? 虽然我认为它应该在没有 RTP 的情况下工作..但我不知道如何(我记得我可能使用过 mpegtsmux..

这个已经用 arecord 等进行了测试并且可以正常工作..

发送端:

gst-launch-1.0 filesrc location="./test.spx" ! oggdemux ! rtpspeexpay ! queue ! udpsink host=127.0.0.1 port=8888

接收方:

gst-launch-1.0 udpsrc port=8888 caps="application/x-rtp" ! queue ! rtpspeexdepay ! speexdec ! alsasink

我的灵感来自 this link