audio over Ethernet network not working

Tim Müller tim at centricular.com
Tue Jun 24 15:52:44 PDT 2014


On Tue, 2014-06-24 at 13:04 -0700, mahyarelc wrote:

Hi,

> I'm relatively new to GStreamer world and as a simple test, I'm trying to
> send a test audio over an Ethernet network and play the output from another
> PC (both running Ubuntu 14.04).
> The network is fine (as I can use ssh), audio test plays on each individual
> machines (so gstreamer works on each one) but the problem is when I send the
> audio, I don't get an output on the client side. Here's a simple pipeline:
> 
> 
> Server:
> gst-launch-0.10 -v audiotestsrc ! udpsink host=127.0.0.1 port=1234
> Client:
> gst-launch-0.10 -v udpsrc port=1234 ! autoaudiosink
> 
> 
> server side goes to playing:
> Setting pipeline to PAUSED ...
> /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps =
> audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16,
> depth=(int)16, rate=(int)44100, channels=(int)1
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
> audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16,
> depth=(int)16, rate=(int)44100, channels=(int)1
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> 
> client side also goes to PLAYING state but *no output* is playing (no data
> is received if I use filesink element):
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> I've tried many other pipelines but they don't work (I finally want to send
> a live stream, but this simple audio test doesn't work).
> 
> Any suggestions would be great and helpfull

Well, if your receiver doesn't even receive any output, that's likely a
network problem of sorts. I would suspect an IPv4 vs. IPv6 issue
('localhost' resolving to IPv6, but 127.0.0.1 to IPv4, for example).

A better pipeline to send audio over the network would involve some RTP
payloading/depayloading. There should be some examples here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp

Using the gst-rtsp-server library to serve your stream as RTSP/RTP would
be even better, that way you don't have to fiddle with the setup
details.

I would also strongly recommend that you use gstreamer 1.x and not 0.10.
It should be included in 14.04 already. 0.10 is no longer maintained.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list