[PD] Gem+v4l2loopback (was Re: pdp_vloopback ?)

Mario Mey mariomey at gmail.com
Thu Apr 23 21:02:41 CEST 2015

At the end, I'm telling a bug...

El 23/04/15 a las 12:14, IOhannes m zmoelnig escibiĆ³:
> On 2015-04-23 15:51, Mario Mey wrote:
>> 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...
> 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
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.

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?
>> - 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.
> 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.
[pix_flip] does the trick.
> anyhow, this means that the v4l2loopback output is working.
> so that leaves two more potential candidates for your*problem*:
Do you mean the Blender and VLC getting "problem"? It is resolved. 
Well... maybe it never was there.
> - the v4l2loopback kernel module (there are some known issues with e.g.
> gstreamer-1.0; which version are you using?)
I didn't know I had gstreamer installed on the system. I have 1.0 and 0.10.
> - 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...)
Blender and VLC get the video correctly.
>> - 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...
> checkout [pix_snap] to fetch a framebuffer into pixes.
I'll check it later.
> fgasm
> IOhannes

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:

- Remove pix_record before closing
- Send record 0 to pix_record before closing.

Is this a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150423/fd6c5d5b/attachment-0001.html>

More information about the Pd-list mailing list