This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
octoprint and webcam
Hello! Does anybody use octoprint and a webcam with the tinker board?
I tried to install a USB webcam and i can't get it to work.
Well, I use Octoprint on my RPI 3 B+. Can you share your guide to installation/build of Octoprint on Tinkerboard, so I can try if there are also probs with my cams?
Here is a pretty good one 
youtube - Octoprint On Linux - Install - How To - Chris's Basement

most everything is the same with the following exceptions

virtualenv needs run like
python virtualenv venv
the shutdown scripts because I run as linaro and the account has permissions.  Also it uses systemctl 
also finding the ip address is not ifconfig but 
ip addr
I stopped at the webcam portion since that is different.  

currently I am trying to see how to get the camera to stream such that it can be used with octoprint

for someone reading this I had an older raspberry pi camera so I needed to run 
$ sudo tinker-config 
(Interfacing Options --> Camera --> OV5647)
$ sudo reboot
Then at least the camera would display in 
gst-launch-1.0 rkcamsrc io-mode=4 ! video/x-raw,format=NV12,width=640,height=480 ! rkximagesink

But with this being the first time I have ever used a camera, I am still researching how to stream the video
So I think I was able to get some of the streaming working - see code below
# Switch camera form IMX219 to OV5647 (Optional)

[color=#000000][font=monospace, monospace]$ sudo tinker-config (Interfacing Options -> Camera -> OV5647)
$ sudo reboot

# Set isp format for OV5647 (Optional)
$ sudo apt-get install -y v4l-utils
$ media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[fmt:SBGGR8/1296x972]'
$ media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[fmt:SBGGR8/1296x972]' --set-v4l2 '"rkisp1-isp-subdev":0[crop:(0,0)/1296x972]'
$ media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[fmt:YUYV2X8/1296x972]'
$ media-ctl -d /dev/media0 --set-v4l2 '"rkisps-isp-subdev":2[fmt:YUYV2X8/1296x972]' --set-v4l2 '"rkisp1-isp-subdev":2[crop:(0,0)/1296x972]'
[color=#000000][font=monospace, monospace]# Install for mjpg-streamer
$ sudo apt-get install libjpeg62-turbo-dev
$ git clone https ://
$ cd mjpg-streamer/mjpg-streamer-experimental
$ make
$ sudo make install
[color=#000000][font=monospace, monospace]#Start MJPG-streamer
$ ./mjpg_streamer -i "./ -y -d /dev/video0" -o "./ -w ./www"[/font][/color]

You will see camera preview on your browser http ://IP_ADDRESS:8080/?action=stream.
Note: IP_ADDRESS is on Tinker Board browser or use wlan0 address (sudo ifconfig to check) on remote PC browser

It looks like you will need to manually change the webcam/webcamDaemon scripts to run these commands.  
I added the mediactl commands to rc.local and then change the mjpg_streamer in the webDaemon to the one above and now on reboot it all seems to work

Forum Jump:

Users browsing this thread: 1 Guest(s)