After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765352 - matroskademux0: GStreamer encountered a general stream error.
matroskademux0: GStreamer encountered a general stream error.
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.8.0
Other other
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-21 00:12 UTC by Johan Basore
Modified: 2016-04-21 06:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan Basore 2016-04-21 00:12:33 UTC
Hello,

I have build a video compositor for iOS, but it has error with matroskademux.
Here are source codes.

    GstBus *bus;
    GSource *bus_source;

    GstElement *source1, *clrspace1, *clrspace2, *clrspace, *videobox1, *sink, *source2, *mpegenc, *avimux;
    GstElement *videomixer;
    GstElement *decodebin1, *decodebin2;
    
    //GstElement *matroskademux1, *vp8dec1, *matroskademux2, *vp8dec2;
    
    
    GST_DEBUG ("Creating pipeline");
    
    /* Create our own GLib Main Context and make it the default one */
    context = g_main_context_new ();
    g_main_context_push_thread_default(context);

    /****************************************************************************************************************************/

    /* Build pipeline */
    pipeline = gst_pipeline_new("pipelinecomposer");
    source1 = gst_element_factory_make("filesrc", "source1");
    source2 = gst_element_factory_make("filesrc", "source2");
    videobox1 = gst_element_factory_make("videobox", "videobox");
    videomixer = gst_element_factory_make("videomixer", "videomixer");
    clrspace1 = gst_element_factory_make("videoconvert", "clrspace1");
    clrspace2 = gst_element_factory_make("videoconvert", "clrspace2");
    clrspace = gst_element_factory_make("videoconvert", "clrspace");
    sink = gst_element_factory_make("filesink", "sink");
    mpegenc = gst_element_factory_make("x264enc", "mpegenc");
    avimux = gst_element_factory_make("mpegtsmux", "avimux");
    decodebin1 = gst_element_factory_make("decodebin", "decodebin1");
    decodebin2 = gst_element_factory_make("decodebin", "decodebin2");
    
    
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"1.avi"];
    
    NSString *filePath_1 = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"1.webm"];
    NSString *filePath_2 = [NSString stringWithFormat:@"%@/%@", documentsDirectory, @"2.webm"];
    
    g_object_set (source1, "location", [filePath_1 UTF8String], NULL);
    g_object_set (source2, "location", [filePath_2 UTF8String], NULL);
    
    g_object_set (G_OBJECT (sink), "location", [filePath UTF8String], NULL);
    
    if (!mpegenc || !avimux) {
        GST_DEBUG("No Enc");
    }
    if (!sink) {
        GST_DEBUG ("No Sink");
    }
    
    if (!decodebin1) {
        GST_DEBUG ("No Decodebin");
    }

    g_object_set(videobox1,"border-alpha",0,"top",0,"left",0,NULL);
    
    gst_bin_add_many(GST_BIN (pipeline), source1, sink, videobox1, videomixer, clrspace1, clrspace2, clrspace, source2, mpegenc, avimux, decodebin1, decodebin2, nil);
    
    gst_element_link_many(source1, decodebin1, clrspace1, videobox1, videomixer, clrspace, mpegenc, avimux, sink, nil);
    gst_element_link_many(source2, decodebin2, clrspace2, videomixer, nil);
        
    gst_element_set_state(pipeline, GST_STATE_PLAYING);
    
    /****************************************************************************************************************************/

    /* Instruct the bus to emit signals for each received message, and connect to the interesting signals */
    bus = gst_element_get_bus (pipeline);
    bus_source = gst_bus_create_watch (bus);
    g_source_set_callback (bus_source, (GSourceFunc) gst_bus_async_signal_func, NULL, NULL);
    g_source_attach (bus_source, context);
    g_source_unref (bus_source);
    g_signal_connect (G_OBJECT (bus), "message::error", (GCallback)error_cb, (__bridge void *)self);
    g_signal_connect (G_OBJECT (bus), "message::state-changed", (GCallback)state_changed_cb, (__bridge void *)self);
    gst_object_unref (bus);
    
    /* Create a GLib Main Loop and set it to run */
    GST_DEBUG ("Entering main loop...");
    main_loop = g_main_loop_new (context, FALSE);
    g_main_loop_run (main_loop);
    GST_DEBUG ("Exited main loop");
    g_main_loop_unref (main_loop);
    main_loop = NULL;
    
    /* Free resources */
    g_main_context_pop_thread_default(context);
    g_main_context_unref (context);
    gst_element_set_state (pipeline, GST_STATE_NULL);
    gst_object_unref (pipeline);


    And here is the error message.

    Error received from element matroskademux0:GStreamer encountered a general stream error.
Comment 1 Sebastian Dröge (slomo) 2016-04-21 06:27:03 UTC
This looks more like a support request than an actual bug report. Please ask this on the mailing list, include your code there too (a runnable version) and also include a full debug log to make it easier to spot the problem. You should also use compositor instead of videomixer.

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel