I stopped really working on this project when I cracked the SD card trying to get it out of the Pi. I didn't have a backup of the OS and all the stuff I installed to get my camcorder software working, so that was a big set back. I just have to remember exactly what modules where installed and how to install them. It should just be Pycamera and Keyboard for Python.
I started with Raspberry Pi OS Lite, but forgot that doesn't have a GUI... I would really like a GUI for this part. So I followed a prompt from the OS to run
sudo apt-get install lightdm
and that gave me a login window for Debian 10. That's perfect. Minimalistic OS installation with a light GUI. Couldn't get logged into it... The usual default user "pi" with password "raspberry" didn't seem to work. I think it was actually accepting the password because I never got an error like when I tried others. It just tried to load something and took me right back to the login screen. That was useless, so downloading the Raspberry Pi OS with Desktop now. That image is over 2GB, which is far too big for another project, but fine for this. This camcorder is a general purpose computer, so it should be just fine.
On a brighter note, I got the Pi mounted properly, and upgraded the old incandescent bulb on the camera to a very bright LED. The LED I'm using is a spare from the off grid camper project, and is meant to be a 12 volt car tail light. I managed to get it fit perfectly into the little case that mounts to the top of the camera. I'll wire it later, but initial testing shows that it's a far better light, with a very bright white, instead of the dim yellow light.
For the new Pi mounts, I melted 2 holes into the plastic case with an ice pick and screwed in two motherboard standoffs. As the other mounting holes sat up on a little plastic hill, I had to do something different. I took some long screws that I have nuts for, heated them with a small torch, and sunk the screw heads into the plastic and quickly dropped the Pi into place to align them. Then I screwed a nut onto the screw for the Pi to rest on. It's very sturdy and another nut on top of each screw will secure it permanently. I trimmed away a little plastic on the camcorder case to gain access to the Pi ports, and it worked perfectly. The only thing I can't access right now is the SD card(not using it, booting from USB), and the GPIO, which I can break out later or wire internally.
I've finally gotten the camcorder booting again, on the latest Raspberry Pi OS. All of the hardware and software actually worked on the first try this time around. USB booting works great and the system is very useable. I'm using a 32GB Samsung USB 3.1 flash drive for the boot drive. It's the nice metal one. It's my standard flash drive these days. I tried running my camera software, but forgot I had to install the keyboard software with "pip3" instead of "pip":
sudo pip3 install keyboard
The above installed the keyboard module and it seems to be working. I didn't have the camera interface enabled, so I had to change that up. After enabling the camera interface and such, my camcorder software started right up. I didn't have the latest version backup up, so the photo mode was missing, as well as all exposure and ISO adjustments. Easy enough to implement. I ended up adding a bunch of new features to the camcorder software over the past hour or so. I can now control ISO, exposure(only Night and Auto modes currently), and I can finally toggle the preview. The preview is a nuisance at times, as it covers all of the screen and I can't tell what the camera is doing. I also added print() output for all functions of the camera so I can see what's going on. Everything is working very well on video, and I can capture images. A big problem is how long it takes to save an image at full resolution. It seems to take a very long time to caputre the image, and the camera becomes unusable as it does so. I will add in a feature to capture an image at current video resolution that will not interfere with video recording, then have a special camera still mode programmed in later. It's all very basic right now, but it's working better than ever, and I've gotten new features working on the first try, which is new and a great sign that I'm making much progress in my programming.
I spent some time trying to clone the USB boot drive for the camera, but got stuck and set that aside to program more features. Tomorrow is my birthday, and I may be spending it with my cousin who has a giant vintage game and computer collection. The camera is now ready to go mobile, and I'll take it with me so we can play with it and maybe install emulators and game on the camcorder.
In the future, I believe I'll install a second Raspberry Pi 4. I want a very powerful and capable Pi to capture video and mix in the audio, and I don't think the Pi Zero W I have will be powerful enough. An overclocked Pi 4 should do it. The other Pi 4 in this camcorder will be used for managing files, editing, compression, and whatever else I need it for.
Right now, this camera is well on it's way to becoming a fully featured camcorder. I'll be building a custom control board for it when the build is complete, so that all features can be quickly accessed on a custom board, if needed. This camera will function more like a bradcast camera than anything else, with the ability to do on the fly editing, mixing, overlays, compression, and whatever else may need done. The goal is to have one device that can do it all on the go. I know I have to sacrifice quality to achiece that goal, but it will give me a fun camera to use and learn the ropes with. It's my most successful project yet, and it just keeps getting better.