Merge pull request #851 from jaredb7/RTSP-Recording-fixes
Make ffmpeg record the first audio stream for RTSP
This commit is contained in:
@@ -29,7 +29,7 @@ if [ ! -z $RTSP_STREAM ];then
|
|||||||
# Map id used to map input to output, this is 0 based in ffmpeg decrement
|
# Map id used to map input to output, this is 0 based in ffmpeg decrement
|
||||||
MAP_ID=$((RTSP_STREAMS_STARTED_COUNT-1))
|
MAP_ID=$((RTSP_STREAMS_STARTED_COUNT-1))
|
||||||
# Build up the parameters to process the RSTP stream, including mapping for the output
|
# Build up the parameters to process the RSTP stream, including mapping for the output
|
||||||
FFMPEG_PARAMS+="-vn -thread_queue_size 512 -i ${i} -map ${MAP_ID} -t ${RECORDING_LENGTH} -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav "
|
FFMPEG_PARAMS+="-vn -thread_queue_size 512 -i ${i} -map ${MAP_ID}:a:0 -t ${RECORDING_LENGTH} -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav "
|
||||||
# Increment counter
|
# Increment counter
|
||||||
((RTSP_STREAMS_STARTED_COUNT += 1))
|
((RTSP_STREAMS_STARTED_COUNT += 1))
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user