# Camera not working in Mac Mojave

**URL:** <https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054>\
**Category:** Libraries\
**Created:** [March 26, 2020, 8:53pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054 "2020-03-26T20:53:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brewthom](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@brewthom](https://discourse.processing.org/u/brewthom)\
**Post date:** [March 26, 2020, 8:53pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054/1 "2020-03-26T20:53:54Z")

</div>

I’m trying to use the Processing video library examples (under Capture in library examples). I can get them working fine in windows 10, but no luck on Mac 10.14.6 (Mojave). Is this a known issue? To be clear, I’m using the library example:

```auto
---------------------------------------------------------
/**
 * Brightness Tracking 
 * by Golan Levin. 
 *
 * Tracks the brightest pixel in a live video signal. 
 */

import processing.video.*;

Capture video;

void setup() {
  size(640, 480);
  // Uses the default video input, see the reference if this causes an error
  video = new Capture(this, width, height);
  video.start();  
  noStroke();
  smooth();
}

void draw() {
  if (video.available()) {
   
    video.read();
    image(video, 0, 0, width, height); // Draw the webcam video onto the screen
    int brightestX = 0; // X-coordinate of the brightest video pixel
    int brightestY = 0; // Y-coordinate of the brightest video pixel
    float brightestValue = 0; // Brightness of the brightest video pixel
    // Search for the brightest pixel: For each row of pixels in the video image and
    // for each pixel in the yth row, compute each pixel's index in the video
    video.loadPixels();
    int index = 0;
    for (int y = 0; y < video.height; y++) {
      for (int x = 0; x < video.width; x++) {
        // Get the color stored in the pixel
        int pixelValue = video.pixels[index];
        // Determine the brightness of the pixel
        float pixelBrightness = brightness(pixelValue);
        // If that value is brighter than any previous, then store the
        // brightness of that pixel, as well as its (x,y) location
        if (pixelBrightness > brightestValue) {
          brightestValue = pixelBrightness;
          brightestY = y;
          brightestX = x;
        }
        index++;
      }
    }
    // Draw a large, yellow circle at the brightest pixel
    fill(255, 204, 0, 128);
    ellipse(brightestX, brightestY, 200, 200);
  }
}

```

---

<div class="post-metadata">

**Author:** ![AndreasRef](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/andreasref/32/133_2.png) [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Post date:** [March 30, 2020, 1:42pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054/2 "2020-03-30T13:42:46Z")

</div>

Have a look at this issue: [https://github.com/processing/processing-video/issues/134](https://github.com/processing/processing-video/issues/134)

---

<div class="post-metadata">

**Author:** ![brewthom](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@brewthom](https://discourse.processing.org/u/brewthom)\
**Post date:** [March 30, 2020, 3:06pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054/3 "2020-03-30T15:06:20Z")

</div>

I checked this out before posting— but the new release did not seem to fix the problem??

---

<div class="post-metadata">

**Author:** ![AndreasRef](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/andreasref/32/133_2.png) [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Post date:** [March 30, 2020, 3:11pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054/4 "2020-03-30T15:11:05Z")

</div>

Sorry, just tried to help. I personally managed to get it working by following [this suggestions in the thread](https://github.com/processing/processing-video/issues/134#issuecomment-550359384), but yeah, it is annoying that the issue is not fixed by the new release.

---

<div class="post-metadata">

**Author:** ![brewthom](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@brewthom](https://discourse.processing.org/u/brewthom)\
**Post date:** [March 30, 2020, 3:22pm UTC](https://discourse.processing.org/t/camera-not-working-in-mac-mojave/19054/5 "2020-03-30T15:22:28Z")

</div>

Thanks anyway. I appreciate it
