# How can I get video capture from a virtual webcam?

**URL:** <https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650>\
**Category:** Libraries\
**Created:** [July 10, 2018, 8:46am UTC](https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650 "2018-07-10T08:46:03Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 4, 2025, 7:34pm UTC](https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650/11 "2025-01-04T19:34:43Z")

</div>

Hello folks!

Can someone please test this on their system(s):

> [@How can I get video capture from a virtual webcam?](https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650/10):
>
> Hello @niuuin, I did a fresh install of OBS Studio and the steps below worked for me. I am using: W10 Processing 4.3.1 OBS Studio 31.0.0(64 bit) GStreamer 1.24.10 No other plugins required! Steps using OBS Studio: Stop the Virtual Camera Open Tools \> Auto-Configuration Wizard Select I will only be using the virtual camera Start the Virtual Camera It only works if you install GStreamer. You must select the correct camera: slight_smile

Processing code (modified one of examples):

```auto
/**
 * CustomPipeline 
 * by Andres Colubri. 
 * 
 * Create a Capture object with a pipeline description to 
 * get video from non-standard sources.
 */

// This was modified below by GLV:

import processing.video.*;

Capture cam;

void setup() {
  size(640, 480);
  
  String[] cameras = Capture.list();
  
  if (cameras.length == 0) 
    {
    println("There are no cameras available for capture.");
    exit();
    } 
  else 
    {
    println("Available cameras:");
    printArray(cameras);
    
    // The camera can be initialized directly using an 
    // element from the array returned by list():
    cam = new Capture(this, cameras[7]);   
    cam.start(); 
    }      
  }

void draw() 
  {
  if (cam.available() == true) 
    {
    cam.read();
    }
  image(cam, 0, 0, width, height);
  }

```

Please provide a detailed list of your hardware and software.

I am using:

- W10
- Processing 4.3.1
- OBS Studio 31.0.0(64 bit)
- GStreamer 1.24.10

I also opened an issue here:

> <https://github.com/processing/processing-video/issues/227>
>
> Hello,
> 
> The current GStreamer that comes with video library was not detecting …OBS virtual cams.
> 
> I updated to the current GSTreamer and was able to detect OBS virtual cams.
> 
> Details here:
> 
> \[https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650/7\](https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650/7)

It works here for me:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/8/5894a50c51f21162f6e2461a77bc98fda92b7533.png)

Thanks!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/how-can-i-get-video-capture-from-a-virtual-webcam/1650)._
