How to write/pipe to a virtual webcam created by V4L2loopback module?
Asked Answered
A

1

10

I have written an application which reads from a webcam and processes the frames using OpenCV on linux.

Now I want to pipe the output of my application to a virtual webcam that has been created by the V4L2loopback module so other applications are able to read it.

I have written the application using C.

How do I approach doing this?

Astrea answered 16/6, 2012 at 22:36 Comment(2)
There's nothing about OpenCV specifically here. Any app like this (never used, googled it) can gel well with OpenCV.Conley
Sorry what did you mean by the app you liked to can 'gel' with opencv? My question is how to use V4L2Loopback module to create a virtual webacam and write frames to it using my application so other applications can use the virtual video device to view the frames that I have written to it. ThanksAstrea
A
7

I have found an answer in the old V4L2loopback module's page on Google code.

http://code.google.com/p/v4l2loopback/source/browse/test.c

newer link: https://github.com/umlaeute/v4l2loopback/blob/master/examples/test.c

This has helped me so far just to write to the device.

Astrea answered 26/6, 2012 at 20:54 Comment(3)
btw, v4l2loopback is now developed at github and no longer at googlecode.Void
@user447519 could you provide a little code snippet? Unfortunately I was not able to make it work with the links above. My output on VLC remains black. Please see my post for this issue: #44509243Oddball
This amounts to a link-only answer. If the author doesn't fix within a reasonable time-frame, someone else please add a new answer and flag this one for deletion.Indifference

© 2022 - 2024 — McMap. All rights reserved.