#+TITLE: Show-me webcam: Webcamera for Raspberry Pi Zero W #+SUBTITLE: With standard camera mounting gear #+DESCRIPTION: Tutorial on how to setup a high-quality webcam #+KEYWORDS: Raspberry Pi rpi show-me webcam # Export underscore as underscore instead of highlight in HTML: #+OPTIONS: ^:nil # Include usable macros from https://github.com/fniessen/org-macros: #+INCLUDE: ../org-mode/macros/org-macros.setup #+INFOJS_OPT: view:showall ltoc:nil path:https://iki.fi/~pyyhttu/debian/org-mode/js/org-info.js #+HTML_HEAD: * Showmewebcam ** Philosophy #+BEGIN_QUOTE This firmware transforms your Raspberry Pi into a high quality webcam. It works reliably, boots quickly, and gets out of your way. #+END_QUOTE - There hasn't been real development leaps in the [[https://reincubate.com/support/how-to/why-are-webcams-bad/][commercial webcams]] in the past 30 years. - Global COVID-19 pandemic caused a shortage of webcams, so decided to build my own for my new home work premises. - Commercial webcams are usually made of plastic, small static non-glass-lenses and ineffective integrated microphones, offering no upgrade paths for hardware, should I want to change a component [fn:1]. - An option would be to use a DSLR camera setup with a capture card, but that starts to get expensive and would be an overkill for the frequent webcamming I do. Also, I couldn't just upgrade a component in that setup if I wanted to. - With this Raspberry based setup, I don't need to sacrifice anything else than auto focus, which is not needed for static conference webcamming anyway. - [[https://www.jeffgeerling.com/blog/2020/raspberry-pi-makes-great-usb-webcam-100][A good overview]] by Jeff Geerling on pros/cons of the HQ Pi Camera. ** Preparation Acquire the hardware, I used: - [[https://www.amazon.de/-/en/1138-CF-SMALLRIG-Ballhead-Clamp-DE0729/dp/B00SIRAYX0/][SmallRig ballhead and clamp]]. With this combo, I can attach and position the camera however I want. I already had [[https://www.amazon.de/-/en/Elgato-Key-Light-professional-LED/dp/B082QHRZFW/][Elgato Key Light Air]] and I could easily clamp the camera to its stand. - [[https://thepihut.com/products/mounting-plate-for-high-quality-camera][Raspberry Pi Mounting Plate for High Quality Camera]]. This is the "frame" to which I attach the Pi Zero WH and Camera Module to. - [[https://thepihut.com/products/raspberry-pi-zero-camera-adapter][Raspberry Pi Zero Camera Adapter]]. RPi Zero board has physically smaller camera lane port, so this is needed. - [[https://thepihut.com/products/raspberry-pi-zero-wh-with-pre-soldered-header][Raspberry Pi Zero WH (with pre-soldered header)]]. Webcam setup does not need wireless capabilities or pre-soldered header. I chose both because wanted to keep my options open on repurposing the board for a future project where both are needed. - [[https://thepihut.com/products/raspberry-pi-high-quality-camera-module][Raspberry Pi High Quality Camera Module]]. Needed. - [[https://thepihut.com/products/raspberry-pi-high-quality-camera-lens][Raspberry Pi High Quality Camera CS Lens (6mm wide angle)]]. On a hindsight, would've gone straight for a [[https://commonlands.com/collections/m12-lenses][M12 lens]] based on [[https://commonlands.com/blogs/camera-engineering/raspi-video-conferencing][this review]]. Select appropriate lens for video conferencing. I chose [[https://commonlands.com/products/portrait-6mm-m12-lens][Low Distortion 6.0mm M12 Lens.]] - [[https://commonlands.com/products/m12-to-cs-adapter][M12 to CS adapter.]] With M12 lens and rpi Camera Module, this adapter is also needed in between. ** Installation - As per [[https://github.com/showmewebcam/showmewebcam#instructions][Show-me webcam github-page]]. ** Post-installation tasks Install vnc server on the pi: ~$ sudo apt-get install realvnc-vnc-server~ ~$ sudo raspi-config~ Select: Interfacing Options > VNC and select Yes. Then launch vnc viewer and connect to pi. Then on client computer install vnc viewer: https://www.realvnc.com/en/connect/download/viewer/ ** Maintenance ** Troubleshooting ** Observations and future direction *** DONE Subscribe to Product Change Notifications Do this as per instructions [[https://github.com/showmewebcam/showmewebcam/issues/196#issuecomment-1120046851][here.]] *** NEXT Focus the lens - Step 4: https://commonlands.com/blogs/technical/raspi-video-conferencing - Also read through: https://commonlands.com/blogs/technical/how-to-focus-a-camera - https://commonlands.com/pages/aov-calculator - https://commonlands.com/pages/fov-calculator - If no wlan connection in rasperry pi zero w, then local ssh with usb: https://desertbot.io/blog/headless-pi-zero-ssh-access-over-usb-windows also https://tutorial.cytron.io/2020/12/29/raspberry-pi-zero-usb-webcam/ - *** NEXT Figure out where I want to position the camera using the Field of View - As per [[https://commonlands.com/blogs/camera-engineering/raspi-video-conferencing][section 4]] of this blog. * Footnotes [fn:1] [[https://www.reddit.com/r/raspberry_pi/comments/j4h1je/finally_a_quality_webcam_setup/][Reddit thread]] from where the webcam idea came from.