Small fix for now to handle of RTSP streams that may contain more than 1 audio stream within them, we just tell ffmpeg to use the first audio stream for the recording.
A future enhancement to this is to allow the user to to set what audio stream to just in case there is a scenario where the first one doesn't work for some reason.
After some services were recently quieted down by adjusting the log level for e.g ffmpeg. It would be nice if the user can easily adjust the log level again so that that they can investigate or debug a issue since output is not generated by default, so now the Livestream, Spectrogream and Birdnet Recording have a adjustable log levels to help with this.
Attempt to quieten the amount of log noise being generated by some of the birdnet services visible in the syslog and daemon.log
Recording service
When using RTSP streams the recording service is generating massive amounts of noise in the logs as it's basically outputting all it's startup info and also outputting stream and export info.
- Set the log level to only output errors
Also the birdnet_recoding service script is outputting it;s contents, I assume was doing this because of the set -x option at the beginning,
-Commenting this fixed that issue
Analysis Service
Small change to this it doesn't output a error when it can't find today's recording directory. It's a non issue if your recording via sound card but it pops up a bit when using RTSP streams as that directory is never created.
Livestream Service
Same treatment as the recording service, set log level to error. It was previously set to info and would occasionally output a massive chunk of output.. presumably abut the encoding processes.
Updated birdnet_recording.sh
With a functional change around how ffmpeg is used to make use if it's functionality to accept multiple input streams and map each to a output file.
Due to the original implementation generating a filename that contain the date/time streams would be writing to the same file - a small change was make each stream go to it's one file with unique filenames.
Updated livestream.sh & spectrogram.php
The Livestream service would fail if the RTSP stream setting was more than 1 stream (i.e comma separated list of streams)
Made some improvements so streaming is possible from any of the URL's, The Spectrogram page received a new control and some Javascript that allows the user to change between streams, the setting gets saved and the livestream service restarted so it uses's the correct stream.
This control is not visible if there are no RTSP streams configured
By default the livestream service will stream the the first RTSP URL, if the setting is not set or invalid
Updated advanced.php
With a small GUI change around RTSP steam entry by providing a input field for each URL and a button to add more fields.
In the background nothing changes as we use some Javascript to extract the valus entered and fill in the original rtsp_stream value with the correct comma separated string
Updated server.py
To work with the recording filename changes so that the correct filename is stored in the DB
Updated update_birdnet_snippets.sh
To support a new setting RTSP_STREAM_TO_LIVESTREAM on the Spectrogram page and in the livestream service
ffmpeg enables interaction on stdin by default, which may have
undesirable consequences when running ffmpeg in the background.
adding `-nostdin` disables interaction via the stdin stream.