mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
git
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}" \
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user