Fly Gemini Board: Adding a webcam stream

UPDATE: This method is now outdated. Install Crowsnest via KIAUH instead.

Before I published my final review of the Fly Gemini board (Available from Aliexpress) I wanted to really check what the Core side was capable of (on paper it should be similar to a raspberry pi a) and typically my experience is that it is the webcam support that lets down the less capable boards.

Typically, the image I use (Mainsail os) comes with the required bits installed and all you need to do is plug in the webcam and configure it. Unfortunately as per every stage so far with this controller, the base image provided is lacking somewhat. That said I knew I could install the mjpeg streamer using Kiauh. However, what I didn’t account for was that it wouldn’t tell me it wasn’t installed correctly! As it turns out there is some background work you need to do to get it ready – It’s not hard so here we go!

By now you will be used to this but first thing is first you will need to SSH into the board. Next we need to install cmake because it is used to build mjpeg streamer by kiauh or if you were to clone the repo and build it yourself. Kiauh should check for this dependency but there seems to be a bug (I’ve raised an ticket on github you can follow that here). Run the command below – it may take a little while.

sudo apt install cmake

List usb webcam devices using the code below. Hopefully you will be able to see your camera!

ls  /dev/v4l/by-id/

For some reason my camera creates two video devices when connected to this board and the one that works is not the one at index 0 (the default). Test the webcam works by using the command below. Note depending on your webcam you may need to alter the code below to try the other video options that appears from using the previous command. If you have an error here run the command “ls” and check if your folder structure uses mjpg_streamer or mjpg-streamer. adjust the commands bellow accordingly

cd mjpg_streamer
./mjpg_streamer -i "./ -d /dev/video1" -o "./ -w ./www"

Hopefully you should now be able to open mainsail and see a preview of the stream in the webcam window.

End the process by using Ctrl+C in the command line. Next we need to edit the webcam.txt file. Using the video input that worked on the previous device. Set the camera to usb and update the additional options to limit the resolution, frame rate. Lastly Set the device path to the one you used above.

### Configure which camera to use
# Available options are:
# - auto: tries first usb webcam, if that's not available tries raspi cam
# - usb: only tries usb webcam
# - raspi: only tries raspi cam
# Defaults to auto

### Additional options to supply to MJPG Streamer for the USB camera
# See for available options
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
camera_usb_options="-r 640x480 -f 10 -d /dev/video1"

Now safely shutdown the printer using the power icon in the top right hand corner of Mainsail and choosing powerdown (under host options). Turn off the power supply and turn it back on. If everything has worked correctly your webcam should be showing up when Mainsail reconnects.

My experience so far shows quite a fluctuating FPS. While printing I didn’t notice the load or memory usage on the Host get particularly high. Good luck and let me know how you get on!

Join the discord to keep up to date and get involved in the upcoming projects!

8 thoughts on “Fly Gemini Board: Adding a webcam stream

  1. Thank you for the great tutorial. I’d love if you did one on connecting additional temperature sensors or using an accelerometer with the fly gemini.

    Liked by 1 person

  2. This doesnt work for me or I am doing something wrong.
    I logged in as user “fly” and “cd” to the directory “kiauh”.
    I started the “sudo apt install cmake” but it ends at “Processing triggers for libc-bin (2.31-13+deb11u6) …”

    in your screenshot I can see, that you got a “Dependencies installed” message and it continues with MJPG-Streamer.

    When I restart the cmake command I get “cmake is already the newest version (3.18.4-2+deb11u1).
    0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.”
    Is there anything else involved like using kiauh or anything I am missing?

    I am see the cam streams:
    fly@Voron-0:~$ ls /dev/v4l/by-id/

    but as mjpg streamer was nerver downloaded and installed, I can not go into that directory and continue with your commands.


      1. It’s hard to keep old instructional guides up to date without people like you letting me know what’s broken so much appreciated!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: