<div dir="ltr"><div><div><div><div>You are correct. I wasn't checking the return code from the link call (my bad) and it is failing. Here is the log.<br><br>Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.155957131 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1695:gst_element_link_pads_full:[00m linked pad VideoRateControl:src to pad capsfilter1:sink<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.155967116 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1592:gst_element_link_pads_full:[00m trying to link element capsfilter1:src to element VideoScaler:(any)<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.155976413 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;37;41m GST_ELEMENT_PADS gstelement.c:958:gst_element_get_static_pad:[00m found pad capsfilter1:src<br>Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.155985142 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1678:gst_element_link_pads_full:[00m looping through allowed src and dest pads<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.155993411 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1681:gst_element_link_pads_full:[00m trying src pad capsfilter1:src<br>Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156001820 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1111:gst_element_get_compatible_pad:[00m finding pad in VideoScaler compatible with capsfilter1:src<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156011512 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;31;41m GST_PADS gstutils.c:1046:gst_pad_check_link:[00m trying to link capsfilter1:src and VideoScaler:src<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156020281 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;31;41m GST_PADS gstutils.c:1066:gst_pad_check_link:[00m Sink pad VideoScaler:src is not sink pad, failed<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156028538 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1164:gst_element_get_compatible_pad:[00m already linked or cannot be linked (peer = (nil))<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156037399 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1166:gst_element_get_compatible_pad:[00m unreffing pads<br>Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156046081 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;31;41m GST_PADS gstutils.c:1046:gst_pad_check_link:[00m trying to link capsfilter1:src and VideoScaler:sink<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156059712 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;31;41m GST_PADS gstghostpad.c:214:gst_proxy_pad_do_getcaps:<VideoDecoder:src0>[00m get caps of target ffdec_h2640:src : video/x-raw-rgb; video/x-raw-yuv<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156260260 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1160:gst_element_get_compatible_pad:[00m incompatible pads<br>Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156272892 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1166:gst_element_get_compatible_pad:[00m unreffing pads<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156281855 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1188:gst_element_get_compatible_pad:<VideoScaler>[00m Could not find a compatible unlinked always pad to link to capsfilter1:src, now checking request pads<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156297279 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;31;41m GST_PADS gstghostpad.c:214:gst_proxy_pad_do_getcaps:<VideoDecoder:src0>[00m get caps of target ffdec_h2640:src : video/x-raw-rgb; video/x-raw-yuv<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156368745 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:889:gst_element_get_compatible_pad_template:[00m Looking for a suitable pad template in VideoScaler out of 2 templates...<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156385566 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:930:gst_element_get_compatible_pad_template:[00m No compatible pad template found<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156397624 [335m 8566[00m 0xf6810bf8 [32;01mINFO [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1209:gst_element_get_compatible_pad:<VideoScaler>[00m Could not find a compatible pad to link to capsfilter1:src<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156407619 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1720:gst_element_link_pads_full:[00m no link possible from capsfilter1:src to VideoScaler<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156416834 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1775:gst_element_link_pads_full:[00m we might have request pads on both sides, checking...<br>
Jan 3 16:09:36 imsvcctl[8566]: 0:00:00.156425449 [335m 8566[00m 0xf6810bf8 [36mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstutils.c:1816:gst_element_link_pads_full:[00m no link possible from capsfilter1 to VideoScaler<br>
<br></div>Here is my source code.<br><br> GstCaps *pScaleCaps = gst_caps_new_simple("video/x-raw-yuv", "width", G_TYPE_INT, pObject->outputOptions_.adapter.iWidth,<br> "height", G_TYPE_INT, pObject->outputOptions_.adapter.iHeight,<br>
"format", GST_TYPE_FOURCC, "I420", NULL);<br> GstCaps *pRateCaps = gst_caps_new_simple("video/x-raw-yuv", "framerate", GST_TYPE_FRACTION,<br>
pObject->outputOptions_.adapter.iFrameRate, 1,<br> "format", GST_TYPE_FOURCC, "I420", NULL);<br>
bRet = gst_element_link_filtered(pObject->decoder_, pObject->videoRate_, pRateCaps);<br> bRet = gst_element_link_filtered(pObject->videoRate_, pObject->videoScale_, pScaleCaps);<br>
bRet = gst_element_link_many(pObject->videoScale_, pObject->queue2_, pObject->encoder_,<br> pObject->videoRTPPayloader_, pObject->sink_, NULL);<br>
<br></div>Here is my script that works. The pipeline from the C program is intended to be the same.<br><br>export GST_DEBUG=videorate:4,videoscale:4,ffmpeg:4<br>gst-launch -vvv udpsrc port=$1 ! mpegtsdemux ! \<br> ffdec_h264 ! videorate ! 'video/x-raw-yuv,framerate=15/1' ! videoscale ! 'video/x-raw-yuv,width=320,height=240' ! \<br>
x264enc bitrate=256 tune=zerolatency ! video/x-h264 ! rtph264pay pt=96 config-interval=2 ! udpsink host=$2 port=$3<br><br></div>I don't understand why the negotiation between the rate control and the scaler is failing.<br>
<br></div>Chuck<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 5, 2014 at 4:50 AM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fr, 2014-01-03 at 12:15 -0500, Chuck Crisler wrote:<br>
> I am using GStreamer 0.10.30 and trying to transcode/scale/transmux a video<br>
> stream. The pipeline seems to link but fails with about the first video<br>
> frame due to a pad/caps not negotiated. My pipeline is:<br>
><br>
> udpsrc->mpegtsdemux->decodebin2->videorate->videoscale->queue->x264enc->RTPh264pay->udpsink<br>
><br>
> I link the videorate using gst_element_link_filtered with video/x-raw-yuv,<br>
> framerate=15<br>
> I link the videoscale using gst_element_link_filtered with video/x-raw-yuv,<br>
> width=320, height=240<br>
> The original source is 640x480.<br>
><br>
> If I take the videoscale filter out the pipeline works, so that is somehow<br>
> causing my error.<br>
><br>
> I would greatly appreciate any help.<br>
><br>
> Here is a snippet of the log at failure.<br>
</div>> [...]<br>
<br>
Please provide more of that log, the actual error is still above the<br>
lines you pasted :) Also a simple testcase to reproduce it would be<br>
useful to have, ideally without all the network stuff.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
Expertise, Straight from the Source<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>