Most configurations should not require any additional setups, but there may be a few exceptions.
The Raspberry Pi cameras, those that connect directly to the Raspberry Pi by a ribbon cable, need to be used in 'USB' mode.
An OctoPi installation can be configured to do this with the following changes.
First ssh into the pi (user pi
, password raspberry
), then:
Tell mjpg-streamer to use usb mode:
- run
sudo nano /boot/octopi.txt
- change
camera="raspi"
tocamera="usb"
- this tells mjpg-streamer to the usb mode
- if
camera=
has '#' before it, remove it
- change
camera_usb_options="-r 640x480 -f"
to the appropriate resolution and fps, ie.camera_usb_options="-r 1920x1080 -f 30"
- change
camera_http_options="-n"
tocamera_http_options=""
- this enables the web controls in mjpg-streamer. while this shouldn't be necessary, a user reported it helped and it certainly shouldn't hurt
- press control-s to save the file
- press control-x to exit
Make sure the kernel module is loaded:
- run
sudo nano /etc/modules
- add the following on a new line if it's not already in the file:
bcm2835-v4l2
- press control-s to save the file
- press control-x to exit
- reboot (sudo reboot)
After rebooting, the Camera Settings controls should function on the RaspiCam.
If the raspicam won't work in higher resolutions after doing the above, tell the kernel module to allow video mode at higher resolutions:
- run
sudo nano /etc/modprobe.d/raspicam.conf
- add the following line to that file, depending on your raspicam model or maximum resolution:
- v1.x:
options bcm2835-v4l2 max_video_width=2592 max_video_height=1944
- v2.x:
options bcm2835-v4l2 max_video_width=3280 max_video_height=2464
- others: use the above, but specify the appropriate
max_video_width
andmax_video_height
- v1.x:
- press control-s to save the file
- press control-x to exit
- reboot (sudo reboot)
If the feed from the raspicam looks pixelated or corrupted, first try increasing the bitrate through this plugin. If that doesn't improve the quality, increase the GPU memory (sudo raspi-config
, Performance->GPU Memory), to at most 256.
This plugin uses v4l2-ctl
to set the camera settings. This should be already be installed on most Linux distributions, including OctoPi, but it's possible that it isn't. If you get an error stating 'v4l2-ctl not installed' then this is the case.
v4l2-ctl can be installed by installing the 'v4l-utils' package on most systems. For Debian/Ubuntu based distributions, run:
sudo apt-get update
sudo apt-get install v4l-utils