Available mjpg-streamer configuration options

i add this line to my /boot/octopi.txt
camera_raspi_options="-x 1920 -y 1080 -fps 20 -quality 100 -ex auto -awb auto"
print a stl, but is always 640x480, i have a raspicam 1080p
whats wrong?
how can i test without always start print?

webcamd.service - LSB: webcam daemon
   Loaded: loaded (/etc/init.d/webcamd; generated; vendor preset: enabled)
   Active: active (running) since Wed 2019-03-27 13:21:18 GMT; 13min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 408 ExecStart=/etc/init.d/webcamd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/webcamd.service
           โ”œโ”€444 /bin/bash /root/bin/webcamd
           โ””โ”€460 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

ok , solved:
camera="auto" dont work, force camera="raspi"
service webcamd restart
service webcamd status Show actual parameter
http://ip:8080 show actual size image

1 Like

Nice. I need to get my hands on and learn more about the raspi cam.

I can get to http://{my octopi address}/webcam/control.htm, but when I select "Enable And Apply Preferences Before Print", an error (Unable To Enable Custom Preferences) pops up. What do I do next?

Hi GlenH! Can you let me know what the error message is? Also, what do you see when you go to control.htm? Finally, what kind of camera are you using?

I posted the header of the message. Iโ€™ll post the body when I get home. The camera is an HXSJ S70; a cheap HD webcam from Amazon. Control.htm exposes a bunch of controls, including focus and exposure.

Unable To Enable Custom Preferences

mjpegstreamer-control-error: The server denied access to the MJPG-Streamer control.html for the 'Default Webcam' camera profile. Please see this link to correct this error., or disable 'Custom Image Preferences'.

Note that the error message says "control.html", though the actual page is "control.htm"

'Control.html' is a typo. Octolapse does use control.htm when making these requests. I fixed this :slight_smile:

What do you have for your base address in your Octolapse webcam profile? If it's not equal to the following, please try changing your setting:

http://127.0.0.1/webcam/

or maybe

https://127.0.0.1/webcam/

The current value is the default; http://127.0.0.1:8080/

Changing the value to http://127.0.0.1/webcam/ doesn't allow me to check the "Enable And Apply Preferences Before Print" checkbox.

Hey GlenH, I have been reviewing the code that throws the exception you reported, and the error code is 'Not Implemented'. This leads me to believe that the parameters that I'm sending to test the streaming server might not be compatible with your camera. I will try to create a URL that you can use to test my theory after work. FYI, I just ordered a second camera (raspicam) so maybe I'll see some differences with that too which might lead to a solution. FYI, I've put a lot of effort into the camera settings page in the dev branch, so I'm very interested in making this process work on more cameras without too much setup.

I appreciate the effort you put into this. If it would help, I can send you my cam for testing. I also have a Logitech C615 and it throws the same error.

I appreciate your offer, but if you're getting the same error on the C615 this is probably not related to your other camera :frowning:.

Can you tell me a bit about your Octoprint setup? Did you install from an OctoPi image? If so, what version. Also, what version of OctoPrint and MJpegstreamer are you running? Have you made any security/proxy changes to your server?

I broke my old installation, so I re-installed from Octopi 0.16.0. Iโ€™m not sure which version of mjpg-streamer Iโ€™m running; probably the one that came with the Octopi 0.16.0 distribution.

I havenโ€™t made any changes to my networking configuration from default. No proxy for remote access or anything like that.

I have installed a 3.5โ€ touch screen and TouchUI. I can try rebuilding with just the default 0.16.0 plus Octolapse and see if it works that way.

Definitely disable all of your other plugins at least. I need to try a fresh install with 0.16.0 as well. Perhaps something has changed with mjpegstreamer (shudder... lol!).

I'm running octoprint 1.3.10 on image 4.14.98-v7+ with a Raspberry pi 3B+, my webcam is a Logitech C615. I'm unable to change the webcam resolution. Any change I made in /boot/octopi.txt simply makes the webcam unavailable because of an error, the log says:

Starting up webcamDaemon...
--- Configuration: ----------------------------
camera: usb
usb options: -r 1920x1080 -f 5 -y
raspi options: -fps 10
http options: -w ./www
Explicitly set USB device was found in options: -r 1920x1080 -f 5 -y
Found video devices:
/dev/video0
Configured USB camera was not detected, trying again in two minutes

When I check the webcam log, with default parameters, I see:

Running ./mjpg_streamer -o output_http.so -w ./www -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
MJPG Streamer Version: git rev: 821c330ea6bbb5fbed98d48e00aac156e923161b
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT

Now, I just kill the mjpg thread, cd to /home/pi/mjpg-streamer and run the same command again: this fails.

./mjpg_streamer: invalid option -- 'w'
When I strip the "faulty" arguments:
./mjpg_streamer: invalid option -- 'd'
./mjpg_streamer: invalid option -- 'f'

I already lost a stupid amount of time on this. Anyone can tell me what's going wrong?

You might try v4l2-ctl -D and v4l2-ctl --list-formats-ext as shown in this thread.

Searching for "logitech C615 mjpg_streamer raspberry pi" may find other useful resources.

It might be useful to note that the plugin TheSpaghettiDetective bypasses the octopi.txt file and changes are not applied, as stated in this thread:

This issue still persists.
The -q setting is not being read at boot.
When doing a "sudo service webcamd restart" it is being read, and image is changed accordingly.

I added this to my txt file
camera_usb_options="-r 1280x720 -f 30 -hf"

ps aux | grep stream
root 473 1.9 0.5 58592 5360 ? Sl 19:38 0:03 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1280x720 -f 30 -hf -d /dev/video0

I have a Logitech C720

The image is still upp side down

Not all cameras support all the options. There's options in the UI for flipping/rotating if your camera doesn't support it.

okay, I was planing to stream the "raw" stream without needing anything that changes the settings.