I have an installation that uses a Logitech 920 camera to record and display video. The camera is hanging at the end of a 15 foot powered USB extension. After restarting the MacMini and launching my application, the feed from the webcam runs at only 1-2fps. Relaunching the app does not fix the issue, but power-cycling the camera (unplugging then plugging in) does.
When I open PhotoBooth, the frame-rate is always good, even when my application is running at the same time with 1-2fps.
Has anyone seen anything like this? Is there a way to power-cycle the camera from software?
Iāve used this same setup for a couple of projects and have never experienced anything like that. I donāt think there is a way to⦠Maybe there is something wrong with the USB extension? Or something is up in the OS. Have you tried it without the cable and on another mac?
I have been able to recreate the issue on a different MacMini with a different USB power hub and cable.
It is not 100% consistent. If I change ports, sometimes it will boot up a couple times with a good frame-rate but the issue eventually returns.
How about another camera? The only issue that I have run into was it somehow becoming de-attached by the computer and it wasnāt showing even in the system profiler. Plug cycle fixed it though.
Using another Logitech920, the issue persists. Using a Logitech310 the issue does not occur. I would swap cameras but I need the higher resolution of the Logitech920.
In code, Iāve tried adding a delay before initializing the camera, as well as closing then re-opening the camera stream. Neither had an effect.
Iāve used that setup many times and havenāt experienced this issue, but I have experienced some less-than-great performance in general using the slower Minis and full-screen video.
Out of curiosity, are you using ofxUVC with the app? I donāt suspect itād cause the issue, but adding some level of hardware control may helpā¦
You could try the Logitech c930e camera, itās field of view is a bit wider than the c920, but that may be a good thing?
I am not. I didnāt need that kind of control, but will give it a try. Maybe explicitly setting exposure/focus will break it out of whatever is happening. Also looking into using an BlackMagic box with a non-USB camera.
I highly recommend the BlackMagic route. Recently did a project with a Hero4 and itās made me never want to use a webcam ever again.
Recording the video is not nearly as easy as with the āstockā OF video classes, but is doable. For my project I used āofxVideoRecorderā which uses ffmpeg for the writing, but doesnāt give you a reliable āvideo completedā event. Iām happy to elaborate on how we used it more if you are interested. Also, Iām in the middle of writing an AVFoundation/AssetWriter add-on, but itās had to take a back seat to other work.
I had this exact same problem a few years ago with a mac mini and logitech webcam (canāt remember the exact model but I think it was the C920 - at least similar to that). I ended up building a small relay box that sat in between the mini and the camera. It would cut the USB power lines for a few seconds after booting, simulating an unplug/replug scenario. Of course not the most elegant solution but it worked like a charm.
Hi all here, I know this is an old thread, but Iām having a similar problem right now with an installation. The strange thing is: I have two installations running next to each other, both on a mac mini and both using the Logitech C920 camera. One setup has no problems whatsoever, the other installation has the camera stop working at random times. Sometimes the camera intermittently shows new frames, but mostly it keeps showing the same frame on which it is stuck.
The installation that has problems is connected to a projector, the one without problems is connected to a screen.
Extra weird: when the projector is switched off and on again, the camera sometimes resumes working normally!!!
Do the people who have experienced the same issue have more information on their setups: screen / or projector etc⦠?
hmm interesting.
In my case, the camera is installed more or less in the ceiling of the space, so getting to the USB cable is difficult.
But when I just restart the software, the camera always works as expected again.
Itās very difficult to reproduce because I can restart the software 10 times with everything working fine and then the 11th time the camera will start freezing up randomly without any real difference in the setup.
That must be a different issue then - in my case restarting the software didnāt fix it. I guess maybe you could keep track of the framerate and detect the issue. Restart the software until the issue isnāt detected anymore.
A little hacky I know but Iām guessing its a driver issue and if thatās true your chances of really fixing the issue (except by maybe trying a different camera) are very slim to say the least.
Hi Daan,
Thanks for the answer! Yes that sounds like two different issues. Very strange that I never had your problem either⦠I have been working with Logitech C920s for a long time, they are my default camera to use when I want to control focus or exposure from software.
Are you sure you were using C920, Iām considering switching to a different model to solve my problem, but donāt want to run into your issueā¦
Another weird symptom I forgot to mention: The exposure of the camera is controlled through UVC (ofxUVC) and when I switch the connected projector off and on, the cameraās exposure changes!
I have never ever seen anything like this before, and I canāt figure out how switching off a display could affect the camera exposure??
Little update on this issue: it turned out to be a faulty Mac Mini. I replaced the machine and all the issues went away. The first time I ever experienced this.