Comments (4)
Stupid question - as far as I understand the fuser command it checks if the camera is used by a process.
Quote from the manpage
fuser displays the PIDs of processes using the specified files or file systems.
To be honest, I have not so much experience with pipewire. But even with pipewire fuser should be a reliable source if the camera is in use or not. If I am wrong - please correct me. New knowledge is always welcome on my side :-)
from ha-mqtt-iot.
In my case, pipewire
and wireplumber
both are reported as using it even when the camera isn't actually in use.
from ha-mqtt-iot.
Interesting - I run pipewire and I have not the issue - but to be honest, I am not very familiar with pipewire. Yesterday I had a video conference and the sensors works well. I use Arch Linux - and if I am correct you as well (acorrding to your config template :-))
from ha-mqtt-iot.
More than a year later...
fuser
and lsof
remain to be not very good for detecting whether or not the camera is in active use. fuser
just gives a list of PIDs and nothing else, which is quite useless, but lsof
might be usable.
I've been observing the output from lsof
and as @W-Floyd said, wireplumb
and pipewire
are always there no matter what the camera is doing. Even if it's sitting idle without recording, those two are there. But when I start using the camera actively, on the browser or inside the Zoom desktop app or whatever, they appear as new processes in the lsof
output AND they look different. They always appear like this:
One process as two lines in the output, one with mem
as the file descriptor. Firefox does the same. Discord does the same. Maybe that can be used to detect that the camera is currently being used to capture video. Though I don't know what those mean exactly, so it might not be as useful as I wish.
Also, for some reason, Cheese doesn't show up on lsof
even when it's actively using the camera. That means there are ways around lsof
too.
from ha-mqtt-iot.
Related Issues (20)
- Support SSL
- Check all device types for documentation quirks
- Validate scripts on multiple Desktop Environments and Display Servers
- App doesn't reconnect on lost connection HOT 8
- system.sh needs sysstat package
- system.sh CPU usage does not update
- Add `update` MQTT type
- `Viadevice`/`viadevice` should instead be `ViaDevice`/`via_device`
- Default logging settings precludes logging errors when loading config.
- Ensure all scripts are desktop agnostic HOT 1
- Use correct MQTT logger
- Add `text` entity type
- Program fails if `/etc/machine-id` is not available HOT 1
- Allow re-using program output in multiple devices
- Allow hot reloading the config file. HOT 1
- Bring back automatic device generation
- Code generation is broken
- Updates needed before 2024.2.0 HOT 2
- Looking for maintenance/help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-mqtt-iot.