<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I intended to fix it later because this particular thing didn't
      seem to be the problem. But maybe I start with it today or on
      monday. I was aware of v4l2-compliance, thanks.</p>
    <p>In the meantime, I have done some findings:</p>
    <p>I used this command in my device:</p>
    <p>gst-launch-1.0 v4l2src device=/dev/video1 !
      video/x-raw,format=NV12,width=720,height=576 ! filesink
      location=raw_video.bin</p>
    <p>Then, I transfered raw_video.bin to my computer and used this
      command:</p>
    <p>gst-launch-1.0 filesrc location=raw_video.bin ! videoparse
      width=720 height=576 format=GST_VIDEO_FORMAT_NV12 ! videoconvert !
      autovideosink</p>
    <p>This way, I can see the image OK, not only lot of lines of random
      colors. So I concluded that the problem in my device must be in
      videoconvert or in xvimagesink, not in the cameras driver.<br>
    </p>
    My device is using an Allwinner A20 SoC. This SoC uses the
    framebuffer to output graphics, even using X11. So I installed
    fbdevsink plugin and tried this command:<br>
    <br>
    gst-launch-1.0 v4l2src device=/dev/video1 !
    video/x-raw,format=NV12,width=720,height=576 ! videoconvert !
    fbdevsink sync=false<br>
    <br>
    I can see the image OK. I still don't know if the problem is in
    videoconvert, in xvimagesink, or in both. However, I can't use
    fbdevsink because it interferes with X11, trying both of them to
    "take control" of the framebuffer. Any hint about what can I try to
    find out what's failing and how to solve it?<br>
    <br>
    Also, I have another problem. Only one of every 7 buffers seems to
    be updated with a new frame, the other 6 remains with the first fame
    they captured at the beginning, so I have a video of the same
    sequence of 6 frames repeating all time the same and one single
    frame that seems to be correct between each 6 frames sequence.<br>
    <br>
    This problem could be related with the driver, but it's strange
    because with the demo program this didn't happen.<br>
    <br>
    <div class="moz-cite-prefix">El 25/04/18 a las 15:26, Nicolas
      Dufresne escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKQmDh8fmtCyK5-O4iBC+gzxs9Jjorskev-QQcKwk6-FwdkHiA@mail.gmail.com">
      <div dir="auto">
        <div><br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr">Le mar. 24 avr. 2018 09:27, Iñigo Huguet <<a
                href="mailto:inigohuguet@fanamoel.com"
                moz-do-not-send="true">inigohuguet@fanamoel.com</a>>
              a écrit :<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't
              have playbin2, but I do have playbin.<br>
              <br>
              It doesn't work right now, I think it is because the
              driver doesn't <br>
              report correctly its available framesizes (width X
              height). That's why I <br>
              had to specify them with video/x-raw width=720,height=576<br>
              <br>
              There is any way to specify the framesize with playbin? If
              not, I will <br>
              try to fix the driver.<br>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">If that is an option for you, then it's best
          thing to do. By the way, are you aware of the v4l2-compliance
          test ? This test, which is part of v4l2-utils helps a lot to
          ensure your driver is usable across most userapace.</div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <br>
              <br>
              El 24/04/18 a las 12:45, Bernhard Graaf escribió:<br>
              > Have you try to use playbin2 instead?<br>
              > Something like 'gst-launch-1.0 playbin2
              uri=v4l2:///dev/video1'.<br>
              > If its works, have a look into the log and see what
              playbin2 had done.<br>
              ><br>
              > Bernhard<br>
              ><br>
              > -----Ursprüngliche Nachricht-----<br>
              > Von: gstreamer-devel [mailto:<a
                href="mailto:gstreamer-devel-bounces@lists.freedesktop.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">gstreamer-devel-bounces@lists.freedesktop.org</a>]<br>
              > Im Auftrag von Iñigo Huguet<br>
              > Gesendet: Dienstag, 24. April 2018 11:13<br>
              > An: Antonio Ospite; <a
                href="mailto:gstreamer-devel@lists.freedesktop.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a><br>
              > Betreff: Re: Displaying camera not working<br>
              ><br>
              > Hi.<br>
              ><br>
              > I have gotten one frame as you told me<br>
              ><br>
              > gst-launch-1.0 v4l2src num-buffers=1
              device=/dev/video1 !<br>
              > video/x-raw,format=NV12,width=720,height=576 !
              filesink<br>
              > location=raw_frame.bin<br>
              ><br>
              > Then, in my computer, I converted it to png:<br>
              ><br>
              > gst-launch-1.0 -v filesrc location=raw_frame.bin !
              videoparse width=720<br>
              > height=576 format=GST_VIDEO_FORMAT_NV12 !
              videoconvert ! pngenc !<br>
              > filesink location=raw_frame.png<br>
              ><br>
              > I can see the .png image correctly, so it seems that
              the driver outputs<br>
              > NV12. What can I try now? Maybe I need any additional
              plugin? (I'm using<br>
              > a custom build using Buildroot so I don't have all
              plugins installed)<br>
              ><br>
              > El 23/04/18 a las 17:09, Antonio Ospite escribió:<br>
              >> On Mon, 23 Apr 2018 16:26:42 +0200<br>
              >> Iñigo Huguet <<a
                href="mailto:inigohuguet@fanamoel.com" target="_blank"
                rel="noreferrer" moz-do-not-send="true">inigohuguet@fanamoel.com</a>>
              wrote:<br>
              >><br>
              >>> I have managed to solve a problem: it seems
              that the sprite was not well<br>
              >>> reported by the driver (it said it was 1080
              instead of 720). Now I think<br>
              >>> it gives the correct values for a 720x576px
              NV12 frame: sprite 720, size<br>
              >>> 622080<br>
              >>><br>
              >>> However, I still doesn't have a good output,
              and I don't know what to do<br>
              >>> to find what's wrong (I have no previous
              experience with video nor<br>
              >>> gstreamer).<br>
              >>><br>
              >>> With this pipeline: gst-launch-1.0 v4l2src
              device=/dev/video1 !<br>
              >>> video/x-raw,format=NV12,width=720,<br>
              >>> height=576 ! videoconvert ! xvimagesink
              sync=false<br>
              >>><br>
              >>> I only get an output with very colorful lines
              (almost horizontal lines).<br>
              >>><br>
              >>> I attach the output of the driver and
              gstreamer with<br>
              >>>
              GST_DEBUG=*videosink*:6,*imagesink*:6,*v4l2*:6<br>
              >>><br>
              >>> Any hint? Thanks!<br>
              >>><br>
              >> If you cannot trust the driver to report the
              correct data format (I am<br>
              >> thinking to the pixelformat in particular), then
              GStreamer videoconvert<br>
              >> won't be able to use the caps in any meaningful
              way.<br>
              >><br>
              >> You could analyze a raw frame to confirm that
              it's actually NV12.<br>
              >><br>
              >> A sample pipeline which (hopefully) dumps one
              frame is:<br>
              >><br>
              >>     gst-launch-1.0 v4l2src num-buffers=1
              device=/dev/video1 ! filesink<br>
              > location=raw_frame.bin<br>
              >> Upload the raw data somewhere and maybe someone
              will take a look<br>
              >> if they have time.<br>
              >><br>
              >> Ciao,<br>
              >>      Antonio<br>
              >><br>
              > _______________________________________________<br>
              > gstreamer-devel mailing list<br>
              > <a
                href="mailto:gstreamer-devel@lists.freedesktop.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a><br>
              > <a
                href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
              ><br>
              > _______________________________________________<br>
              > gstreamer-devel mailing list<br>
              > <a
                href="mailto:gstreamer-devel@lists.freedesktop.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a><br>
              > <a
                href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
              <br>
              _______________________________________________<br>
              gstreamer-devel mailing list<br>
              <a href="mailto:gstreamer-devel@lists.freedesktop.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a><br>
              <a
                href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
            </blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>