# External webcam not working with video library

**URL:** <https://discourse.processing.org/t/external-webcam-not-working-with-video-library/34438>\
**Category:** Libraries\
**Created:** [January 3, 2022, 5:09am UTC](https://discourse.processing.org/t/external-webcam-not-working-with-video-library/34438 "2022-01-03T05:09:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortap](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mortap](https://discourse.processing.org/u/mortap)\
**Post date:** [January 3, 2022, 5:09am UTC](https://discourse.processing.org/t/external-webcam-not-working-with-video-library/34438/1 "2022-01-03T05:09:02Z")

</div>

Hello,  
I’m having trouble getting Processing to use an external webcam (that is from the Sony ImagingEdge extension) which does work in other apps, like Zoom.

It works here:

> **[Select audio and video sources](https://webrtc.github.io/samples/src/content/devices/input-output/)**
>
> WebRTC code samples

Does the Processing Video library use a similar code that was used there?  
`mediaDevices.enumerateDevices()`

Anyway, here is my relevant code:

```auto
String[] cameras = Capture.list();

myCap = new Capture(this, cameras[1]);
myCap.start();

```

The Console displays:

> Available cameras:  
> [0] “FaceTime HD Camera”  
> [1] “Sony Camera (Imaging Edge)”

And here is a sample of the console message (with #s in place of certain numbers used), so it looks like it recognizes the ImagingEdgeWebcam, but the screen remains black. See “Sock Write Failed” part.

```auto
2022-01-02 23:36:51.472 java[####:######] CMIOMS: HardwarePlugIn_ObjectHasProperty Device(33) kCMIODevicePropertyStreams self=########### hasProperty=1
2022-01-02 23:36:51.472 java[####:######] CMIOMS: HardwarePlugIn_ObjectGetPropertyDataSize Device(33) kCMIODevicePropertyStreams self=########### size=4
2022-01-02 23:36:51.473 java[####:######] CMIOMS: HardwarePlugIn_ObjectHasProperty Device(33) kCMIODevicePropertyStreams self=########### hasProperty=1
2022-01-02 23:36:51.473 java[####:######] CMIOMS: HardwarePlugIn_ObjectGetPropertyDataSize Device(33) kCMIODevicePropertyStreams self=########### size=4
2022-01-02 23:36:51.473 java[####:######] CMIOMS: HardwarePlugIn_ObjectHasProperty Device(33) kCMIODevicePropertyStreams self=########### hasProperty=1
2022-01-02 23:36:51.473 java[####:######] CMIOMS: HardwarePlugIn_ObjectGetPropertyData Device(33) kCMIODevicePropertyStreams self=########### data(int)=34
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	FillBuffer
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	Create Send Buffer.
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	Get LiveView Size: 140544
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	Perse Data
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	Recieve Ack.
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	Send Image Buffer. Size: 140544
2022-01-02 23:36:51.487 ImagingEdgeWebcam[####:######] LvdlClient	WriteToPipe
2022-01-02 23:36:51.488 java[####:######] LvdlServer	Read Body.
2022-01-02 23:36:51.488 java[####:######] LvdlServer	ReadFromPipe
2022-01-02 23:36:51.488 ImagingEdgeWebcam[####:######] LvdlClient	Wait Event.
2022-01-02 23:36:51.488 ImagingEdgeWebcam[####:######] LvdlClient	Read Header.
2022-01-02 23:36:51.488 ImagingEdgeWebcam[####:######] LvdlClient	ReadFromPipe

```

```auto
2022-01-03 00:07:14.283 ImagingEdgeWebcam[####:######] LvdlClient	Camera Connecting......
2022-01-03 00:07:14.287 ImagingEdgeWebcam[####:######] LvdlClient	Sock Write Failed.
2022-01-03 00:07:14.287 ImagingEdgeWebcam[####:######] LvdlClient	Finish PipeCommunicateProc
2022-01-03 00:07:14.287 ImagingEdgeWebcam[####:######] LvdlClient	Finish IsAliveCheck
2022-01-03 00:07:14.404 ImagingEdgeWebcam[####:######] LvdlClient	Finish GetLiveViewProc

```
