This commit is contained in:
legop3
2025-11-29 03:16:54 -05:00
parent 4d02b6fcac
commit 40a0409f7e
3 changed files with 17 additions and 4 deletions
+11
View File
@@ -12,3 +12,14 @@ ctl.!default {
type hw
card 0
}
# Stable capture device for ffmpeg/roverd: exposes the HAT at fixed format/rate.
pcm.rovermic {
type plug
slave {
pcm "hw:0,0"
format S32_LE
rate 48000
channels 2
}
}
+3 -4
View File
@@ -112,20 +112,19 @@ run_pipeline() {
| "${FFMPEG_BIN_PATH}" \
-hide_banner \
-loglevel warning \
-fflags nobuffer \
-fflags nobuffer+genpts \
-flags low_delay \
-max_interleave_delta 0 \
-fflags +genpts \
-use_wallclock_as_timestamps 1 \
-rtbufsize 0 \
-thread_queue_size 512 \
-f h264 \
-i pipe:0 \
-thread_queue_size 2048 \
-f s32le \
-f alsa \
-ar "${AUDIO_RATE}" \
-ac "${AUDIO_CHANNELS}" \
-i <(arecord -D "${AUDIO_DEVICE}" -f "${AUDIO_FORMAT}" -c "${AUDIO_CHANNELS}" -r "${AUDIO_RATE}" -q -t raw) \
-i "${AUDIO_DEVICE}" \
-map 0:v:0 -map 1:a:0 \
-c:v copy \
-c:a "${AUDIO_CODEC}" \
+3
View File
@@ -236,6 +236,9 @@ else
chown roverd:audio "$FIFO_PATH"
chmod 0660 "$FIFO_PATH"
fi
# Ensure ALSA config is in place for rovermic device
install -m 0644 pi/asound.conf /etc/asound.conf
log "Installed ALSA config (/etc/asound.conf)"
install_audio_support