guh..,ugh

This commit is contained in:
legop3
2025-11-27 19:21:25 -05:00
parent 6eac64beab
commit 63f788c16e
4 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -4,11 +4,11 @@ options snd_rpi_googlevoicehat_soundcard index=0
# Simple defaults: direct playback/capture on the voice HAT
pcm.!default {
type asym
playback.pcm "plughw:sndrpigooglevoi,0"
capture.pcm "plughw:sndrpigooglevoi,0"
playback.pcm "plughw:0,0"
capture.pcm "plughw:0,0"
}
ctl.!default {
type hw
card sndrpigooglevoi
card 0
}
+7 -5
View File
@@ -19,14 +19,14 @@ VIDEO_HEIGHT="${VIDEO_HEIGHT:-1080}"
VIDEO_FPS="${VIDEO_FPS:-30}"
VIDEO_BITRATE="${VIDEO_BITRATE:-3000000}"
AUDIO_ENABLE="${AUDIO_ENABLE:-0}"
AUDIO_DEVICE="${AUDIO_DEVICE:-plughw:sndrpigooglevoi,0}"
AUDIO_DEVICE="${AUDIO_DEVICE:-plughw:0,0}"
AUDIO_RATE="${AUDIO_RATE:-16000}"
AUDIO_CHANNELS="${AUDIO_CHANNELS:-1}"
AUDIO_BITRATE="${AUDIO_BITRATE:-64000}"
# Normalize device if env still says "default"
if [[ "${AUDIO_DEVICE}" == "default" ]]; then
AUDIO_DEVICE="plughw:sndrpigooglevoi,0"
AUDIO_DEVICE="plughw:0,0"
fi
# Flip the camera 180deg (supported by rpicam-vid/libcamera-vid)
FLIP_ARGS=(--rotation 180)
@@ -77,18 +77,19 @@ run_pipeline() {
-loglevel warning \
-fflags nobuffer \
-use_wallclock_as_timestamps 1 \
-thread_queue_size 512 \
-f h264 \
-i pipe:0 \
-f alsa \
-thread_queue_size 512 \
-thread_queue_size 1024 \
-ac "${AUDIO_CHANNELS}" \
-ar "${AUDIO_RATE}" \
-i "${AUDIO_DEVICE}" \
-c:v copy \
-c:a aac \
-b:a "${AUDIO_BITRATE}" \
-c:a pcm_alaw \
-ac "${AUDIO_CHANNELS}" \
-ar "${AUDIO_RATE}" \
-af "aresample=async=1:min_hard_comp=0.100:first_pts=0" \
-flush_packets 1 \
-f mpegts \
"${PUBLISH_URL}"
@@ -119,6 +120,7 @@ run_pipeline() {
-loglevel warning \
-fflags nobuffer \
-use_wallclock_as_timestamps 1 \
-thread_queue_size 512 \
-f h264 \
-i pipe:0 \
-c:v copy \
+1 -1
View File
@@ -142,7 +142,7 @@ func LoadConfig(path string) (*Config, error) {
},
Audio: AudioConfig{
CaptureEnabled: true,
CaptureDevice: "plughw:sndrpigooglevoi,0",
CaptureDevice: "plughw:0,0",
SampleRate: 16000,
Channels: 1,
Bitrate: 64000,
+1 -1
View File
@@ -39,7 +39,7 @@ cameraServo:
allowRawPulse: false
audio:
captureEnabled: true
captureDevice: plughw:sndrpigooglevoi,0
captureDevice: plughw:0,0
sampleRate: 16000
channels: 1
bitrate: 64000