question on "transform could not transform video/x-raw ..."

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

question on "transform could not transform video/x-raw ..."

Halley Zhao
Hi expert:
I try to use appsrc-->videoencode-->appsink, but got the following error. "transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support".
while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:
0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(cb_need_data, 126)#######################
(readTestData, 91)
(readTestData, 102)target frame num: 0, read_ret: 460800
0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(free_data, 111)
0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.
0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)
(bus_call, 75)Error: Internal data stream error.

my code piece is as following, and the complete source file as attachment,
"
  // video source
  g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);
  GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",
                  "width", G_TYPE_INT, g_video_width,
                  "height", G_TYPE_INT, g_video_height,
                  "framerate", GST_TYPE_FRACTION, 25, 1,
                  NULL);
  if (!strcmp(g_src_name, "videotestsrc")) {
      DEBUG("uses videotestsrc");
  } else if (!strcmp(g_src_name, "appsrc")) {
    g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);
    g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);
  } else {
    ERROR("Not considered yet");
  }
  ret = gst_element_link_filtered(videosrc, videoencode, capsSource);
  gst_caps_unref(capsSource);
  capsSource = NULL;
  if (ret != TRUE) {
      WARN("fail to link elements");
      return -1;
  }"


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: question on "transform could not transform video/x-raw ..."

Halley Zhao
i can see Vinod Kesti's reply at :https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html; but i can't receive the mail in my box. it is strange.

according to Kesti's reply:
I use v4l2h264enc on nxp imx8 board, I don't think the reason is that v4l2h264enc doesn't support nv12 format. because if i use videotestsrc instead, the program runs ok.

Halley Zhao <[hidden email]> 于2019年4月30日周二 下午2:24写道:
Hi expert:
I try to use appsrc-->videoencode-->appsink, but got the following error. "transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support".
while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:
0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(cb_need_data, 126)#######################
(readTestData, 91)
(readTestData, 102)target frame num: 0, read_ret: 460800
0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(free_data, 111)
0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.
0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)
(bus_call, 75)Error: Internal data stream error.

my code piece is as following, and the complete source file as attachment,
"
  // video source
  g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);
  GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",
                  "width", G_TYPE_INT, g_video_width,
                  "height", G_TYPE_INT, g_video_height,
                  "framerate", GST_TYPE_FRACTION, 25, 1,
                  NULL);
  if (!strcmp(g_src_name, "videotestsrc")) {
      DEBUG("uses videotestsrc");
  } else if (!strcmp(g_src_name, "appsrc")) {
    g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);
    g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);
  } else {
    ERROR("Not considered yet");
  }
  ret = gst_element_link_filtered(videosrc, videoencode, capsSource);
  gst_caps_unref(capsSource);
  capsSource = NULL;
  if (ret != TRUE) {
      WARN("fail to link elements");
      return -1;
  }"


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: question on "transform could not transform video/x-raw ..."

Halley Zhao
here are more logs; i don't know where is the root failure

