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.
The Spectrogram service was stopping after it completed it's work (no issue here) and the system would start it again 10 seconds later, sometimes it would stop and start multiple times a second (no file to analyse maybe)
Added a while loop to that it would just keep running and sleeping for the number of seconds of the recording length setting.
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.
Changed command to use systemctl to restart the icecast2 service, the error wasn't fatal but just made it look like restarting the live stream service had failed.
Appears to be a issue scrolling a select list option into view and then setting it's selected state to true (as if the user had clicked on it) this seems to break all future calls of scrollIntoView on any options, regardless if the selected state if removed from all options.
scrollIntoView works perfectly otherwise and opted to apply a style to visually highlight the option. This turned out way better
Added in logic to handle finding the correct 'newest' detection's CSV file for the stream being listened to, the script will look in the sound card recordings location as usual, if it finds nothing there, then look in the StreamData folder for files matching the currently listened stream
Updated spectrogram.sh to not execute sox if the file mentioned in analyzing now does not exist, this is just to try reduce noise in the logs
Fixed my mis-spelling of RTSP again
Small tweak to the Javascript responsible for drawing the labels on the spectrogram to accommodate the inclusion of RTSP_X in the streams filename
previously it would show changes between the current HEAD and the previous HEAD, which would neglect to show all the file changes from multiple commits, only the most recent one. this makes sure we store the HEAD hash from before the system is updated, and then compared to HEAD after it's updated.
Co-Authored-By: lloydbayley <21309308+lloydbayley@users.noreply.github.com>
previously it would show changes between the current HEAD and the previous HEAD, which would neglect to show all the file changes from multiple commits, only the most recent one. this makes sure we store the HEAD hash from before the system is updated, and then compared to HEAD after it's updated.
Co-Authored-By: lloydbayley <21309308+lloydbayley@users.noreply.github.com>
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
Added basic functionality for the user to fileter/search for specie labels when looking for species to exclude. When a result is found, that option is selected and scrolled into view for the user to see.