video/x-raw-gray on appsrc causes internal error when pipeline runs

wally bkg wb666greene at gmail.com
Fri Aug 12 11:15:12 PDT 2011


This has driven me nuts.  I'm using Ubuntu 10.04 64-bit with all patches
current as of this morning with their distribution gstreamer.


I set up three dynamically built pipelines using gst_element_link_filtered()
with the pipelines in the READY state, and gray caps as the end point for
appsink and starting point for the appsrc elements.  All linked without
errors but when the pipeline runs:

on_new_buffer_from_source() Callback entered, Got buffer.
Buffer caps: video/x-raw-gray, width=(int)640, height=(int)480,
framerate=(fraction)30000/1001, bpp=(int)8, depth=(int)8
obus Error: Internal data flow error.
Recording Pipeline Error: Internal data flow error.  GStreamer error:
negotiation problem.  Please file a bug at
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer
ibus: Video input End of stream.
Returned, stopping playback
Deleting pipelines

My caps are:
    // setup linking with filtered caps
    caps = gst_caps_new_simple ("video/x-raw-yuv",
            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),
          "width", G_TYPE_INT, 640,
          "height", G_TYPE_INT, 480,
          "framerate", GST_TYPE_FRACTION, 30000, 1001,
          NULL);

    caps_gray = gst_caps_new_simple ("video/x-raw-gray",
          "width", G_TYPE_INT, 640,
          "height", G_TYPE_INT, 480,
          "framerate", GST_TYPE_FRACTION, 30000, 1001,
          NULL);

    gst_app_sink_set_caps(GST_APP_SINK(app->appsink), caps_gray);
    gst_app_src_set_caps(GST_APP_SRC(app->vappsrc), caps_gray);
    gst_app_src_set_caps(GST_APP_SRC(app->rappsrc), caps_gray);



But changing only the caps on the appsink and appsrc elements and
final/initial element_link_filtered() calls

    gst_app_sink_set_caps(GST_APP_SINK(app->appsink), caps);
    gst_app_src_set_caps(GST_APP_SRC(app->vappsrc), caps);
    gst_app_src_set_caps(GST_APP_SRC(app->rappsrc), caps);

Everything seems to work fine and I get a recorded mp4 file that plays fine
in gstreamer (totem) and avidemux2 with working seeks.  Remaining issue is
the default ffenc_mpeg4 encoder setting produce a rather "blocky" video.
Any good suggestions for changing the mpeg4 encoder defaults to get a better
quality encoding?

If I use x264enc instead, I get a quality that is probably good enough but
seeking in totem gives video mosaic break up and avidemux2 throws up a
waring about H262 and possible crashes, but seems to handle it OK when I
ignore the warning.

The appsink pipeline is built dynamically to work around a v4l2/gstreamer
bug where one of my (the most important one right now) capture devices
negotiates a format the ends up with a black bar in the middle of the
image.  The details and seeds of the work around are here:
http://gstreamer-devel.966125.n4.nabble.com/What-is-the-point-of-gst-element-link-filtered-td3603886.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110812/dcc3354d/attachment.html>


More information about the gstreamer-devel mailing list