<div dir="ltr"><div>Hello!</div><div><br></div><div>I would like to create a pipeline that takes in a single mp3 audio file and splits it into several 10-second vorbis/ogg files, but I'm having issues linking the elements.</div><div><br></div><div>I have already made a similar pipeline that takes a single mp3 audio file and splits it into several 10-second mp3 files with Xing headers by using lamemp3enc instead of vorbisenc, and xingmux instead of oggmux. The mp3-to-mp3 pipeline works just fine, but the mp3-to-ogg is not doing so well, because splitmuxsink is not being able to link the muxer (vorbisenc) with the sink (oggmux+filesink). Could you please point out what I'm missing?</div><div><br></div><div>Here's the complete C code of the pipeline:<br></div><div><br></div><div>===<br></div><div>    GstElement *source    = gst_element_factory_make("filesrc", "source");<br>    GstElement *parser    = gst_element_factory_make("mpegaudioparse", "parser");<br>    GstElement *decoder   = gst_element_factory_make("avdec_mp3", "decoder");<br>    GstElement *converter = gst_element_factory_make("audioconvert", "converter");<br><br>    GstElement *encoder   = gst_element_factory_make("vorbisenc", "encoder");<br>    GstElement *oggmux      = gst_element_factory_make("oggmux", "oggmux");<br>    GstElement *filesink  = gst_element_factory_make("filesink", "filesink");<br>    GstElement *bin       = gst_bin_new("bin");<br><br>    GstElement *sink      = gst_element_factory_make("splitmuxsink", "sink");<br><br>    GstElement *pipeline = gst_pipeline_new("test-pipeline");<br><br>    if (!pipeline || !source || !parser || !decoder || !converter || !encoder || !oggmux || !filesink || !bin || !sink) {<br>        g_printerr("Not all elements could be created.\n");<br>        *ret = -1; return ret;<br>    }<br><br>    g_object_set(source, "location", "audio.mp3", NULL);<br><br>    gst_bin_add_many(GST_BIN(bin), oggmux, filesink, NULL);<br>    if(gst_element_link_many(oggmux, filesink, NULL) != TRUE) {<br>        g_printerr("Not all elements could be linked in the encoder bin.\n");<br>        gst_object_unref(bin);<br>        gst_object_unref(pipeline);<br>        *ret = -1; return ret;<br>    }<br>    <br>    GstPad *sink_pad = gst_element_get_static_pad (oggmux, "sink");<br>    GstPad *ghost_sink_pad = gst_ghost_pad_new_from_template ("bin-sink", sink_pad, gst_pad_get_pad_template(sink_pad));<br>    gst_pad_set_active (ghost_sink_pad, TRUE);<br>    gst_element_add_pad (bin, ghost_sink_pad);<br>    gst_object_unref (sink_pad);<br><br>    g_object_set(sink, "location", "out_%d.ogg", NULL);<br>    g_object_set(sink, "muxer", encoder, NULL);<br>    g_object_set(sink, "sink", bin, NULL);<br>    g_object_set(sink, "max-size-time", 10000000000 NULL);<br><br>    gst_bin_add_many(GST_BIN(pipeline), source, parser, decoder, converter, sink, NULL);<br>    if (gst_element_link_many(source, parser, decoder, converter, sink, NULL) != TRUE) {<br>        g_printerr("Not all elements could be linked.\n");<br>        gst_object_unref(pipeline);<br>        *ret = -1; return ret;<br>    }</div><div>===</div><div><br></div><div>Using gstreamer v1.20.1 compiled from source<br></div><div><br></div></div>