Note if the author reads this (perfect is the enemy of good, feel free to ignore): You can make udev run systemd services directly, replacing RUN=... by e.g. TAG+="systemd", ENV{SYSTEMD_WANTS}+="foo.service"
That might require you also remove the 'enabled = true' for the service, and make sure gphoto2 dies when the camera is unplugged?
Wow thanks for the suggestion! I knew there must be some way to do it with fewer steps but didn't quite figure out what it was so I really appreciate this comment.
When I get a chance I'll test what you said out!
Huh, I was solving similar problem some time ago. I needed to run some pulseaudio commands (to split stereo input into 2 mono ones) after USB device was reconnected and my solution was RUN script adding a systemd timer (the commands had to be ran after pulseaudio registered new device) that just ran it few seconds after device was connected
It's been a while but yes BindsTo is a good idea if you can express the device in a reliable way.
Unfortunately for USB devices the path will look like something that depends on the USB port it's been plugged in (I only have a sound card on my hands, but something like these two alternatives on two different ports):
That makes BindsTo unpractical unless you're sure you'll always plug in the camera on the same port everytime, so it might not be best.
This made me look up how I'd do this if the needs arise, so I haven't tried, but `StopWhenUnneeded=true` in the service definition looks like it would stop it properly when the device "wanting" it is gone? cf. https://unix.stackexchange.com/questions/528803/systemd-does...
There are lots of solutions that are more seamless than the DSLR, but which are vastly more expensive, including just buying a webcam proper. But the fact that you _can_ use the DSLR as your webcam is cool, and may save some folks money if they happen to have a DSLR laying around.
The problem with buying a webcam proper is that the industry has reached a "good enough" point where manufacturers will re-release essentially the same camera with no real improvements in resolution, hardware, or software.
I bought a Logitech webcam during the pandemic. Imagine my surprise when the webcam resolution was worse than the one built into my XPS 13.
This works better than the Canon EOS Webcam utility for me, even though my DSLR isn't officially supported. It works fine in Zoom. Unfortunately it doesn't work in Quicktime. I'll take a look at some of the code signing info in your docs and see if I can fix it.
Similarly, I can recommend Reincubate Camo, works on macOS/Linux/Windows. It also has plenty manual camera settings to play around with to get the exact view you want, including focus/white balance/exposure/cropping and tons more that the Apple's official continuity functionality lacks.
Disclaimer: zero affiliation with the product (outside of being their happy customer). I simply found it way before the official continuity feature was even announced for macOS+iOS.
Any restrictions about how long you can keep it turned on? I tried to do this but found I'd need to flash the cam's firmware to override the 10min recording limit.
(I read that cameras which can record longer are taxed as video cameras, so they're deliberately crippled)
To accomplish what the OP does, I use a USB HDMI in, a mini HDMI to HDMI cable, and Magic Lantern on my Rebel. It works well.
Magic Lantern allows me to leave the camera in preview without overlays for indefinite time periods. It can also provide video this way, but heat can be an issue there…
Magic Lantern was a game changer that really helped expose thousands to amateur videography. The Canon 5D MkII was the start of a revolution (an to a lesser extend, the T3i+) and the Panasonic GH4 and then Sony Alpha lines really played a role in pushing those young people from hobby to actual product videos and commercials.
Normally you can leave live view (768x512 resolution, 0.4 MP in this case, usually not much higher for modern cameras) running indefinitely. Besides the low resolution especially on older cameras the readout for live view will use pixel skipping to conserve power at the expense of quality. This is why "the pro streamers" don't use the live view image, but instead go the HDMI-to-UVC route using the camera's video mode.
Unfortunately most cameras do not provide "clean" HDMI output. That is, the HDMI output contains camera UI symbols like focus points, battery state, lighting, etc. Configuration options to disable those UI symbols are generally not available, at best one can disable some of them. A model with "clean" HDMI is usually more expensive and you have to explicitly look for it as a feature.
Live view readout via USB is something that works far more often than HDMI.
The webcam described in the article is so old, it has PAL/NTSC video out.
Later generations switched to HDMI, but not all of them have a 'clean feed', so some information regarding exposure settings, battery level etc will remain in the picture.
I believe that the tax law changed in the last few years. Most cameras in use today still have the limit, even though many new (especially higher end) models have unlimited recording.
MILC's have shorter flange distance therefore more weird lenses can be created. Also they're smaller, lighter, and quieter due to the elimination of the moving mirror.
I've been using an old Android phone as a webcam for a while, it's very good and latency is minimal, but conferencing software will just kill your stream. There's no reason to have even an HD webcam when your fellow participants will see a very compressed 0.4 Mpixel stream.
A normal lens in the 50mm to 85mm range farther away will show your features much less distorted than the typical wide-angle lenses of webcams. Wide-angle lenses close to your face will make your closer features like your nose look bigger. It's basically very ugly.
Doing this is less for the image quality and more for the natural representation of your face.
I don't think resolution is everything, I can definitely notice that the image is "better" in other ways when people are using proper cameras (whereas for a phone camera the resolution is a bigger part of what makes it better than a webcam), I'm quite happy with my own webcam being clear but not too clear though, it's a meeting not Instagram.
That might require you also remove the 'enabled = true' for the service, and make sure gphoto2 dies when the camera is unplugged?
Anyway, it was a nice read :)
[1] https://gitlab.com/engmark/root/-/commit/ae59aad118e6effcf47...
That makes BindsTo unpractical unless you're sure you'll always plug in the camera on the same port everytime, so it might not be best.
This made me look up how I'd do this if the needs arise, so I haven't tried, but `StopWhenUnneeded=true` in the service definition looks like it would stop it properly when the device "wanting" it is gone? cf. https://unix.stackexchange.com/questions/528803/systemd-does...
I learned something new :)
I bought a Logitech webcam during the pandemic. Imagine my surprise when the webcam resolution was worse than the one built into my XPS 13.
https://www.dev47apps.com/
Wish there was a FOSS alternative.
[1] https://ptpwebcam.org/
Disclaimer: zero affiliation with the product (outside of being their happy customer). I simply found it way before the official continuity feature was even announced for macOS+iOS.
Only gotcha is thermals...don't think it can run like that long term without active cooling
(I read that cameras which can record longer are taxed as video cameras, so they're deliberately crippled)
To accomplish what the OP does, I use a USB HDMI in, a mini HDMI to HDMI cable, and Magic Lantern on my Rebel. It works well.
Magic Lantern allows me to leave the camera in preview without overlays for indefinite time periods. It can also provide video this way, but heat can be an issue there…
Live view readout via USB is something that works far more often than HDMI.
I don't think this tax applies anymore.
For me, having to press the LV button twice an hour seemed more preferable than flashing the firmware.
Dead Comment
Recent cameras may have a lot more pixels but the optics should still be just as good.
I've been using this for ~2 years now, and it's been rock solid.
Doing this is less for the image quality and more for the natural representation of your face.
The camera from this article is also known as the Canon 500 or 1000D in other parts of the world.