mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-18 12:42:15 -05:00
profile cleanups
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
name: ALSA microphone
|
name: ALSA microphone
|
||||||
description: Uses the configured audio input device through roverd's ALSA conversion route.
|
description: Uses the configured audio input device through roverd's ALSA conversion route.
|
||||||
setup: |
|
setup: |
|
||||||
if ! command -v ffmpeg >/dev/null || ! command -v arecord >/dev/null; then
|
|
||||||
apt-get update && apt-get install -y ffmpeg alsa-utils
|
apt-get update && apt-get install -y ffmpeg alsa-utils
|
||||||
fi
|
|
||||||
run: |
|
run: |
|
||||||
sample_rate=48000
|
sample_rate=48000
|
||||||
channels=2
|
channels=2
|
||||||
@@ -20,9 +18,6 @@
|
|||||||
description: HAT capture with S32_LE input, 20 dB microphone boost, and low-latency Opus settings. Reboot once after first enabling its hardware.
|
description: HAT capture with S32_LE input, 20 dB microphone boost, and low-latency Opus settings. Reboot once after first enabling its hardware.
|
||||||
setup: |
|
setup: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# Capture/playback setup may run concurrently; serialize edits to boot config.
|
|
||||||
exec 9>/var/lock/roverd-aiy.lock
|
|
||||||
flock 9
|
|
||||||
boot=/boot/firmware/config.txt
|
boot=/boot/firmware/config.txt
|
||||||
[[ -f "$boot" ]] || boot=/boot/config.txt
|
[[ -f "$boot" ]] || boot=/boot/config.txt
|
||||||
[[ -f "$boot" ]] || { echo 'AIY setup needs a Raspberry Pi boot config.txt' >&2; exit 1; }
|
[[ -f "$boot" ]] || { echo 'AIY setup needs a Raspberry Pi boot config.txt' >&2; exit 1; }
|
||||||
@@ -38,9 +33,7 @@
|
|||||||
if [[ "$changed" == 1 ]]; then
|
if [[ "$changed" == 1 ]]; then
|
||||||
echo 'AIY hardware enabled. Reboot the host once before using this sound card.'
|
echo 'AIY hardware enabled. Reboot the host once before using this sound card.'
|
||||||
fi
|
fi
|
||||||
if ! command -v ffmpeg >/dev/null || ! command -v arecord >/dev/null; then
|
|
||||||
apt-get update && apt-get install -y ffmpeg alsa-utils
|
apt-get update && apt-get install -y ffmpeg alsa-utils
|
||||||
fi
|
|
||||||
run: |
|
run: |
|
||||||
sample_rate=48000
|
sample_rate=48000
|
||||||
channels=2
|
channels=2
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
name: ALSA speaker
|
name: ALSA speaker
|
||||||
description: Uses the configured output alongside TTS and horn with independent volume controls.
|
description: Uses the configured output alongside TTS and horn with independent volume controls.
|
||||||
setup: |
|
setup: |
|
||||||
if ! command -v ffmpeg >/dev/null || ! command -v aplay >/dev/null; then
|
|
||||||
apt-get update && apt-get install -y ffmpeg alsa-utils
|
apt-get update && apt-get install -y ffmpeg alsa-utils
|
||||||
fi
|
|
||||||
run: |
|
run: |
|
||||||
normalize=true
|
normalize=true
|
||||||
normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled'
|
normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled'
|
||||||
@@ -19,9 +17,6 @@
|
|||||||
description: HAT playback with low-latency decoding and 16 kHz mono output through the configured audio route. Reboot once after initial setup.
|
description: HAT playback with low-latency decoding and 16 kHz mono output through the configured audio route. Reboot once after initial setup.
|
||||||
setup: |
|
setup: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# Capture/playback setup may run concurrently; serialize edits to boot config.
|
|
||||||
exec 9>/var/lock/roverd-aiy.lock
|
|
||||||
flock 9
|
|
||||||
boot=/boot/firmware/config.txt
|
boot=/boot/firmware/config.txt
|
||||||
[[ -f "$boot" ]] || boot=/boot/config.txt
|
[[ -f "$boot" ]] || boot=/boot/config.txt
|
||||||
[[ -f "$boot" ]] || { echo 'AIY setup needs a Raspberry Pi boot config.txt' >&2; exit 1; }
|
[[ -f "$boot" ]] || { echo 'AIY setup needs a Raspberry Pi boot config.txt' >&2; exit 1; }
|
||||||
@@ -37,9 +32,7 @@
|
|||||||
if [[ "$changed" == 1 ]]; then
|
if [[ "$changed" == 1 ]]; then
|
||||||
echo 'AIY hardware enabled. Reboot the host once before using this sound card.'
|
echo 'AIY hardware enabled. Reboot the host once before using this sound card.'
|
||||||
fi
|
fi
|
||||||
if ! command -v ffmpeg >/dev/null || ! command -v aplay >/dev/null; then
|
|
||||||
apt-get update && apt-get install -y ffmpeg alsa-utils
|
apt-get update && apt-get install -y ffmpeg alsa-utils
|
||||||
fi
|
|
||||||
run: |
|
run: |
|
||||||
normalize=true
|
normalize=true
|
||||||
normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled'
|
normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
name: V4L2 camera
|
name: V4L2 camera
|
||||||
description: USB or other Linux V4L2 camera, encoded with software H.264.
|
description: USB or other Linux V4L2 camera, encoded with software H.264.
|
||||||
setup: |
|
setup: |
|
||||||
command -v ffmpeg >/dev/null || { apt-get update && apt-get install -y ffmpeg; }
|
apt-get update && apt-get install -y ffmpeg
|
||||||
run: |
|
run: |
|
||||||
device=/dev/video0
|
device=/dev/video0
|
||||||
input_format=mjpeg
|
input_format=mjpeg
|
||||||
@@ -23,26 +23,16 @@
|
|||||||
-g "$fps" -keyint_min "$fps" -sc_threshold 0 -flush_packets 1 -muxdelay 0 -muxpreload 0 \
|
-g "$fps" -keyint_min "$fps" -sc_threshold 0 -flush_packets 1 -muxdelay 0 -muxpreload 0 \
|
||||||
-f rtsp -rtsp_transport tcp "$ROVER_VIDEO_PUBLISH_URL"
|
-f rtsp -rtsp_transport tcp "$ROVER_VIDEO_PUBLISH_URL"
|
||||||
- id: rpicam
|
- id: rpicam
|
||||||
name: Raspberry Pi CSI camera
|
name: Pi Zero 2 W Camera v2
|
||||||
description: rpicam/libcamera H.264 output, republished through ffmpeg.
|
description: Inverted Camera Module v2 on a Pi Zero 2 W, with H.264 republished through ffmpeg.
|
||||||
setup: |
|
setup: |
|
||||||
command -v ffmpeg >/dev/null || { apt-get update && apt-get install -y ffmpeg; }
|
apt-get update && apt-get install -y ffmpeg rpicam-apps
|
||||||
if ! command -v rpicam-vid >/dev/null && ! command -v libcamera-vid >/dev/null; then
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y rpicam-apps
|
|
||||||
fi
|
|
||||||
run: |
|
run: |
|
||||||
width=640
|
width=640
|
||||||
height=480
|
height=480
|
||||||
fps=30
|
fps=30
|
||||||
bitrate=2000000
|
bitrate=2000000
|
||||||
inverted=true
|
rpicam-vid --inline --timeout 0 --rotation 180 --mode 1296:972 \
|
||||||
sensor_mode=1296:972
|
|
||||||
camera=$(command -v rpicam-vid || command -v libcamera-vid)
|
|
||||||
options=()
|
|
||||||
if [ "$inverted" = true ]; then options+=(--rotation 180); fi
|
|
||||||
if [ -n "$sensor_mode" ]; then options+=(--mode "$sensor_mode"); fi
|
|
||||||
"$camera" --inline --timeout 0 "${options[@]}" \
|
|
||||||
--width "$width" --height "$height" \
|
--width "$width" --height "$height" \
|
||||||
--framerate "$fps" --bitrate "$bitrate" \
|
--framerate "$fps" --bitrate "$bitrate" \
|
||||||
--codec h264 --intra 120 --profile baseline --denoise auto --nopreview \
|
--codec h264 --intra 120 --profile baseline --denoise auto --nopreview \
|
||||||
|
|||||||
Reference in New Issue
Block a user