# DSLR Webcam on Raspberry Pi

**URL:** <https://discourse.processing.org/t/dslr-webcam-on-raspberry-pi/34336>\
**Category:** Processing for Pi\
**Created:** [December 28, 2021, 11:16am UTC](https://discourse.processing.org/t/dslr-webcam-on-raspberry-pi/34336 "2021-12-28T11:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrybadger](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@harrybadger](https://discourse.processing.org/u/harrybadger)\
**Post date:** [December 28, 2021, 11:16am UTC](https://discourse.processing.org/t/dslr-webcam-on-raspberry-pi/34336/1 "2021-12-28T11:16:09Z")

</div>

Hi,  
I want to use live webcam images in a Processing sketch.  
I have tried the example code from: [https://processing.org/reference/libraries/video/Capture.html](https://processing.org/reference/libraries/video/Capture.html)  
Processing isn’t able to detect my webcam.

I am running Processing 3 on a Raspberry Pi 4 B.  
My webcam is a DSLR.  
I am using a combination of gPhoto2, video4linux2loopback and ffmpeg to create a video stream from the DSLR.  
I am using these libraries to create an mjpeg stream and outputting it to: “/dev/video0”  
I have attached a screenshot of the setup of this stream.

 ![2021-12-28-110910_1711x417_scrot](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4bf0fc260038d96a0c8ab8ebd86a3bfa86683c70.png)

I know this stream is working as I am able to see webcam footage using an online webcam testing service:  
[https://webcamtests.com/](https://webcamtests.com/)  
The “Device Name” I have to select for my webcam is “Dummy video device (0x0000)”.

The problem I have is that “Capture” in Processing 3 won’t detect this webcam.  
I have also tried “Movie” and used my stream location “/dev/video0” as the filename.  
This did not work either.

Does anyone have any ideas on what I can try to get processing to read in my webcam stream?

Thanks  
Harry
