dynamic pipeline, getting not-negotiated error when adding filesink

Piotr Szychowski zikann at gmail.com
Tue Sep 3 12:34:12 PDT 2013


Now It works!. The solution was to add "format" to capsfilter. Previous
caps filter string was:

caps = gst.Caps('video/x-raw-yuv,width=640,height=480,framerate=30/1')

and now it is:

caps = gst.Caps('video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=30/1')

The problem was that my webcam default output pixel format was "YUYV" and
the theoraenc element in my fileSink Bin not accepted this format, so
adding format=(fourcc)I420 helped. Still I don't know why the previous
capsfilter string worked with gst-launch but I don't mind now. Thanks for
help


2013/9/2 Piotr Szychowski <zikann at gmail.com>

> This works:
>
> gst-launch -e v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! tee name=splitter ! queue ! autovideosink splitter. ! queue ! theoraenc ! oggmux ! filesink location=testogg.ogg
>
>
> I'm trying to do the same in a dynamic way using python and pygst, the
> autovideosink branch is always there and after user input I want to
> attach the filesink.
>
>     fileSink = self.getFileSink()    #creates the filesink Bin
>     pad = fileSink.get_static_pad('sink')
>     pad.set_blocked_async(True, self.padBlockedOnRecordStart, None)
>     self.player.add(fileSink)
>     fileSink.set_state(gst.STATE_PLAYING)
>     self.player.get_by_name('splitter').link(fileSink)
>     pad.set_blocked_async(False, self.padBlockedOnRecordStart, None)
>
>
> on linking the splitter(tee) to the fileSink Bin I get this error:
>
> Error: GStreamer encountered a general stream error. gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:player/GstV4l2Src:video:
> streaming task paused, reason not-negotiated (-4)
>
> Any help would be appreciated.
>
> Regards
>
> Piotr Szychowski
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130903/c4abb5de/attachment.html>


More information about the gstreamer-devel mailing list