0:00:00.318770000 11242      0x541e720 DEBUG               GST_PADS gstpad.c:5182:store_sticky_event:<source:src> notify caps
0:00:00.318857000 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3937:check_sticky:<source:src> pushing all sticky events
0:00:00.318911875 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3867:push_sticky:<source:src> event stream-start was already received
0:00:00.318975875 11242      0x541e720 DEBUG              GST_EVENT gstpad.c:5638:gst_pad_send_event_unchecked:<capsfilter0:sink> have event type caps event: 0x5534160, time 99:99:99.999999999, seq-num 25, GstEventCaps, caps=(GstCaps)"video/x-raw\,\                     format\=\(string\)NV12\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)25/1";
0:00:00.319158500 11242      0x541e720 DEBUG               GST_CAPS gstutils.c:3123:gst_pad_query_accept_caps:<capsfilter0:sink> accept caps of video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.319263250 11242      0x541e720 DEBUG                  query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa0006140 accept-caps
0:00:00.319330125 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4006:gst_pad_query:<capsfilter0:sink> doing query 0xffffa0006140 (accept-caps)
0:00:00.319425000 11242      0x541e720 DEBUG             capsfilter gstcapsfilter.c:341:gst_capsfilter_accept_caps:<capsfilter0> can intersect: 1
0:00:00.319497125 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4029:gst_pad_query:<capsfilter0:sink> sent query 0xffffa0006140 (accept-caps), result 1
0:00:00.319567375 11242      0x541e720 DEBUG                default gstutils.c:3128:gst_pad_query_accept_caps:<capsfilter0:sink> query returned 1
0:00:00.319643000 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1297:gst_base_transform_setcaps:<capsfilter0:sink> have new caps 0x5530d40 video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.319767750 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:462:gst_base_transform_transform_caps:<capsfilter0> transform caps (direction = 2)
0:00:00.319854000 11242      0x541e720 DEBUG             capsfilter gstcapsfilter.c:296:gst_capsfilter_transform_caps:<capsfilter0> input:     video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320020375 11242      0x541e720 DEBUG             capsfilter gstcapsfilter.c:297:gst_capsfilter_transform_caps:<capsfilter0> filter:    (NULL)
0:00:00.320073625 11242      0x541e720 DEBUG             capsfilter gstcapsfilter.c:299:gst_capsfilter_transform_caps:<capsfilter0> caps filter:    video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320173250 11242      0x541e720 DEBUG             capsfilter gstcapsfilter.c:300:gst_capsfilter_transform_caps:<capsfilter0> intersect: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320273875 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:489:gst_base_transform_transform_caps:<capsfilter0> to: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320416250 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1083:gst_base_transform_find_transform:<capsfilter0> intersecting against padtemplate ANY
0:00:00.320468750 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1158:gst_base_transform_find_transform: have fixed caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320576250 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1165:gst_base_transform_find_transform:<capsfilter0> calling fixate_caps for video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 using caps    video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 on pad capsfilter0:src
0:00:00.320740500 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1032:gst_base_transform_default_fixate_caps:<capsfilter0> fixated to video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320845375 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1171:gst_base_transform_find_transform:<capsfilter0> after fixating video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.320956250 11242      0x541e720 DEBUG               GST_CAPS gstutils.c:3123:gst_pad_query_accept_caps:<encode:sink> accept caps of video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.321053375 11242      0x541e720 DEBUG                  query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa00061e0 accept-caps
0:00:00.321119875 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4006:gst_pad_query:<encode:sink> doing query 0xffffa00061e0 (accept-caps)
0:00:00.321180750 11242      0x541e720 DEBUG           videoencoder gstvideoencoder.c:894:gst_video_encoder_sink_query:<encode> received query 40963, accept-caps
0:00:00.321246000 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3129:gst_pad_query_accept_caps_default:<encode:sink> query accept-caps accept-caps query: 0xffffa00061e0, GstQueryAcceptCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)NV12\,\            width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)25/1", result=(boolean)false;
0:00:00.321397250 11242      0x541e720 DEBUG        GST_PERFORMANCE gstpad.c:3147:gst_pad_query_accept_caps_default:<encode:sink> fallback ACCEPT_CAPS query, consider implementing a specialized version
0:00:00.321452125 11242      0x541e720 DEBUG               GST_CAPS gstutils.c:3040:gst_pad_query_caps:<encode:sink> get pad caps with filter video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.321548000 11242      0x541e720 DEBUG                  query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa0006230 caps
0:00:00.321610875 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4006:gst_pad_query:<encode:sink> doing query 0xffffa0006230 (caps)
0:00:00.321669125 11242      0x541e720 DEBUG           videoencoder gstvideoencoder.c:894:gst_video_encoder_sink_query:<encode> received query 43523, caps
0:00:00.321847875 11242      0x541e720 DEBUG           v4l2videoenc gstv4l2videoenc.c:942:gst_v4l2_video_enc_sink_query:<encode> Returning sink caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace-                  mode=(string)progressive, colorimetry=(string){ bt709 }
0:00:00.321972375 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4029:gst_pad_query:<encode:sink> sent query 0xffffa0006230 (caps), result 1
0:00:00.322041250 11242      0x541e720 DEBUG               GST_CAPS gstutils.c:3047:gst_pad_query_caps:<encode:sink> query returned video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace-mode=(string)progressive,          colorimetry=(string){ bt709 }
0:00:00.322187500 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3160:gst_pad_query_accept_caps_default:<encode:sink> allowed caps subset video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace-                 mode=(string)progressive, colorimetry=(string){ bt709 }, caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1
0:00:00.322348250 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3438:gst_pad_query_default:<encode:sink> not forwarding 0xffffa00061e0 (accept-caps) query
0:00:00.322416250 11242      0x541e720 DEBUG               GST_PADS gstpad.c:4029:gst_pad_query:<encode:sink> sent query 0xffffa00061e0 (accept-caps), result 1
0:00:00.322481125 11242      0x541e720 DEBUG                default gstutils.c:3128:gst_pad_query_accept_caps:<encode:sink> query returned 0
0:00:00.322539250 11242      0x541e720 DEBUG          basetransform gstbasetransform.c:1212:gst_base_transform_find_transform:<capsfilter0> FAILED to get peer of <capsfilter0:src> to accept video/x-raw, format=(string)NV12, width=(int)640, height=(int)480,              framerate=(fraction)25/1
0:00:00.322666875 11242      0x541e720 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
0:00:00.322776125 11242      0x541e720 DEBUG               GST_PADS gstpad.c:5712:gst_pad_send_event_unchecked:<capsfilter0:sink> sent event, ret not-negotiated
0:00:00.322837000 11242      0x541e720 DEBUG               GST_PADS gstpad.c:3916:push_sticky:<source:src> result not-negotiated, mark pending events


