Saturday, November 19, 2022

Getting my old Logitech Quickcam Pro 4000 to work on Octoprint

 The library that Octoprint uses to connect to a webcam and stream images to the octoprint window is called mjpg-streamer. It works for many webcams, but of course not my trusty Logitech Quickcam Pro 4000. Upon further investigation it turns out my camera only supports the Y12 format but that library can support just the YUV version of that format (there's even a pull request to add support for it). Luckily someone has made their own service called PICS which can read that format and it works pretty well. I forked the project and added some helpful code to allow you to automatically run PICS at boot. Clone the repo, follow the steps to build and run in the Readme, then scroll to the end and follow the steps to "Creating a service to start PICS on boot". This creates a stream that can be viewed at http://octopi.local:8080/dev/video0 which is the URL you can use in the Octoprint WebCam config.