Skip to content

Robotechnic/ofxV4l2loopback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ofxV4l2loopback

An openframeworks addon that allow to create virtual camera

This module use this lib: lbv4l2cpp

Intalation

  1. Install v4l2loopback

⚠️ You must install kernel headers to do that because v4l2loopback is a kernel module

  1. Create a virtual device
sudo modprobe v4l2loopback card_label="myCamNameHere" exclusive_caps=1
  1. Clone this repo
cd /yourOfPath/addons
git clone https://github.com:Robotechnic/ofxV4l2loopback.git --recurse-submodules -j8
  1. Include module in your project
  • Whith qt:

Just add ofxV4l2loopback in addons:

of.addons: [
    'ofxV4l2loopback'
]
  • With project generator:

Add ofxV4l2loopback in addons.make file

Usage

Firs, you need to init the camera:

ofxV4l2loopback virtualcam;
virtualcam.setup(width,height,device,fps);
parameter usage
width virtual device width
height virtual device height
device device number (Exemple: /dev/video1)
fps fps of device

Then, you just need to update cam render at each frames:

virtualcam.update(pixels)
parameter usage
pixels ofPixel that contain your frame

Examples

https://github.com/Robotechnic/live_ascii_video

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages