Repository navigation
feat: Voice master, clearer levels and phone capture, with team folder sync hardening - #8
Merged
Merged
Conversation
…older A team folder's device lists now name only plain files and the recording's own folder or its .by-<device> folder; any other entry is not followed, and this computer publishes only to its own folder in the share.
Names another computer lists now also leave out the files that stay on each computer (any letter case), names Windows reads as another file and control characters. A recording folder or file in the share that is a link is neither read nor written through.
…er sync Windows 8.3 short names (a tilde followed by a digit) are never synced, and a file renamed into place counts only when the folder lists it under exactly that name.
An npm .cmd shim is resolved to the Node script or program it wraps and run with an argument list. When cmd.exe is still needed, any argument holding a character cmd.exe treats specially is refused with a plain message.
Find Android phones and emulators (adb devices), booted iOS Simulators (simctl) and the AirPlay receiver's mirror window; never bundle adb. Show taps and SystemUI demo mode are read, applied and put back. The scrcpy server 3.3.1 is downloaded at first use and accepted only with its published SHA-256; the client side of its protocol and a small Matroska writer keep the phone's own timestamps. Producers record the Simulator, the AirPlay window (FFmpeg avfoundation, cropped), Android through scrcpy, and screenrecord as the fallback.
The phone feed registers the take's screen track and a phone audio track (?source=phone, host-phone) when the take starts and fills them when it stops, joining paused segments with the picture stream copied. A phone recording can be uploaded and narrated over; phone layouts (portrait with blurred fill, device frame, beside the camera) are made on export. Routes under /api/phone/sources, feed, files, recordings.
The shell opts in to CoreMediaIO screen capture devices at start, lists the muxed iOS devices and records one with AVFoundation into the capture folder the server named, with pause and resume. Uses objc2 crates already in the lock. Windows and Linux answer that it needs a Mac.
The Phone panel lists an iPhone on USB, Android devices and emulators, booted Simulators, the AirPlay mirror and a phone recording, says what is missing and how to fix it, and records the chosen one in place of the screen. Import a phone recording uses the library's importer, and the phone page can send a video already on the phone through the native upload on the guest listener.
A Voice master take uploads a 48 kHz 24-bit WAV beside the Opus track through the studio feature (POST /api/studio/takes/:id/master?seq=n and /master/end), in ordered chunks like a track's, to one fixed file name. The first chunk must carry the canonical PCM header (shared/wav.ts); the sizes are written when the take ends. It is not a session track, so the player, exports and transcripts never play it twice. recording.json gains capture: the microphone preset, each track's getSettings(), the quality asked for, room tone and the clips with their take times. The master is described from the server's own file at save, never from the client's word.
The microphone opens with the chosen preset's constraints instead of echo cancellation hard-coded on: Standard follows Effects' three switches, Voice master turns all three off, asks for mono 48 kHz 24-bit, skips every plugin's microphone hook, offers 8 s of room tone and writes the lossless WAV from an AudioWorklet tap. The same tap feeds a large meter under the stage and a compact one in the record bar, in every layout: a -60 to 0 dBFS scale with the too-quiet zone, the green -18 to -12 band and the red zone, a 1.5 s peak hold with its number, a clip light that latches until clicked with the count, and plain hints after quiet speech or repeated red. A pre-roll check advises turning the input up or down; clips are counted with their take times and reported when the take stops. The studio notes when a camera or screen delivers less than the quality preset. Effects' preview meter reads the same zones.
Load a Markdown or text script, or paste one, and the stage shows one paragraph at a time. While the take records, Space (or Done) marks the paragraph done and starts the next paragraph's chapter at that moment, with the paragraph's words as the chapter's text, so the audio lines up with the script for training and editing. The first chapter starts when reading starts (after room tone). Space is taken from a focused button while a script is read, so it never presses Pause or Stop, and the Slides layout keeps its own Space.
Export with sound renders the camera or the screen with the microphone into one H.264 and AAC MP4 that QuickTime plays, at the size the picture was recorded, through edit's one exporter (so edits and trims apply). The player's Tracks list says the camera and screen files are pictures only and the microphone file is sound only, and downloads carry that in their names. A Capture panel shows the preset, what the browser applied to each track, the size asked for and delivered, the clips as links to their times, every file of the take with what it holds, and the WAV master.
…Chromium A fake microphone plays quiet tone with a full-scale clap every four seconds: the clip light latches and clears, the too-quiet hint shows, the level check advises, the save screen lists the clips, the WAV is pcm_s24le 48 kHz mono with DSP flags false in recording.json, and Space drops a chapter per paragraph. A Standard camera take opens with echo cancellation off when Effects says so, notes the delivered size, shifts nothing at 4x CPU throttling, and exports an MP4 with H.264 and AAC.
…ce-and-phone # Conflicts: # src/HASHOUT_LOG.md
…other entry Synced file names are now printable ASCII only. Before a file is placed, the target folder is read and the move is refused when an existing entry differs from the name but matches it once case is folded. Files are linked into place and fail when the name is taken, and an earlier version is removed only under exactly the same name.
…private name An earlier version under the same name is now replaced by a single rename, so a failed step cannot leave the file missing. A new name is still taken by a hard link, with a rename where the file system cannot link. Each temporary file is created new under a random name, hashed through the handle that wrote it, and placed only while its path still holds that same regular file.
Each incoming or outgoing file is now copied and verified in a staging folder inside FormRec's own data folder, and is checked to be the same regular file right before it moves. On the same volume it is renamed or linked into place. When the target is on another volume it is copied with an exclusive create and the copy's hash is checked.
Contributor
Author
|
Behaviour change to decide on: a synced file renamed only by letter case on another computer (for example NOTES.TXT to notes.txt) is now left unsynced on this computer until it is renamed by hand, because names that differ only by case are no longer written over each other. Publishing into a share on a different volume also replaces an earlier version by removing it before the copy, so a failed copy leaves it missing until the next pass. |
Links in MCP answers and the command line's JSON no longer carry the run's token. Each recording's link carries a player key, an HMAC of its id under one secret in the data folder, checked by a gate that answers /api/player/:id and its media only. Settings, Agents, Player links, Rotate (POST /api/agents/player-links/rotate, also a window command and formrec url --rotate-player-links) replaces the secret so every link given so far stops working. The client opens such a link as a read-only player view.
…links A secret file that holds no secret is replaced, a file system with no hard links places the first secret with an exclusive copy, and when no secret can be kept a tool's answer still arrives with a link that has no key and no token.
The test job had no FFmpeg, so 44 test files failed with spawnSync ffmpeg ENOENT. Install ffmpeg (FFprobe comes with it) and poppler-utils, which the picture guide's PDF test reads with pdftotext and pdfimages. Tesseract, Xvfb and the phone tools skip when absent.
Before permission, WebKit and Chromium list devices with empty labels or a default entry only, and nothing refilled the lists when a device was plugged in. The studio now refills both lists on devicechange (debounced), when the window is shown or focused again, when a permission becomes granted and after Get ready opens the devices, keeping the current choice, then the saved one, then the system default. Refresh devices beside the pickers rebuilds both lists; when names are hidden it asks for microphone (and camera, when the layout uses it) permission once, stops those tracks at once and lists again, then says what it found in a status line with reserved height. The phone panel lists its sources again on devicechange too. Agents: formrec_studio_state carries the device names the studio last found, and formrec_studio_refresh_devices asks the open studio for the same refresh (askPermission optional) through /api/studio/devices, answered with labels only.
A hosted Linux runner for a private repository has two cores, so vitest ran one test file at a time and the whole suite needed about an hour, past the job limit. Four runners now each take a quarter of the files and write a blob report with coverage; the test job type checks and merges them into one report. docs/api.md lists the studio device routes, as the generated API list test expects.
…ux runners The folder sync checked a staged file by device and inode before placing it. Linux file systems reuse a freed inode number for the next file created, so a staged file deleted and written again could pass that check. The placement check now also hashes the staged file through a handle opened without following links. Tests on a Linux runner: - the astats noise floor reads FFmpeg 8's "RMS through dB" as well; - the Android test runs Gradle 8.10 with a JDK it supports (17 to 23), using JAVA_HOME_21 or JAVA_HOME_17 when the default JDK is newer; - the Firefox walks of the interactive demo and the WebKit take skip when those Playwright browsers are not installed; - the live link latency check, which reads the picture with Tesseract, skips when Tesseract is not installed.
The share page swaps its video source to change quality. While the new source loads, the element reads paused, so a pause pressed then started playback instead, and the end of the swap resumed playing whatever the person chose. The page now keeps the person's choice during a swap and applies it when the new source shows. A browser test holds the new source back and presses play and pause inside the swap. The avatar share test records the voice and the mouth as they change, so a slow machine that checks late still sees that both followed the video.
…test Each share started FFmpeg encodes of the whole rendition ladder and every save an automatic poster that decodes through the avatar's per-pixel mask filter. The test reads neither, and on a 2-vCPU runner they starved the share listener and Chromium until a page.goto timed out. Stop the rendition queue and turn the automatic posters off for this file, as the other share and edit tests do.
The walkthrough baseline takes page.screenshot({ clip }) while the screencast
runs. Chromium then draws only the clip for a moment and sends that frame to
the screencast at the clip's size, so the video showed a zoomed flash. Under
load the flash was held for several frames and scene detection read it as a
page change, which moved a walkthrough chapter seconds before its page and
dropped the real cut that followed (scenes-chapters on CI: -2989 ms).
A frame is now used only when its size matches the page's viewport. A new test
records clipped screenshots during a capture and checks every frame of the
video.
Dropping frames by their size was not enough: on a Linux runner one frame drawn for a clipped screenshot still reached the video. Screencast.during now holds the capture around work that draws the page for something other than the viewer, and frames drawn in that span, by their own timestamp, are left out. The runner takes each step's baseline picture inside it, and the replay stand-in passes the work through.
…ection The test server was FFmpeg with -listen 1, which serves one connection. When the destination's first attempt after a restart ended early, the sender's retries found the port closed and the destination failed with ECONNREFUSED. The server now listens again after a connection ends, as a real ingest server does, each connection to its own file, and the test still requires the destination to go live and that connection to carry more than 2 s of feed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR carries the team folder sync hardening and two features for the next release (issues #6 and #7).
Team folder sync hardening
Voice master and clearer levels (closes #6)
Phone capture for app walkthroughs (closes #7)
Player links
formrec url --rotate-player-links) replaces it, which stops every link given so far.Tests
For the owner
How to ship