Audio streaming via UDP

Tim-Philipp Müller t.i.m at
Mon Jul 8 11:26:28 PDT 2013

On Mon, 2013-07-08 at 07:42 -0700, pablorl wrote:


> I'm trying to implement the following functionality:
> I have an .MP4 file which contains video in h264 and audio in eac3. I'd like
> to demultiplex the audio and stream it via UDP to localhost in a loopback.
> Using gst-launch I'm able to get it using: gst-launch-1.0 filesrc
> location=video.mp4 ! qtdemux ! udpsink host=localhost port=1234
> However I'm not able to achieve the same result through code although I
> build the same pipeline. What I get is:
> "Error: Gstreamer encountered a general stream error."
> This issue has been puzzling me for a couple of days and I'd appreciate if
> any of you could provide some insight. My code is attached to this email in
> case you want to revise.

When you receive an error message on the bus, you should also print the
'debug' string, it contains useful information for (surprise) debugging
purposes :) I bet in your case it says something like 'not-linked'.

I bet this call fails:

  /* link the elements together */
  gst_element_link_many (source, demuxer, sink, NULL);

The reason is that the demuxer does not have any source pads yet at this
time, it will only add pads once data flow starts. Please read the
section about 'dynamic pads' or 'sometimes pads' in the application
developer's manual:


More information about the gstreamer-devel mailing list