Halley Zhao <[hidden email]> 于2019年4月30日周二 下午3:16写道:
i can see Vinod Kesti's reply at :https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html; but i can't receive the mail in my box. it is strange.

according to Kesti's reply:
I use v4l2h264enc on nxp imx8 board, I don't think the reason is that v4l2h264enc doesn't support nv12 format. because if i use videotestsrc instead, the program runs ok.

Halley Zhao <[hidden email]> 于2019年4月30日周二 下午2:24写道:
Hi expert:
I try to use appsrc-->videoencode-->appsink, but got the following error. "transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support".
while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:
0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(cb_need_data, 126)#######################
(readTestData, 91)
(readTestData, 102)target frame num: 0, read_ret: 460800
0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
(free_data, 111)
0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.
0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)
(bus_call, 75)Error: Internal data stream error.

my code piece is as following, and the complete source file as attachment,
"
  // video source
  g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);
  GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",
                  "width", G_TYPE_INT, g_video_width,
                  "height", G_TYPE_INT, g_video_height,
                  "framerate", GST_TYPE_FRACTION, 25, 1,
                  NULL);
  if (!strcmp(g_src_name, "videotestsrc")) {
      DEBUG("uses videotestsrc");
  } else if (!strcmp(g_src_name, "appsrc")) {
    g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);
    g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);
  } else {
    ERROR("Not considered yet");
  }
  ret = gst_element_link_filtered(videosrc, videoencode, capsSource);
  gst_caps_unref(capsSource);
  capsSource = NULL;
  if (ret != TRUE) {
      WARN("fail to link elements");
      return -1;
  }"


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

log.txt (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: question on "transform could not transform video/x-raw ..."

Nicolas Dufresne-5
In reply to this post by Halley Zhao
Le mardi 30 avril 2019 à 15:16 +0800, Halley Zhao a écrit :
> i can see Vinod Kesti's reply at :https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html; but i can't receive the mail in my box. it is strange.

It's GMail fighting against Yahoo email. They pretend that Yahoo is
doing something wrong and randomly mark yahoo email as spam. What I did
is that I have a filter for this ML to place that into a directory and
in the Gmail web-ui there is a check box for no-spam-check for this
label.

>
> according to Kesti's reply:
> I use v4l2h264enc on nxp imx8 board, I don't think the reason is that v4l2h264enc doesn't support nv12 format. because if i use videotestsrc instead, the program runs ok.

I know NXP had a patchset recently that they wanted to upload to
GStreamer, they didn't say for which HW. But instead of doing a merge
request, they pasted the patches. We ask for an MR and they simply
closed the ticket and never came back to us. Maybe that fixes your
issues ?

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/587

>
> Halley Zhao <[hidden email]> 于2019年4月30日周二 下午2:24写道:
> > Hi expert:
> > I try to use appsrc-->videoencode-->appsink, but got the following error. "transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support".
> > while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:
> > “
> > 0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
> > 0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > (cb_need_data, 126)#######################
> > (readTestData, 91)
> > (readTestData, 102)target frame num: 0, read_ret: 460800
> > 0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > 0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > (free_data, 111)
> > 0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.
> > 0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)
> > (bus_call, 75)Error: Internal data stream error.
format=NV12 might not be the thing that fails to match. Maybe you could
set "GST_DEBUG="v4l2*:7" and attach the log, we could try and find what
is found to be supported by v4l2h264enc.

