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
Code:
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
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
Code:
$ sudo tinker-config
(Interfacing Options --> Camera --> OV5647)
$ sudo reboot
Then at least the camera would display in
Code:
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
[EDIT]
So I think I was able to get some of the streaming working - see code below
# Switch camera form IMX219 to OV5647 (Optional)
Code:
[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]'
[/font][/color]
[color=#000000][font=monospace, monospace]# Install for mjpg-streamer
$ sudo apt-get install libjpeg62-turbo-dev
$ git clone https ://github.com/TinkerBoard/mjpg-streamer.git
$ cd mjpg-streamer/mjpg-streamer-experimental
$ make
$ sudo make install
[/font][/color]
[color=#000000][font=monospace, monospace]#Start MJPG-streamer
$ ./mjpg_streamer -i "./input_uvc.so -y -d /dev/video0" -o "./output_http.so -w ./www"[/font][/color]
You will see camera preview on your browser http ://IP_ADDRESS:8080/?action=stream.
Note: IP_ADDRESS is 127.0.0.1 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