-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement audio watchdog for RTSP source monitoring #365
Conversation
tphakala
commented
Jan 5, 2025
- Added audioWatchdog struct to track the last time data was received from the RTSP source.
- Introduced a goroutine that checks for data reception every 5 seconds and triggers a restart if no data is received for 60 seconds.
- Updated processAudio method to integrate the watchdog, ensuring it updates the last data time upon receiving audio data.
- Enhanced error handling to wait for the watchdog to finish before returning errors related to data reception.
- Added audioWatchdog struct to track the last time data was received from the RTSP source. - Introduced a goroutine that checks for data reception every 5 seconds and triggers a restart if no data is received for 60 seconds. - Updated processAudio method to integrate the watchdog, ensuring it updates the last data time upon receiving audio data. - Enhanced error handling to wait for the watchdog to finish before returning errors related to data reception.
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce an Changes
Sequence DiagramsequenceDiagram
participant RTSP as RTSP Source
participant FFmpeg as FFmpegProcess
participant Watchdog as AudioWatchdog
FFmpeg->>Watchdog: Start Monitoring
loop Every 5 seconds
Watchdog->>Watchdog: Check Time Since Last Data
alt No Data for 60+ seconds
Watchdog-->>FFmpeg: Trigger Restart
end
end
RTSP->>FFmpeg: Send Audio Data
FFmpeg->>Watchdog: Update Last Data Time
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I don't think currently implemented watchdog works ok. It detects "No data" from RTSP stream but system does not get up after "triggering restart". At least on container environment. docker logs 1a7dc11461da🐦 BirdNET-Go build date: 2025-01-06T08:16:09Z, using config file: /root/.config/birdnet-go/config.yaml ....... 2025/01/09 14:38:23 Human detected with confidence 0.514/0.500 from source rtsp://@192.168.9.142:554/stream1 |