Skip to content

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 28 Oct 07:48
· 192 commits to main since this release

DemoLens 0.4.2 comes from watching a real 4K recording made with 0.4.0 on a MacBook: the voice broke up, no keys were shown, the captions were wrong and the zoom lurched. It also adds word by word caption editing.

(These changes were first meant for 0.4.1. That tag was already published and tags are never moved, so they ship as 0.4.2.)

Most of the macOS code here compiles on CI but has not been run on a Mac by the author. See "Check it on your Mac".

What was wrong with the sound

The test file had AAC mono at 96 kHz. Inside it were about 64 stretches of exact digital silence, 90 to 470 ms long, in the middle of speech, plus 2.5 s of silence at the start. The microphone and the 4K picture were in one ffmpeg process. When the picture pipe backed up, the microphone packets arrived in bursts, and the resampler that corrects timing filled the gaps with silence and dropped samples. That is the stutter, the cut words and the robotic tone. Loudness normalising and noise removal were not the cause (noise removal is off unless asked for, and normalising is a gain change).

Fixes

  • Microphone recorded on its own (macOS). A separate ffmpeg writes the microphone to recording.mic.mkv as 32 bit float, with no timestamp based resampling. When you stop, the sound is laid out by sample count, lined up with the picture, resampled to 48 kHz and encoded as AAC. The temporary file is deleted after a successful join. If the join fails the file is kept.
  • 48 kHz output. Recordings and exports are 48 kHz. AAC exports use 192k, Opus 160k.
  • demolens verify finds dropouts. It reports the sample rate and any runs of exact silence inside speech, and lists them as issues.
  • Smooth recording at 4K (macOS). Screens taller than 1600 px are recorded at 1440p by default. Pick Native, 1440p or 1080p next to the microphone controls, or use --max-height on the command line. Frames are no longer copied twice under a lock, and the pipe to ffmpeg holds far fewer frames. Clicks and the pointer path are scaled to match the smaller picture. If more than 5% of frames are late, the recording prints a hint.
  • Keys and shortcuts.
    • The Keys button is labelled and on by default in the app. It stays off by default in the command line. Only shortcut names and the timing of typing are kept, never the letters.
    • macOS needs Input Monitoring. The app asks when you turn Keys on, checks at launch, and opens the right Settings page. demolens doctor reports it and demolens doctor --prompt-keys triggers the system prompt. Starting a recording without the permission shows a warning.
    • Keys are read from the hardware state, so combinations the system keeps for itself, such as Cmd+Tab, are seen.
    • Labels say Cmd and Option on a Mac.
  • Edit captions word by word. In the Transcript panel, click a word to change it (Enter saves, Tab goes to the next word, Escape cancels). The word keeps its timing. A word replaced by several shares the old word's time, and an emptied word is removed. You can also split a line at the word you last clicked, merge a line with the next, and nudge the start, the end or the whole line by 0.1 s. The edits are saved in the project and are what burned in captions, SRT and VTT use.
  • Better transcripts. Quiet audio is lifted before it goes to Whisper, and the transcript cache is reset so old poor results are not reused. The report names the model, and says so when the tiny model was used. The best model you have installed is used (base.en is recommended, small.en is preferred if present).
  • Calmer auto zoom. The zoom in and out eases more gently (the fastest moment is 1.9 times the average speed, down from 3), takes 1.2 s by default, and starts earlier. The camera now ignores more of the pointer's small movements (steadiness 0.8, a wider dead zone) and follows more slowly. Existing projects keep their saved settings, so press Apply to auto zoom to rebuild them.

Check it on your Mac

  1. demolens doctor --prompt-keys. Allow Input Monitoring, then quit and reopen DemoLens.
  2. Record 30 s with the microphone and Keys on, talking while switching apps with Cmd+Tab. Run demolens verify on it. audio_rate should be 48000 and dropouts empty.
  3. Check the shortcut labels appear, including Cmd+Tab, and that the picture is smooth at the default 1440p. Try Native to compare.
  4. Transcribe with the base.en model and fix a word in the Transcript panel. Export with burned in captions and check the SRT.
  5. Check the zoom after a click, and while moving the pointer a little.
    Send demolens verify output and demolens doctor output if anything looks off.

Honest limits

  • The microphone file, the 1440p capture, the faster frame handoff and the key reading are macOS code that has only been compiled on CI. The audio join, the event scaling and the dropout detector are tested on Linux with synthetic files built to have the same shape.
  • Cmd+Tab is read from the keyboard state. The app switcher animation itself is the system's, and a frame stutter during it may remain. Send a new recording if so.
  • Linux and Windows still mix the microphone in the main ffmpeg process.
  • Key capture does not know about password fields. Turn Keys off while typing secrets.
  • Whisper can still mishear. That is why captions are editable now.