splitmuxsink & mpegtsmux

Tim Müller tim at centricular.com
Mon Sep 18 18:55:35 UTC 2017


On Mon, 2017-09-18 at 17:41 +0000, Brian.Ashton at gd-ms.uk wrote:

Hi Brian,

> Synopsis: 
> 	Linked: udpsrc--> rtph264depay-->queue, with gst_element_link()
> 
> 	Linked pads: splitmuxsink-->queue, with
> gst_element_get_request_pad(), gst_element_get_compatible_pad() &
> gst_pad_link()
> 
> 	Muxer property of splitmuxsink, set, thus: g_object_set
> (data.splitmuxsink, "muxer", data.mpegtsmux, NULL);
> 
> Full code, here: https://pastebin.com/xLcdhXTE
> 
> Error:
> 	Error received from element udpsrc-element: Internal data
> stream error.
> 	Debugging information: gstbasesrc.c(2939): gst_base_src_loop
> (): /GstPipeline:test-pipeline/GstUDPSrc:udpsrc-element:
> 	streaming stopped, reason not-negotiated (-4)
> 
> I'm confused by the apparent problem at the front of the pipeline -
> i.e. udpsrc; and TBH the debug info didn't enlighten me. I'm new to
> gstreamer.
> 
> I don't believe I need to link the pads from splitmuxsink-->mpegtsmux
> ... but I tried, in case. This makes no difference.
> 
> I also tried adding mpegtsmux to the bin (line 52); again, no
> difference.

I added a

  GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (data->pipeline),
      GST_DEBUG_GRAPH_SHOW_ALL, "error");

in your GST_MESSAGE_ERROR handler, then ran your code with

 $ GST_DEBUG_DUMP_DOT_DIR=/tmp ./gstreamer_splitmuxsink_mpegtsmux

and then looked at the .dot file with xdot. I noticed that the muxer
used inside splitmuxsink is mp4mux. I think this happens because the
muxer gets instantiated when you request the video pad.


To fix your problem, move the line

  g_object_set (data.splitmuxsink, "muxer", data.mpegtsmux, NULL);

before the

  sinkpad = gst_element_get_request_pad (data.splitmuxsink, "video");

Cheers
 -Tim

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

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/


More information about the gstreamer-devel mailing list