Repository navigation
Show recording: record the on-air mix to hourly files - #43
Conversation
…adcast A new show recorder (Tools → Show recorder, and Settings → Show recording) saves everything that goes on air in the background. Files are lined up with the clock (15 minutes to 24 hours each, one hour by default), go into a folder per day, and can be written to a local, network or cloud-synced folder. If that folder can't be written, the hour goes into the data folder instead. Formats: MP3 at 64–320 kbps (built in), FLAC (lossless, through ffmpeg) or WAV. Recording can be limited to days and hours, and recordings older than N days are deleted (only files RadioMaster named itself). The window shows the file being written and how far into it; the status bar shows REC. On a RadioMaster Server the server records, and connected apps show its recorder's status. The local recorder stops while connected to a server. Closes #40 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016m2QHUr78jx6YokVULXvt7
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
Reviewed by MergeGuard AI
MergeGuard agent actionsFix all findingsAll issues (1)
Apply auto-fixes for the findings above on this branch:
Or reply with |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016m2QHUr78jx6YokVULXvt7
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
Reviewed by MergeGuard AI
Dropping the recorder only asks its thread to stop; when RadioMaster or the server quits, the process could end before the file being written was flushed and closed. Quitting now waits (up to 12 s) for that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016m2QHUr78jx6YokVULXvt7
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
Reviewed by MergeGuard AI
Requested by epell · project thread
Closes #40
What it does
A show recorder (logger) that saves everything going on air, in the background, as proof of broadcast.
<folder>/2026-11-01/2026-11-01 14-00.mp3. A restart during the hour starts… (2).mp3instead of overwriting.\\server\share) or a cloud-synced folder (OneDrive, Dropbox, Google Drive). If it can't be written (say the network share is offline), that hour goes into the data folder'srecordingsfolder and the window says so.How it works
src/recorder.rs: its own thread, fed by anengine.add_tap(same mixed PCM as the stream encoders). No file I/O on the UI thread. WAV headers are corrected every 10 s, so a crash still leaves a playable file.Playout::follow_recording(intick) starts, stops or restarts the recorder whencfg.recordingchanges. A change only applies once it has held for 2 s, so typing a folder name doesn't make a file per key press.recordingis a station setting, so the server records and connected apps edit its settings (cfg_denied: needs the Streaming permission).Live.recordingcarries the server recorder's status to apps. When the app connects to a server, its local recorder stops ("one station on air at a time"); it starts again after disconnecting.stream::PipeEncoderis nowpub(crate)and hasfinish(), which collects ffmpeg's last FLAC frames when a file closes.Testing
cargo fmt,cargo +1.99.0 clippy --all-targets -- -D warnings,cargo test(5 new recorder tests: clock alignment, segment lengths, file naming and retention, WAV/MP3 writing, FLAC via ffmpeg),tools/extract_strings.py,tools/check_glyphs.pyandtools/smoke_server.shall pass.2026-11-01 10-00.mp3(about 32 s at 128 kbps) and the file closed properly when the app was stopped.Merge order
The only clash with #42 is the generated
lang/template.json. If #42 merges first, I'll merge main in and regenerate it. No clash with #36.Generated by Claude Code