Skip to content

Instantly share code, notes, and snippets.

View hamoid's full-sized avatar
🎨

Abe Pazos hamoid

🎨
View GitHub Profile
@UriShX
UriShX / Mirror_w_export_stream.pde
Created November 24, 2020 13:18
Processing sketch - stream video to v4l2loopback example
/**
* Streaming a Processing script to a v4l2loopback target example
* by Uri Shani
*
* Depends on running v4l2loopback before starting the script:
* '$ sudo modprobe v4l2loopback devices=3 video_nr=10,11,12 card_label="Loopback_1","Loopback_2","Virtual_cam" exclusive_caps=1,1,1'
*
* Ffmpeg is used first for streaming default webcam (/dev/video0) to two loopback devices,
* the sketch then uses Loopback_1 (/dev/video10) as its video source by listing available cameras, and selecting the second device (cameras[1], line 79).
*
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.color.mix
import org.openrndr.color.rgb
import org.openrndr.draw.DrawPrimitive
import org.openrndr.draw.VertexElementType
import org.openrndr.draw.shadeStyle
import org.openrndr.draw.vertexBuffer