diff --git a/README.md b/README.md index 4fd9b83..8c1413b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Updated April 1, 2024. Want to support this work? Buy Me a Coffee. https://www.buymeacoffee.com/ppaukstelis. Need help with octoprint_deploy? Visit support-octoprint-deploy on the OctoPrint Discord: https://discord.com/invite/yA7stPp -# octoprint_deploy 1.0.10 +# octoprint_deploy 1.0.11 * These files provide a bash script for quickly deploying multiple octoprint instances on a single computer. For Linux systems (Ubuntu, Fedora, etc.) it will also install OctoPrint and a video streamer (ustreamer). No need for lots of file editing or complicated Docker compose scripts! A background video on how it generally works from my ERRF2022 talk can be found here: https://www.youtube.com/watch?v=q0iCNl8-kJI&t=15378s * octoprint_deploy and octoprint_install are being merged! Maintaining two separate scripts was close to twice the amount of work. By merging the scripts many new features have been included, while also providing greater simplicity in setup. @@ -63,6 +63,7 @@ Need help with octoprint_deploy? Visit support-octoprint-deploy on the OctoPrint * Restart all instances from the command line: `sudo octoprint_deploy/octoprint_deploy.sh restart_all` * You can inject any function at start using the command line with the first argument `f` and the second argument the function name. # Recent Changes + * Include additional libcamera packages and libcamerify when ustreamer is used with PiCam * Fixes for adding PiCam with camera-streamer (still not complete) * Add camera-streamer as an option. This is also coupled with adding PiCam from the menu. __THIS IS EXPERIMENTAL and NEEDS TESTING__ * Fix an issue with Fedora python versioning. diff --git a/cameras.sh b/cameras.sh index 6657499..78e3257 100755 --- a/cameras.sh +++ b/cameras.sh @@ -67,9 +67,16 @@ write_camera() { #ustreamer if [ "$STREAMER" == ustreamer ]; then - cat $SCRIPTDIR/octocam_ustream.service | \ - sed -e "s/OCTOUSER/$OCTOUSER/" \ - -e "s/OCTOCAM/cam${INUM}_$INSTANCE/" > $SCRIPTDIR/$OUTFILE.service + if [ "$PI" == true ]; then + cat $SCRIPTDIR/octocam_ustream.service | \ + sed -e "s/OCTOUSER/$OCTOUSER/" \ + -e "s/OCTOCAM/cam${INUM}_$INSTANCE/" \ + -e "s|ExecStart=|ExecStart=/usr/bin/libcamerify |" > $SCRIPTDIR/$OUTFILE.service + else + cat $SCRIPTDIR/octocam_ustream.service | \ + sed -e "s/OCTOUSER/$OCTOUSER/" \ + -e "s/OCTOCAM/cam${INUM}_$INSTANCE/" > $SCRIPTDIR/$OUTFILE.service + fi fi #camera-streamer @@ -288,7 +295,7 @@ add_camera() { write_camera #Pi Cam setup, replace cam_INSTANCE with /dev/video0 if [ -n "$PI" ] && [ "$STREAMER" == ustreamer ]; then - echo SUBSYSTEM==\"video4linux\", ATTRS{name}==\"video0\", SYMLINK+=\"cam${INUM}_$INSTANCE\" >> /etc/udev/rules.d/99-octoprint.rules + echo SUBSYSTEM==\"video4linux\", ATTRS{name}==\"video0\", SYMLINK+=\"cam${INUM}_$INSTANCE\" >> /etc/udev/rules.d/99-octoprint.rule fi systemctl start cam${INUM}_$INSTANCE.service diff --git a/prepare.sh b/prepare.sh index 757e206..a5f8cff 100644 --- a/prepare.sh +++ b/prepare.sh @@ -116,6 +116,8 @@ deb_packages() { -e libavutil-dev\ -e libavcodec-dev\ -e libcamera-dev\ + -e libcamera-tools\ + -e libcamera-v4l2\ -e liblivemedia-dev\ -e v4l-utils\ -e pkg-config\