Pi cam recognized as USB cam

Camera model
OV5647 ➜ https://www.raspberrypi.org/documentation/hardware/camera/

What is the problem?
I have the Raspberry Pi Camera Module v1. When I changed camera_raspi_options in /boot/octopi.txt the stream was not reflected, but I was able to tweak the stream using camera_usb_options. Looking at the process it is using input_uvc.so so I think it doesn't recognize my camera.

pi@octopi:~ $ ps -aux | grep streamer
pi         365  3.1  1.5  64016  5936 ?        Sl   23:14   0:17 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1280x720 -f 30 -d /dev/video0

What did you already try to solve it?
Could not solve it.

/var/log/webcamd.log

Starting up webcamDaemon...

--- Configuration: ----------------------------
camera:        auto
usb options:   -r 1280x720 -f 30
raspi options: -x 1296 -y 972 -fps 10 -quality 95
http options:  -w ./www-octopi -n
-----------------------------------------------

Found video devices:
/dev/video0
/dev/video10
/dev/video11
/dev/video12
USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Jun 14 23:41:46 pi: Starting USB webcam
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1280x720 -f 30 -d /dev/video0
MJPG Streamer Version: git rev: ddb69b7b4f114f3c2ca01adf55712792ca8aed43
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 720
 i: Frames Per Second.: 30
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
 o: www-folder-path......: ./www-octopi/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: (null)
 o: username:password....: disabled
 o: commands.............: disabled

Additional information about your setup
OctoPrint 1.3.11 running on OctoPi 0.16.0

1 Like

I encountered the same problem. Did you find a solution?

btw i changed camera="raspi" in /boot/octopi.txt
Now it's working again. But thats not the ideal solution.

1 Like

can you show me /boot/octopi.txt?

In /boot/octopi.txt you should only un-comment out the camera you do have on your system. So if you only have a raspberry pi camera, only un-comment the section for raspberry pi camera. If you have both a raspberry pi camera and usb camera then you should un-comment both.

This is what mine looks like:

### 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
#
camera="auto"

### Additional options to supply to MJPG Streamer for the USB camera
#
# See https://github.com/foosel/OctoPrint/wiki/MJPG-Streamer-configuration
# for available options
#
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
#
#camera_usb_options="-r 640x480 -f 10"

### additional options to supply to MJPG Streamer for the RasPi Cam
#
# See https://github.com/foosel/OctoPrint/wiki/MJPG-Streamer-configuration
# for available options
#
# Defaults to 10fps
#
camera_raspi_options="-x 480 -y 360 -fps 30 -ex night -hf"

I also have the same problem. Raspi cam V2.1 connected via MIPI. Tried with 2 octopi.txt configurations:

First - camera works but is recognized as USB camera, and no settings apply:
When camera setting is set to "auto", the camera works as a USB camera - see the outputs below:

pi@octopi:~ $ ps -aux | grep streamer
root       417  0.1  0.3  43756  3208 ?        Sl   22:26   0:00 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
pi         640  0.0  0.0   7480   472 pts/0    S+   22:35   0:00 grep --color=auto streamer
pi@octopi:~ $ cat /boot/octopi.txt
### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText.
### Do not use Notepad or WordPad.

### MacOSX users: If you use Textedit to edit this file make sure to use
### "plain text format" and "disable smart quotes" in "Textedit > Preferences"

### 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
#
camera="auto"

### Additional options to supply to MJPG Streamer for the USB camera
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
#
# camera_usb_options="-r 1280x720 -f 5 -q 95"

### Additional webcam devices known to cause problems with -f
#
# Apparently there a some devices out there that with the current
# mjpg_streamer release do not support the -f parameter (for specifying
# the capturing framerate) and will just refuse to output an image if it
# is supplied.
#
# The webcam daemon will detect those devices by their USB Vendor and Product
# ID and remove the -f parameter from the options provided to mjpg_streamer.
#
# By default, this is done for the following devices:
#   Logitech C170 (046d:082b)
#   GEMBIRD (1908:2310)
#   Genius F100 (0458:708c)
#   Cubeternet GL-UPC822 UVC WebCam (1e4e:0102)
#
# Using the following option it is possible to add additional devices. If
# your webcam happens to show above symptoms, try determining your cam's
# vendor and product id via lsusb, activating the line below by removing # and
# adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff"
#
#   additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff")
#
# If this fixes your problem, please report it back so we can include the device
# out of the box: https://github.com/guysoft/OctoPi/issues
#
#additional_brokenfps_usb_devices=()

### Additional options to supply to MJPG Streamer for the RasPi Cam
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to 10fps
#
camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95 -hf -hv"

### Configuration of camera HTTP output
#
# Usually you should NOT need to change this at all! Only touch if you
# know what you are doing and what the parameters mean.
#
# Below settings are used in the mjpg-streamer call like this:
#
#   -o "output_http.so -w $camera_http_webroot $camera_http_options"
#
# Current working directory is the mjpg-streamer base directory.
#
#camera_http_webroot="./www-octopi"
#camera_http_options="-n"

Second - camera is set as "raspi", but the stream doesn't work:

pi@octopi:~ $ ps -aux | grep streamer
pi         753  0.0  0.0   7348   508 pts/0    S+   22:21   0:00 grep --color=auto streamer

pi@octopi:~ $ cat /boot/octopi.txt
### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText.
### Do not use Notepad or WordPad.

### MacOSX users: If you use Textedit to edit this file make sure to use
### "plain text format" and "disable smart quotes" in "Textedit > Preferences"

### 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
#
camera="raspi"

### Additional options to supply to MJPG Streamer for the USB camera
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
#
# camera_usb_options="-r 1280x720 -f 5 -q 95"

### Additional webcam devices known to cause problems with -f
#
# Apparently there a some devices out there that with the current
# mjpg_streamer release do not support the -f parameter (for specifying
# the capturing framerate) and will just refuse to output an image if it
# is supplied.
#
# The webcam daemon will detect those devices by their USB Vendor and Product
# ID and remove the -f parameter from the options provided to mjpg_streamer.
#
# By default, this is done for the following devices:
#   Logitech C170 (046d:082b)
#   GEMBIRD (1908:2310)
#   Genius F100 (0458:708c)
#   Cubeternet GL-UPC822 UVC WebCam (1e4e:0102)
#
# Using the following option it is possible to add additional devices. If
# your webcam happens to show above symptoms, try determining your cam's
# vendor and product id via lsusb, activating the line below by removing # and
# adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff"
#
#   additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff")
#
# If this fixes your problem, please report it back so we can include the device
# out of the box: https://github.com/guysoft/OctoPi/issues
#
#additional_brokenfps_usb_devices=()

### Additional options to supply to MJPG Streamer for the RasPi Cam
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to 10fps
#
camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95 -hf -hv"

### Configuration of camera HTTP output
#
# Usually you should NOT need to change this at all! Only touch if you
# know what you are doing and what the parameters mean.
#
# Below settings are used in the mjpg-streamer call like this:
#
#   -o "output_http.so -w $camera_http_webroot $camera_http_options"
#
# Current working directory is the mjpg-streamer base directory.
#
#camera_http_webroot="./www-octopi"
#camera_http_options="-n"

What did you already try to solve it?

Remove mjpg-streamer and recompile mjpg-streamer-experimental from the repository