Update the saving of the LogLevel_ settings to create the setting in the config file if it doesn't exist at the time of saving, the setting is created with the chosen value.
Moves the RTSP javascript code into it's script tag and moved it be near the controls for the RTSP URL.
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.
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.
On mobile a new icon has been added to allow the user to jump to the detection's recording. Allowing the user listed to the recording as no playback controls are available when on mobile.
This is the same function available for the most recent recording