> > ”
> >
> > my code piece is as following, and the complete source file as attachment,
> > "
> >   // video source
> >   g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);
> >   GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",
> >                   "width", G_TYPE_INT, g_video_width,
> >                   "height", G_TYPE_INT, g_video_height,
> >                   "framerate", GST_TYPE_FRACTION, 25, 1,
> >                   NULL);
> >   if (!strcmp(g_src_name, "videotestsrc")) {
> >       DEBUG("uses videotestsrc");
> >   } else if (!strcmp(g_src_name, "appsrc")) {
> >     g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);
> >     g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);
> >   } else {
> >     ERROR("Not considered yet");
> >   }
> >   ret = gst_element_link_filtered(videosrc, videoencode, capsSource);
> >   gst_caps_unref(capsSource);
> >   capsSource = NULL;
> >   if (ret != TRUE) {
> >       WARN("fail to link elements");
> >       return -1;
> >   }"
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: question on "transform could not transform video/x-raw ..."

Halley Zhao
thanks Nicolas.

I tried to add more restriction of my capfilter, then it works. 
diff --git a/cow/src/components/gst-test/codec-appsink.c b/cow/src/components/gst-test/codec-appsink.c
index de420b3..a39f3f9 100644
--- a/cow/src/components/gst-test/codec-appsink.c
+++ b/cow/src/components/gst-test/codec-appsink.c
@@ -223,6 +223,8 @@ main (gint   argc,
                   "width", G_TYPE_INT, g_video_width,
                   "height", G_TYPE_INT, g_video_height,
                   "framerate", GST_TYPE_FRACTION, 25, 1,
+                  "interlace-mode", G_TYPE_STRING, "progressive",
+                  "colorimetry", G_TYPE_STRING, "bt709",
                   NULL);
   if (!strcmp(g_src_name, "videotestsrc")) {
       DEBUG("uses videotestsrc");

I'm using gst 1.14 version, and from the link here: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/423
the work around hasn't been included in 1.14 release.

Nicolas Dufresne <[hidden email]> 于2019年5月1日周三 上午5:25写道:
Le mardi 30 avril 2019 à 15:16 +0800, Halley Zhao a écrit :
> i can see Vinod Kesti's reply at :https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html; but i can't receive the mail in my box. it is strange.

It's GMail fighting against Yahoo email. They pretend that Yahoo is
doing something wrong and randomly mark yahoo email as spam. What I did
is that I have a filter for this ML to place that into a directory and
in the Gmail web-ui there is a check box for no-spam-check for this
label.

>
> according to Kesti's reply:
> I use v4l2h264enc on nxp imx8 board, I don't think the reason is that v4l2h264enc doesn't support nv12 format. because if i use videotestsrc instead, the program runs ok.

I know NXP had a patchset recently that they wanted to upload to
GStreamer, they didn't say for which HW. But instead of doing a merge
request, they pasted the patches. We ask for an MR and they simply
closed the ticket and never came back to us. Maybe that fixes your
issues ?

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/587

>
> Halley Zhao <[hidden email]> 于2019年4月30日周二 下午2:24写道:
> > Hi expert:
> > I try to use appsrc-->videoencode-->appsink, but got the following error. "transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support".
> > while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:
> > “
> > 0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
> > 0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > (cb_need_data, 126)#######################
> > (readTestData, 91)
> > (readTestData, 102)target frame num: 0, read_ret: 460800
> > 0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > 0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support
> > (free_data, 111)
> > 0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.
> > 0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)
> > (bus_call, 75)Error: Internal data stream error.

format=NV12 might not be the thing that fails to match. Maybe you could
set "GST_DEBUG="v4l2*:7" and attach the log, we could try and find what
is found to be supported by v4l2h264enc.

> > ”
> >
> > my code piece is as following, and the complete source file as attachment,
> > "
> >   // video source
> >   g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);
> >   GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",
> >                   "width", G_TYPE_INT, g_video_width,
> >                   "height", G_TYPE_INT, g_video_height,
> >                   "framerate", GST_TYPE_FRACTION, 25, 1,
> >                   NULL);
> >   if (!strcmp(g_src_name, "videotestsrc")) {
> >       DEBUG("uses videotestsrc");
> >   } else if (!strcmp(g_src_name, "appsrc")) {
> >     g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);
> >     g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);
> >   } else {
> >     ERROR("Not considered yet");
> >   }
> >   ret = gst_element_link_filtered(videosrc, videoencode, capsSource);
> >   gst_caps_unref(capsSource);
> >   capsSource = NULL;
> >   if (ret != TRUE) {
> >       WARN("fail to link elements");
> >       return -1;
> >   }"
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel