News for hackers. Stuff that matters.
Re:Automatically Light Up a Sign When Your Webcam Is in Use by robbles on Friday August 27, 2021 @10:51AM (#28328581)
Is there a similar way of detecting the web cam in use on macOS?
Re:Automatically Light Up a Sign When Your Webcam Is in Use by stevenbedrick on Friday August 27, 2021 @01:13PM (#28330408)
Take a look at the code for Objective-See’s “OverSight” utility; it is a good example of how to detect AV events system-wide. It’s also a really great app…

https://objective-see.com/products/oversight.html

Re:Automatically Light Up a Sign When Your Webcam Is in Use by doesnotexist on Saturday August 28, 2021 @02:18PM (#28340220)
Their FAQ gives a sketch of how they detect AV events on Mac OS:

Q: Why does it take OverSight, a few seconds to display the webcam/mic usage notification?

A: There is not easy way to determine what process is using the webcam or mic, when either is activated. Worse, there is no direct indication that a new process is accessing an existing a webcam session. Thus OverSight has to perform various tests and has to poll the system (only when the camera/mic is active) in order to determine what process(es) is/are accessing the device. This takes a few seconds...mahalo for your patience!

Re:Automatically Light Up a Sign When Your Webcam Is in Use by e40 on Friday August 27, 2021 @12:55PM (#28330169)
There has to be, as Micro Snitch tells me when it is.

EDIT: on my iMac M1 the built-in camera and mic are not detectable by MS. So, maybe not...

EDIT2: https://obdev.at/products/microsnitch/releasenotes.html

It's a bug in Big Sur, so hopefully it will be fixed and MS will work again.

Re:Automatically Light Up a Sign When Your Webcam Is in Use by ProZsolt on Tuesday August 31, 2021 @03:05PM (#28372130)
I wanted to do the same so I started to write a small utility in Objective-C: https://github.com/ProZsolt/onair

It's able to detect camera and microphone activation/deactivation and logs it to stdout. Currently figuring out how to detect when a new peripheral is connected.

Re:Automatically Light Up a Sign When Your Webcam Is in Use by isatty on Friday August 27, 2021 @01:50PM (#28330890)
Here you go: https://stty.io/2020/07/31/lamp-control-based-on-video-confe...

I’ve been using this for ~1 and it’s been more reliable than I expected - no maintenance required even with the update to Big Sur.

To save you a click:

log show --predicate 'subsystem == "com.apple.VDCAssistant" && \ eventMessage CONTAINS[c] "kCameraStream"' --last 1m --no-debug --no-pager \ --style compact | tail -n +2)

#or log stream ... # streaming is better to generate events

Re:Automatically Light Up a Sign When Your Webcam Is in Use by jeremy8883 on Saturday August 28, 2021 @09:48AM (#28338010)
Thank you! I couldn't originally figure this out for my "on air" script, so my workaround was to query the existance of the `zoom.us` process every second.
Re:Automatically Light Up a Sign When Your Webcam Is in Use by wvaughan on Friday August 27, 2021 @01:03PM (#28330280)
I was able to make something similar using Home Assistant to get the webcam status on the mac - https://willvaughan.design/making-an-on-air-light-for-my-hom...
Re:Automatically Light Up a Sign When Your Webcam Is in Use by hammock on Friday August 27, 2021 @12:54PM (#28330155)
My MacBook has a built-in green LED right next to the camera that turns on when the camera is on.
Re:Automatically Light Up a Sign When Your Webcam Is in Use by giglamesh on Friday August 27, 2021 @02:41PM (#28331506)
I had the same thought and then read the article. Turns out this is about telling other people in a shared space - such as a work from home situation - that you are in a meeting.

Which would not work for me as I generally keep the camera off to save bandwidth and the last remaining shreds of my sanity.