caps error with videoscale

Chuck Crisler ccrisler at mutualink.net
Mon Jan 6 06:51:06 PST 2014


You are correct. I wasn't checking the return code from the link call (my
bad) and it is failing. Here is the log.

Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.155957131  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1695:gst_element_link_pads_full: linked pad
VideoRateControl:src to pad capsfilter1:sink
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.155967116  8566
0xf6810bf8 INFO        GST_ELEMENT_PADS
gstutils.c:1592:gst_element_link_pads_full: trying to link element
capsfilter1:src to element VideoScaler:(any)
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.155976413  8566
0xf6810bf8 INFO        GST_ELEMENT_PADS
gstelement.c:958:gst_element_get_static_pad: found pad capsfilter1:src
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.155985142  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1678:gst_element_link_pads_full: looping through allowed
src and dest pads
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.155993411  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1681:gst_element_link_pads_full: trying src pad
capsfilter1:src
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156001820  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1111:gst_element_get_compatible_pad: finding pad in
VideoScaler compatible with capsfilter1:src
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156011512  8566
0xf6810bf8 INFO                GST_PADS
gstutils.c:1046:gst_pad_check_link: trying to link capsfilter1:src and
VideoScaler:src
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156020281  8566
0xf6810bf8 INFO                GST_PADS
gstutils.c:1066:gst_pad_check_link: Sink pad VideoScaler:src is not
sink pad, failed
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156028538  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1164:gst_element_get_compatible_pad: already linked or
cannot be linked (peer = (nil))
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156037399  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1166:gst_element_get_compatible_pad: unreffing pads
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156046081  8566
0xf6810bf8 INFO                GST_PADS
gstutils.c:1046:gst_pad_check_link: trying to link capsfilter1:src and
VideoScaler:sink
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156059712  8566
0xf6810bf8 DEBUG               GST_PADS
gstghostpad.c:214:gst_proxy_pad_do_getcaps:<VideoDecoder:src0> get
caps of target ffdec_h2640:src : video/x-raw-rgb; video/x-raw-yuv
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156260260  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1160:gst_element_get_compatible_pad: incompatible pads
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156272892  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1166:gst_element_get_compatible_pad: unreffing pads
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156281855  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1188:gst_element_get_compatible_pad:<VideoScaler> Could not
find a compatible unlinked always pad to link to capsfilter1:src, now
checking request pads
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156297279  8566
0xf6810bf8 DEBUG               GST_PADS
gstghostpad.c:214:gst_proxy_pad_do_getcaps:<VideoDecoder:src0> get
caps of target ffdec_h2640:src : video/x-raw-rgb; video/x-raw-yuv
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156368745  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:889:gst_element_get_compatible_pad_template: Looking for a
suitable pad template in VideoScaler out of 2 templates...
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156385566  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:930:gst_element_get_compatible_pad_template: No compatible
pad template found
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156397624  8566
0xf6810bf8 INFO        GST_ELEMENT_PADS
gstutils.c:1209:gst_element_get_compatible_pad:<VideoScaler> Could not
find a compatible pad to link to capsfilter1:src
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156407619  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1720:gst_element_link_pads_full: no link possible from
capsfilter1:src to VideoScaler
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156416834  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1775:gst_element_link_pads_full: we might have request pads
on both sides, checking...
Jan  3 16:09:36 imsvcctl[8566]: 0:00:00.156425449  8566
0xf6810bf8 DEBUG       GST_ELEMENT_PADS
gstutils.c:1816:gst_element_link_pads_full: no link possible from
capsfilter1 to VideoScaler

Here is my source code.

                            GstCaps *pScaleCaps =
gst_caps_new_simple("video/x-raw-yuv", "width", G_TYPE_INT,
pObject->outputOptions_.adapter.iWidth,

"height", G_TYPE_INT, pObject->outputOptions_.adapter.iHeight,

"format", GST_TYPE_FOURCC, "I420", NULL);
                            GstCaps *pRateCaps =
gst_caps_new_simple("video/x-raw-yuv", "framerate", GST_TYPE_FRACTION,

pObject->outputOptions_.adapter.iFrameRate, 1,

"format", GST_TYPE_FOURCC, "I420", NULL);
                            bRet =
gst_element_link_filtered(pObject->decoder_, pObject->videoRate_,
pRateCaps);
                            bRet =
gst_element_link_filtered(pObject->videoRate_, pObject->videoScale_,
pScaleCaps);
                            bRet =
gst_element_link_many(pObject->videoScale_, pObject->queue2_,
pObject->encoder_,

pObject->videoRTPPayloader_, pObject->sink_, NULL);

Here is my script that works. The pipeline from the C program is intended
to be the same.

export GST_DEBUG=videorate:4,videoscale:4,ffmpeg:4
gst-launch -vvv udpsrc port=$1 ! mpegtsdemux ! \
    ffdec_h264 ! videorate ! 'video/x-raw-yuv,framerate=15/1' ! videoscale
! 'video/x-raw-yuv,width=320,height=240' ! \
    x264enc bitrate=256 tune=zerolatency ! video/x-h264 ! rtph264pay pt=96
config-interval=2 ! udpsink host=$2 port=$3

I don't understand why the negotiation between the rate control and the
scaler is failing.

Chuck


On Sun, Jan 5, 2014 at 4:50 AM, Sebastian Dröge
<sebastian at centricular.com>wrote:

> On Fr, 2014-01-03 at 12:15 -0500, Chuck Crisler wrote:
> > I am using GStreamer 0.10.30 and trying to transcode/scale/transmux a
> video
> > stream. The pipeline seems to link but fails with about the first video
> > frame due to a pad/caps not negotiated. My pipeline is:
> >
> >
> udpsrc->mpegtsdemux->decodebin2->videorate->videoscale->queue->x264enc->RTPh264pay->udpsink
> >
> > I link the videorate using gst_element_link_filtered with
> video/x-raw-yuv,
> > framerate=15
> > I link the videoscale using gst_element_link_filtered with
> video/x-raw-yuv,
> > width=320, height=240
> > The original source is 640x480.
> >
> > If I take the videoscale filter out the pipeline works, so that is
> somehow
> > causing my error.
> >
> > I would greatly appreciate any help.
> >
> > Here is a snippet of the log at failure.
> > [...]
>
> Please provide more of that log, the actual error is still above the
> lines you pasted :) Also a simple testcase to reproduce it would be
> useful to have, ideally without all the network stuff.
>
> --
> Sebastian Dröge, Centricular Ltd - http://www.centricular.com
> Expertise, Straight from the Source
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140106/3ffb6b87/attachment.html>


More information about the gstreamer-devel mailing list