question on "transform could not transform video/x-raw ..."
Halley Zhao
aihua.halley.zhao at gmail.com
Sun May 5 01:44:06 UTC 2019
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 <nicolas at ndufresne.ca> 于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 <aihua.halley.zhao at gmail.com> 于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
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190505/32dc65cb/attachment-0001.html>
More information about the gstreamer-devel
mailing list