Can NOT get a single camera to work or... #221
Replies: 9 comments 3 replies
-
What happens if you try it like this? octoprint1:
container_name: Octoprint1
image: octoprint/octoprint
hostname: Octoprint1
restart: unless-stopped
ports:
- 5000:5000
- 8080:8080
volumes:
- /home/dietpi/docker/octoprint1:/octoprint1
environment:
- ENABLE_MJPG_STREAMER=true
- MJPG_STREAMER_INPUT=-n -r 1280x720 -f 30
- CAMERA_DEV=/dev/video0
devices:
- /dev/ttyACM0:/dev/ttyACM0
- /dev/video0:/dev/video0 I use: - MJPG_STREAMER_INPUT=-r 1152x648 -f 10 I'm not sure what I've got some other notes in my docker-compose as follows: # Octoprint configuration UI:
# Stream URL: /webcam/?action=stream
# Snapshot URL: http://localhost:8080/?action=snapshot
# Path to FFMPEG: /usr/bin/ffmpeg Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
What mode are you running the camera? Should it be in legacy mode? |
Beta Was this translation helpful? Give feedback.
-
I'm sorry but I don't really understand your question. I am running Raspbian Buster because, as far as I'm aware, there is as yet no camera support for OctoPrint in Bullseye (or maybe it's FFMPEG that needs updating - I don't know). I think of Buster as the "legacy system" which has camera support for OctoPrint. It might mean the same thing as your question. Sorry to be so vague. If there's a way of running either (a) Bullseye with Buster-style camera support that then works with FFMPEG and OctoPrint, or (b) OctoPrint on Bullseye such that FFMPEG/OctoPrint can use the native Bullseye camera system, I haven't come across it. I did some searching when Bullseye first became the official release but not since. I'd be interested to hear about any progress. |
Beta Was this translation helpful? Give feedback.
-
I appreciate the help.
|
Beta Was this translation helpful? Give feedback.
-
That's a possibility. My
I think that got there via enabling the camera in But, right back at the beginning of this post, I thought you said that the camera worked fine. I assumed you meant you'd used something like Also, I just noticed something else. In this fragment:
I think that's wrong. I think it should be:
and the second container should be:
What is going on is that the left hand side (before the colon) represents the path outside the container (ie on the Raspberry Pi's file system) while the right hand side is the path inside the container (relative to the container's file system). I think the internal path I don't think that necessarily explains the problem with the camera. Other than that, I don't really know. Sorry. |
Beta Was this translation helpful? Give feedback.
-
I got it working with your help! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi there, I would like to ask if anyone managed to get the camera working in octoprint with a raspi running on bullseye? My pi is running bullseye and octoprint itself works OK Inside the octoprint container though neither libcamera-still nor raspistill work (similar to what mikeoverbay reported) I would like to stay with bullseye, so if it's possible to get the camera working on bullseye, I would be happy to hear from you. Thank you!! Kind regards |
Beta Was this translation helpful? Give feedback.
-
Wow !! Thank you for your reply & the detailed explanation. I do not understand it all as yet, will go thru it this weekend and try to set it up. Will report back soon. Thanks again for your help!! |
Beta Was this translation helpful? Give feedback.
-
Hello Phil, Thank you for the detailed explanation and the proposed solution. I must confess, I could not fully understand the details of the framework and I decided to experiment with some alternatives instead. I did find a solution and it involved enabling legacy camera support in raspi-config and adding the following lines of code (for vcgencmd) to the docker-compose.yaml file ... (this i learnt from another post).
The above code got rid of the vcgencmd warnings I do not know if it's actually required for the camera to function correctly. octoprint in the docker container is still running on buster and this is not an issue. Thank you for your help! |
Beta Was this translation helpful? Give feedback.
-
I don't know what the address is.
I have 2 containers running. The cam is setup in the first one only but I can not get to it.
I can run the 2 OctoPrint web interfaces and they work with my 2 printers.
The Pi finds the camera fine. I can test it
This is the container code. Sorry it striped the white space alignment from it. I attached a text file of it also.
Docker_Code.txt
version: '3.6'
services:
Octoprint1
octoprint1:
container_name: Octoprint1
image: octoprint/octoprint
hostname: Octoprint1
restart: unless-stopped
ports:
- 5000:5000
- 8080:8080
volumes:
- /home/dietpi/docker/octoprint1:/octoprint1
environment:
- ENABLE_MJPG_STREAMER=true
- MJPG_STREAMER_INPUT=-n -d /dev/video0:/dev/video0 -r 1280x720 -f 30
devices:
#Printer Port
- /dev/ttyACM0:/dev/ttyACM0
#Webcam port
# - /dev/video0:/dev/video0
Octoprint2
octoprint2:
container_name: Octoprint2
image: octoprint/octoprint
hostname: Octoprint2
restart: unless-stopped
ports:
- 5001:5000
- 8081:8080
volumes:
- /home/dietpi/docker/octoprint2:/octoprint2
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
Beta Was this translation helpful? Give feedback.
All reactions