Camera model
2x Logitec C270
What is the problem?
USB Controller Bandwith Limit:
I set up Multi-Webcam and set the uvc quirks so that only the expected bandwidth should be reserved per camera. I can not get a resolution of more than 700x525@30fps to work. Setting the FPS lower seems to not change the limit even with QUIRK_RESTRICT_FRAME_RATE set.
What did you already try to solve it?
Set QUIRK_FIX_BANDWIDTH and QUIRK_RESTRICT_FRAME_RATE in all possible combinations
cat /etc/modprobe.d/uvcvideo.conf
#UVC_QUIRK_FIX_BANDWIDTH=128
#UVC_QUIRK_RESTRICT_FRAME_RATE=512
options uvcvideo quirks=640
I do not have more usb controllers available.
Systeminfo Bundle
octoprint-systeminfo-20240721170840.zip (77.1 KB)
octoprint-systeminfo-20240721170716.zip (76.6 KB)
Additional information about your setup
Ubuntu 24.04
Docker version 27.0.3
4 Octoprint Containers, 2 for printing, 2 just for the webcams
cat /etc/udev/rules.d/custom-tty.rules
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", SYMLINK="tty-genius", RUN="/usr/bin/docker restart octoprint-genius"
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", SYMLINK="tty-x1", RUN="/usr/bin/docker restart octoprint-x1"
cat /etc/udev/rules.d/custom-camera.rules
SUBSYSTEM=="video4linux", ATTR{index}=="0", ENV{ID_V4L_CAPABILITIES}==":capture:", ENV{ID_VENDOR}=="046d", ENV{ID_SERIAL_SHORT}=="abc", SYMLINK+="video-x1", RUN="docker restart octoprint-x1-video"
SUBSYSTEM=="video4linux", ATTR{index}=="1", ENV{ID_VENDOR}=="046d", ENV{ID_SERIAL_SHORT}=="abc", SYMLINK+="video-x1-meta", RUN="docker restart octoprint-x1-video"
SUBSYSTEM=="video4linux", ATTR{index}=="0", ENV{ID_V4L_CAPABILITIES}==":capture:", ENV{ID_VENDOR}=="046d", ENV{ID_SERIAL_SHORT}=="xyz", SYMLINK+="video-genius", RUN="docker restart octoprint-genius-video"
SUBSYSTEM=="video4linux", ATTR{index}=="1", ENV{ID_VENDOR}=="046d", ENV{ID_SERIAL_SHORT}=="xyz", SYMLINK+="video-genius-meta", RUN="docker restart octoprint-genius-video"
cat /srv/docker-compose.yml
# use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
services:
octoprint-x1:
container_name: octoprint-x1
image: octoprint/octoprint
restart: always
depends_on:
- nginx
ports:
- 81:80
devices:
- /dev/tty-x1:/dev/ttyUSB0
volumes:
- ./octoprint-x1/:/octoprint/
octoprint-x1-video:
container_name: octoprint-x1-video
image: octoprint/octoprint
restart: always
depends_on:
- nginx
ports:
- 8081:8080
devices:
- /dev/video-x1:/dev/video0
#- /dev/video-x1-meta:/dev/video1
environment:
- ENABLE_MJPG_STREAMER=true
#- MJPG_STREAMER_INPUT=-r 1280x720 -f 10
- MJPG_STREAMER_INPUT=-r 700x525 -f 30
#- MJPG_STREAMER_INPUT=-r 800x600 -f 10
octoprint-genius:
container_name: octoprint-genius
image: octoprint/octoprint
restart: always
depends_on:
- nginx
ports:
- 82:80
devices:
- /dev/tty-genius:/dev/ttyUSB0
volumes:
- ./octoprint-genius/:/octoprint/
octoprint-genius-video:
container_name: octoprint-genius-video
image: octoprint/octoprint
restart: always
depends_on:
- nginx
ports:
- 8082:8080
devices:
- /dev/video-genius:/dev/video0
#- /dev/video-genius-meta:/dev/video1
environment:
- ENABLE_MJPG_STREAMER=true
#- MJPG_STREAMER_INPUT=-r 1280x720 -f 10
- MJPG_STREAMER_INPUT=-r 700x525 -f 30
#- MJPG_STREAMER_INPUT=-r 800x600 -f 10
nginx:
container_name: nginx
network_mode: host
restart: always
image: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/index.html:/var/www/octoprint/index.html
cat /srv/nginx/nginx.conf
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/octoprint;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
location /x1/ {
proxy_pass http://127.0.0.1:81/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /x1;
proxy_http_version 1.1;
client_max_body_size 0;
}
location /x1/webcam/ {
proxy_pass http://127.0.0.1:8081/;
}
location /x1/stream/ {
proxy_pass http://127.0.0.1:8081/?action=stream;
}
location /x1/snap/ {
proxy_pass http://127.0.0.1:8081/?action=snapshot;
}
location /genius/ {
proxy_pass http://127.0.0.1:82/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /genius;
proxy_http_version 1.1;
client_max_body_size 0;
}
location /genius/webcam/ {
proxy_pass http://127.0.0.1:8082/;
}
location /genius/stream/ {
proxy_pass http://127.0.0.1:8082/?action=stream;
}
location /genius/snap/ {
proxy_pass http://127.0.0.1:8082/?action=snapshot;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
cat /srv/nginx/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OctoPrint Landing Page</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f0f0f0;
margin: 0;
padding: 0;
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
h1 {
color: #333;
}
.links {
display: flex;
gap: 20px;
margin-top: 20px;
}
.link {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.link:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to OctoPrint</h1>
<div class="links">
<a class="link" href="/x1">X1</a>
<a class="link" href="/genius">Genius</a>
</div>
</div>
</body>
</html>