<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">At the end, I'm telling a bug...<br>
      <br>
      El 23/04/15 a las 12:14, IOhannes m zmoelnig escibiĆ³:<br>
    </div>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite">
      <pre wrap="">On 2015-04-23 15:51, Mario Mey wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Well, I don't know if I was on 'video' group but I did the addition.  I
checked the file you sent me and it works. However, for the moment, I
have 3 questions:

- If I don't activate the device in the right side of the patch, nor
Blender nor VLC can get the image from /dev/video1 (VLC shows errors on
console, Blender says nothing, but it makes black texture) Why is like
that? Supposedly, being pix_record there and activated, I should get
from where I want...
</pre>
      </blockquote>
      <pre wrap="">
this could have a multitude of reasons.
i would suggest first checking what those errors are that VLC throws
(chances are they mean something).
then try using gstreamer(-0.10!) to display the video. something like:
  $ gst-launch0.10 v4l2src device=/dev/video1 ! ffmpegcolorspace !
xvimagesink</pre>
    </blockquote>
    After some tests (including using gst-launch0.10)... I realized that
    I was wrong. Blender and VLC can read from /dev/video1 without
    activating it on Pd.<br>
    <br>
    But... I need to create gemwin before VLC or Blender or Gstreamer.
    Is this normal? Should I need gem window opened? It is for gemhead
    to make gemlists... isn't it?<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite"><br>
      <blockquote type="cite">
        <pre wrap="">- Look at the attached image: why the video is vertically inverted? I
don't know about GEM, but I didn't find any object that do that.
</pre>
      </blockquote>
      <pre wrap="">
it's the olde discrepancy between openGL image coordinates (starting in
the lower left corner) and most other pixel coordinates (starting in the
upper left corner), and a small bug in the old recordV4L2 implementation
of Gem (which should be fixed in recent git).
iirc putting a [pix_flip] before [pix_record] might fix the problem.</pre>
    </blockquote>
    [pix_flip] does the trick.<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite">
      <pre wrap="">

anyhow, this means that the v4l2loopback output is working.
so that leaves two more potential candidates for your <b>problem</b>:</pre>
    </blockquote>
    Do you mean the Blender and VLC getting "problem"? It is resolved.
    Well... maybe it never was there.<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite">
      <pre wrap="">
- the v4l2loopback kernel module (there are some known issues with e.g.
gstreamer-1.0; which version are you using?)</pre>
    </blockquote>
    I didn't know I had gstreamer installed on the system. I have 1.0
    and 0.10.<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite">
      <pre wrap="">
- the consumer applications (blender/vlc): while working on the
v4l2loopback module i noticed that quite a number of v4l2 applications
make unjustified assumptions about the v4l2 device, which sometimes are
not satisfied by v4l2loopback. (like refusing to work when the card_name
does not match the device-name...)</pre>
    </blockquote>
    Blender and VLC get the video correctly.<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite"><br>
      <blockquote type="cite">
        <pre wrap="">- How the patch should be if I want to send the GEM window to loopback?
I mean, not only the color and vertical inverted video, but the whole
window...
</pre>
      </blockquote>
      <pre wrap="">
checkout [pix_snap] to fetch a framebuffer into pixes.</pre>
    </blockquote>
    I'll check it later.<br>
    <blockquote cite="mid:55390C50.2080809@iem.at" type="cite">
      <pre wrap="">fgasm
IOhannes
</pre>
    </blockquote>
    <br>
    Using the patch from Antoine, when I click in [device /dev/video1(
    from the right side of the patch, the rectangle with the video
    appears. But when I try to close Pd, it freezes. I have to kill it.
    I tried some things with no success:<br>
    <br>
    - Remove pix_record before closing<br>
    - Send record 0 to pix_record before closing.<br>
    <br>
    Is this a bug?<br>
  </body>
</html>