Skip to content

Commit

Permalink
[Automated] Merged develop into target master
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Feb 19, 2025
2 parents dd390b6 + 5b6c88d commit e5ed4bd
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 19 deletions.
13 changes: 11 additions & 2 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [[ -z "${CROWSNEST_USTREAMER_REPO_SHIP}" ]]; then
CROWSNEST_USTREAMER_REPO_SHIP="https://github.com/pikvm/ustreamer.git"
fi
if [[ -z "${CROWSNEST_USTREAMER_REPO_BRANCH}" ]]; then
CROWSNEST_USTREAMER_REPO_BRANCH="v6.10"
CROWSNEST_USTREAMER_REPO_BRANCH="v6.31"
fi

# Camera-streamer repo
Expand Down Expand Up @@ -99,6 +99,14 @@ is_ubuntu_arm() {
fi
}

is_armbian() {
if grep -q "Armbian" /etc/os-release; then
echo "1"
else
echo "0"
fi
}

### Get avail mem
get_avail_mem() {
grep "MemTotal" /proc/meminfo | awk '{print $2}'
Expand Down Expand Up @@ -136,7 +144,8 @@ clone_cstreamer() {
[[ -n "${CROWSNEST_UNATTENDED}" ]] || CROWSNEST_UNATTENDED="0"
if { [[ "$(is_raspberry_pi)" = "0" ]] ||
[[ "$(is_pi5)" = "1" ]] ||
[[ "$(is_ubuntu_arm)" = "1" ]]; } &&
[[ "$(is_ubuntu_arm)" = "1" ]] ||
[[ "$(is_armbian)" = "1" ]]; } &&
[[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then
printf "Device is not supported! Cloning camera-streamer ... [SKIPPED]\n"
return
Expand Down
1 change: 1 addition & 0 deletions libs/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function check_apps {
## Avoid dependency check if non rpi sbc
if [[ "$(is_raspberry_pi)" = "1" ]] &&
[[ "$(is_ubuntu_arm)" = "0" ]] &&
[[ "$(is_armbian)" = "0" ]] &&
[[ "$(is_pi5)" = "0" ]]; then
if [[ -x "${BASE_CN_PATH}/${cstreamer}" ]]; then
log_msg "Dependency: '${cstreamer##*/}' found in ${cstreamer}."
Expand Down
8 changes: 8 additions & 0 deletions libs/hwhandler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,11 @@ is_ubuntu_arm() {
echo "0"
fi
}

is_armbian() {
if grep -q "Armbian" /etc/os-release; then
echo "1"
else
echo "0"
fi
}
1 change: 1 addition & 0 deletions libs/init_stream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function construct_streamer {
[mM]ulti | camera-streamer)
if [[ "$(is_raspberry_pi)" = "1" ]] &&
[[ "$(is_ubuntu_arm)" = "0" ]] &&
[[ "$(is_armbian)" = "0" ]] &&
[[ "$(is_pi5)" = "0" ]]; then
MULTI_INSTANCES+=( "${cams}" )
else
Expand Down
1 change: 1 addition & 0 deletions libs/versioncontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ versioncontrol() {
local cur_ver avail_ver
if [[ "$(is_raspberry_pi)" = "1" ]] &&
[[ "$(is_ubuntu_arm)" = "0" ]] &&
[[ "$(is_armbian)" = "0" ]] &&
[[ "$(is_pi5)" = "0" ]]; then
pushd "${BASE_CN_PATH}"/bin/camera-streamer &> /dev/null || exit 1
avail_ver="($(git describe --tags --always))"
Expand Down
32 changes: 16 additions & 16 deletions resources/crowsnest.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#### crowsnest.conf
#### This is a typical default config.
#### Also used as default in mainsail / MainsailOS
#### See:
#### This is the default config after installation.
#### It is also used as the default config in MainsailOS.
#### For details on how to configure this to your needs, see:
#### https://github.com/mainsail-crew/crowsnest/blob/master/README.md
#### for details to configure to your needs.


#####################################################################
Expand All @@ -18,8 +17,9 @@
#### Port 8083 equals /webcam4/?action=[stream/snapshot] #####
#### #####
#### Note: These ports are default for most Mainsail #####
#### installations. To use any other port would involve #####
#### changing the proxy configuration or using directly #####
#### installations. Using any other port would involve #####
#### changing the proxy configuration or using URLs #####
#### with the specific port like #####
#### http://<ip>:<port>/?action=[stream/snapshot] #####
#### #####
#####################################################################
Expand All @@ -32,16 +32,16 @@
log_path: %LOGPATH%
log_level: verbose # Valid Options are quiet/verbose/debug
delete_log: false # Deletes log on every restart, if set to true
no_proxy: false
no_proxy: false # If set to true, no reverse proxy is required. Only change this, if you know what you are doing.

[cam 1]
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
mode: ustreamer # ustreamer - Provides MJPG and snapshots. (All devices)
# camera-streamer - Provides WebRTC, MJPG and snapshots. (only RPiOS + RPi 0/1/2/3/4)
enable_rtsp: false # If camera-streamer is used, this also enables usage of an RTSP server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /dev/video0 # See Log for available ...
resolution: 640x480 # widthxheight format
max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
#custom_flags: # You can run the Stream Services with custom flags.
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.
port: 8080 # HTTP/MJPG stream/snapshot port
device: /dev/video0 # See log for available devices
resolution: 640x480 # <width>x<height> format
max_fps: 15 # If hardware supports it, it will be forced, otherwise ignored/coerced.
#custom_flags: # You can run the stream services with custom flags.
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see log for your camera capabilities.
2 changes: 1 addition & 1 deletion tools/libs/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import_config() {
[[ -n "${CROWSNEST_LOG_PATH}" ]] || CROWSNEST_LOG_PATH="/home/${BASE_USER}/printer_data/logs"
[[ -n "${CROWSNEST_ENV_PATH}" ]] || CROWSNEST_ENV_PATH="/home/${BASE_USER}/printer_data/systemd"
[[ -n "${CROWSNEST_USTREAMER_REPO_SHIP}" ]] || CROWSNEST_USTREAMER_REPO_SHIP="https://github.com/pikvm/ustreamer.git"
[[ -n "${CROWSNEST_USTREAMER_REPO_BRANCH}" ]] || CROWSNEST_USTREAMER_REPO_BRANCH="v6.10"
[[ -n "${CROWSNEST_USTREAMER_REPO_BRANCH}" ]] || CROWSNEST_USTREAMER_REPO_BRANCH="v6.31"
[[ -n "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" ]] || CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/mryel00/camera-streamer.git"
[[ -n "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master"
status_msg "Using default configuration ..." "0"
Expand Down
16 changes: 16 additions & 0 deletions tools/libs/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ is_ubuntu_arm() {
fi
}

is_armbian() {
if grep -q "Armbian" /etc/os-release; then
echo "1"
else
echo "0"
fi
}

is_speederpad() {
if grep -q "Ubuntu 20.04." /etc/os-release &&
[[ "$(uname -rm)" = "4.9.191 aarch64" ]]; then
Expand Down Expand Up @@ -129,6 +137,14 @@ shallow_cs_dependencies_check() {
fi
status_msg "Checking if device is not running Ubuntu ..." "0"

msg "Checking if device is not running Armbian ...\n"
if [[ "$(is_armbian)" = "1" ]]; then
status_msg "Checking if device is not running Armbian ..." "3"
msg "This device is running Armbian therefore camera-streeamer cannot be installed ..."
return 1
fi
status_msg "Checking if device is not running Armbian ..." "0"

msg "Checking for required kernel module ...\n"
SHALLOW_CHECK_MODULESLIST="bcm2835_codec"
if [[ "$(test_load_module ${SHALLOW_CHECK_MODULESLIST})" = "0" ]]; then
Expand Down

0 comments on commit e5ed4bd

Please sign in to comment.