Commit Graph
34 Commits
Author SHA1 Message Date
vhaudiquet 1d7f87f71d app: cut a recording's audio tracks off the UI thread
record-daemon / Check and lint (Linux) (push) Successful in 1m9s
record-daemon / Build (Windows x64) (push) Successful in 2m0s
The first open of a multi-track recording re-encoded every track on the
main thread, so the channels could be muted apart. On a 27 minute clip
that is 12.8 s per track, about a minute of a window Windows marks as not
responding, which is what made a game look ready to crash the first time
it was opened. The files are cached, so only that first open paid it.

The cut now runs on a thread, and `tick` opens the channel players when
the files land, at the playhead's time and playing state. Each track is
copied instead of re-encoded, which takes 0.4 s on the same clip, and the
AAC encode stays as a fallback for a codec an m4a cannot hold. A mutex
keeps two cuts from writing the same cache file when a row is reopened
while its first cut is still running.
2026-11-19 23:20:17 +01:00
vhaudiquet 9f6a047867 app: compute the download percentage with checked_div
The current clippy flags the `if total > 0` guard around the division as
`manual_checked_ops`, and `-D warnings` turns that into a failed build,
so nothing else in the app could be checked. `checked_div` says the same
thing without the lint.
2026-11-19 23:20:17 +01:00
vhaudiquet 297118cfc1 app: download ffmpeg on the first run, not the first export
record-daemon / Build, check and test (push) Failing after 1m15s
Clip export needs ffmpeg, and the app fetched it when an export was
asked for: a minute of nothing at the worst moment, with the export
sitting behind it. The run that follows an install now fetches it in
the background and narrates the download in the notice banner; the
notice is updated in place and leaves another notice alone. A hidden
start (the login item) skips the fetch and leaves it to the export.

Only ffmpeg.exe is unpacked. The archive also carries ffplay and
ffprobe, which the export paths never call: unpacking all three put
370 MB beside the exe instead of 105 MB.

An export asked for while the download runs says so instead of
starting a second download over the same directory, and --fetch-ffmpeg
runs the same fetch from a shell, printing progress.

Checked on this machine: --fetch-ffmpeg downloaded in about 20 s,
unpacked, and answered "ready"; a second run returned at once.
2026-11-19 22:23:08 +01:00
vhaudiquet 20303d5ddc app: ship the VC++ runtime with the installer
The app, the daemon, obs.dll and every OBS plugin import VCRUNTIME140.dll,
and the plugins reach for MSVCP140.dll and VCRUNTIME140_1.dll as well.
Windows carries the UCRT but none of those, so an installer without them
starts nothing on a machine that never ran Visual Studio; this one only
worked because the redistributable happened to be installed here.

The three DLLs live in vendor/vcruntime (they are on the redistributable
list) and packager.toml copies them beside the exes.
2026-11-19 22:19:38 +01:00
vhaudiquet 72a6da0ca3 app: note the VC runtime the installer assumes
Both exes import VCRUNTIME140.dll, which Windows does not ship: the
installer works here because Visual Studio's redistributable is
installed. A clean machine would refuse to start the app until either
the redist rides along or the build uses a static CRT.
2026-11-19 21:46:19 +01:00
vhaudiquet 61862ef792 app: make the packager config build the NSIS installer
Three faults kept `cargo packager` from producing anything. "$schema"
was unquoted, which made TOML reject the file so the tool found no
config at all. Without `name`, cargo-packager sets its working
directory to the config *file* before reading the crate name and dies
with ERROR_DIRECTORY. Without `binaries`, it has no main binary; a
config file gets no auto-detection from Cargo.toml, so the binary and
its directory are named here.

The resource list shipped a piece of OBS (obs.dll, its plugins, two of
three libobs DLLs) and none of its data, so the packaged daemon would
have loaded obs.dll without avcodec, libcurl or the module data. It
now copies every DLL the daemon loads, the plugin and module data, and
the obs-*.exe helpers, all from the daemon's release build.

The installer built from this puts the app and the daemon in one
directory: on the dev machine the installed pair answers --probe in a
second with a fresh data directory, and OBS 32.1.0 loads from the
shipped files without downloading anything.
2026-11-19 21:45:53 +01:00
vhaudiquet 74b35b0120 app: play past a clip's end and zoom the scrubber to the clip
Playing in clip mode froze whenever the play head already sat at or
past the end of the selection: the preview rule stopped playback as
soon as the head reached the end, so a play started there was over
before it began. Remember where playback began and stop at the end
only when it began before it.

The scrubber now shows a window around the selection while a clip is
being chosen, the selection taking half the track, so its two ends can
be placed to the pixel. The window holds still while an end is dragged,
and a drag that leaves the bar keeps counting, so a clip can still be
grown past the window.
2026-11-19 20:48:07 +01:00
vhaudiquet 0c7e80d896 app: take the details scroll bars down with the column
The two bars are drawn over the window from the rects their viewports
report, and a live rect outlives the viewport it came from. Closing the
details column stopped reporting, so the last rects stayed and the bars
kept floating over the clip, scrolling nothing.

Draw the bars only while the column they belong to is up.
2026-11-19 19:33:32 +01:00
vhaudiquet 409be9d31a app: give the clip's ends an arrow each on the scrubber
The clip's ends were 3 point bars that took whichever end the pointer
pressed nearest, so a drag near the middle of the track moved an end
instead of the picture, and the two bars were easy to miss on a long
recording.

Each end is now a round gold arrow over the knob, one per end, and only
a drag that starts on an arrow moves that end. The track and the knob
seek as before, in clip mode too. The played part of the track goes
neutral while a clip is chosen, so gold marks the selection alone.

The knob is centered on the play head now, so an arrow at the same
second sits on it rather than a few points beside.
2026-11-19 19:26:09 +01:00
vhaudiquet 5ab3161bf5 app: move the review back arrow into the title bar
Settings already leaves the screen from the title bar, while the review
kept its own back button in the header beside the champion portrait.
Both screens now share the title bar button, and the review header
starts with the portrait.

The button still calls leave, so the player and the soundtrack stop on
the way out.
2026-11-19 18:55:02 +01:00
vhaudiquet 673cddfff6 app: build as a windowed app so no console opens with it
The exe was a console-subsystem binary, so every launch allocated a console
window: from Explorer, from the Run key at login, everywhere. The PE header
now says windowed (`windows_subsystem = "windows"`), and Windows creates no
console for the process.

The printing modes still work from a shell: `attach_console` borrows the
console of whatever started the app, and does nothing when nothing did. The
daemon was already spawned with `DETACHED_PROCESS`, so it never had a window
of its own, and ffmpeg goes through `ffmpeg-sidecar`, which passes
`CREATE_NO_WINDOW` on each spawn.
2026-11-19 18:49:30 +01:00
vhaudiquet eabc3780c9 record: keep a track per audio source and let the review mute them
The recorder put every source on one mixer track, so the file had one audio
stream and the review screen could not tell the game's sound from the
microphone or from Discord.

The daemon now gives each source a track: 1 for the game, 2 for the
microphone, then one per application in the settings, up to OBS's six. Every
track above the first gets an audio encoder and the output is told which
tracks to write, which is what libobs's muxer reads to lay the streams out in
track order. The timeline's new `audio_tracks` names what each stream holds,
with empty names for the tracks no source fed.

The app opens one player per stream, copied out of the clip into the audio
cache, and the transport carries a toggle per channel. A channel that is off
is neither heard nor kept: clip and highlight exports mix only the tracks
left on. Recordings made before this change have one stream and play as they
did.
2026-11-19 18:37:20 +01:00
vhaudiquet 4f2ee4256a app: draw the transport as icons and add a clip mode
The transport showed "Pause", "-10 s" and "+10 s" as words. It now shows
back, play or pause, and forward as shapes, with the words left to the
accessible label. The icons are SVG paths in `icons.rs`, so no font has
to carry them.

Clip mode: the Clip button opens a selection at the play head, the
scrubber drags either end (the end the press landed nearest), the span is
drawn on the track with a handle at each end, and the row under the
transport carries the range, Export clip and Done. Previewing stops at
the end of the selection.
2026-11-19 00:48:32 +01:00
vhaudiquet 4aac0ac70b app: leave the soundtrack alone when the clip stops drawing
record-daemon / Build, check and test (push) Failing after 1m27s
A window that is not drawing stops pulling the clip, so the picture time
stands still while the soundtrack keeps playing from its own reader. The
sync loop read that growing gap as drift and seeked the sound back to the
standing place on every wake, which repeats one second forever. Measured
with a window over the app: the picture stayed at 430.83 s for 6192 wakes
while the sound ran from 495.66 to 495.82.

Only correct the soundtrack once the picture time has moved since the
last correction.

docs/rune-upstream.md records the three rune faults behind this and the
black pause, with the file to change and how to check a fix. Rune main
does not fix them (the video code is unchanged) and does not build on
Windows here.
2026-11-19 00:29:37 +01:00
vhaudiquet f6ccbf59bc app: keep the scrubber where it is when the clip pauses
Rune reads a layered clip's place from its compositor clock, and that
clock stops with playback. The first pause therefore reads zero, the
scrubber jumps to the start, and the clip draws there, which is the
black first second of a recording.

The place is the app's while the clip is paused: only a seek moves it,
and resuming reads the player again.
2026-11-19 00:08:07 +01:00
vhaudiquet ac9faba229 app: play the soundtrack from its own player
Unmuting the review's video player was not enough: rune asks Media
Foundation for pictures and sound from one reader, and that reader stamps
the sound samples from its own session clock rather than the clip's start.
The stamps land about six seconds after the playhead, so the queue never
lines up with the clock and every fill writes zeros.

An audio-only player reads the same file and starts at zero. The review
now keeps one for the soundtrack, muted the video player, and drives both
players from the transport bar: play, pause, seek, volume and mute. They
are kept within a quarter second of each other, and the soundtrack waits
until the file has reported it has sound, so clips without an audio track
open no second player.

Measured with rune instrumented against a 57 s recording: the video
player's render buffer carried zeros on every fill, the soundtrack player
carries the clip's samples at the set gain.
2026-11-18 23:07:00 +01:00
vhaudiquet 1e7e9dfc41 app: unmute the review player and add a volume control
rune starts a video muted and the review never told it otherwise, so every
recording played silent however loud its audio track was. The player now
unmutes at eight tenths, and the transport bar has Mute/Unmute and a
slider beside the clock.

The level carries from one recording to the next, since a viewer sets it
once.
2026-11-18 19:48:22 +01:00
vhaudiquet 2e463dab3a record-daemon: give scripted runs a home of their own
An end-to-end run of mine put its settings through updateSettings, which
wrote them to the user's real config: output path in %TEMP%, a "probe"
application, 30 fps. The next game recorded into %TEMP%, so it showed up
in the history with its metadata and no video beside it.

RECORD_DAEMON_HOME now moves the config directory, the recordings, the
logs and the IPC pipe under one directory. The app reads the same
variable, so a probe talks to the scratch daemon instead of the real one.
Default paths are unchanged.

The daemon also logs its config and recordings paths at startup, which is
the first thing to look at when a recording has no video.
2026-11-17 00:19:13 +01:00
vhaudiquet 6584b2f92f app: read the history a page at a time and open clips on demand
Every launch parsed all 313 timelines, raw responses and all, which put
2.1 GB of JSON on the heap at startup.

The list now holds `Summary` rows: `history::summaries` parses a file,
keeps the champion, queue, scoreline, LP change and event count, then
drops the timeline. Files are listed by write time, and `poll` reads the
next 20 when the list is scrolled near its end or when the filtered rows
do not fill the screen. Selecting a row hands its id to the review
screen, which reads that one timeline on a thread.

Peak memory over 313 recordings: 165 MB.
2026-11-16 23:48:58 +01:00
vhaudiquet 976fcdc354 app: offer the encoders this machine has and save from the tab
The encoder picker listed every kind the daemon knows, so a machine with
an AMD card could choose NVENC and only find out when a recording failed
to start. The list now holds what the encoder probe reports as present,
hardware before software, and a saved preset the machine cannot run
switches to the first one with a note saying so.

Recording drops the hardware acceleration switch and the frame rate
field. Both were decided by the encoder and the quality preset, and the
switch in particular changed nothing the daemon reads.

The tab lists the audio sources it will mix, so the game, the microphone
and the added applications are visible without opening the Audio tab,
and the open folder button sits at the right of the recording folder
row where the other rows keep their controls.

Save now writes. The reply to updateSettings carries no settings, which
parsed into a set of defaults and started the screen over; a reply
without them is an error instead. The button shows Saving while the
round trip runs and the form goes clean only once the daemon has the
values.
2026-11-16 22:20:39 +01:00
vhaudiquet c7fee5beeb app: add applications from a dialog, with icons and a running state
The add row under the sources offered a type selector for device
sources, which the daemon cannot capture reliably, and nothing told a
right process name from a wrong one. A plus in the card header now
opens a dialog asking for a name and a process, and Add stays grey
until both are filled.

Every source shows its executable's icon, read from the running
process or found on disk when the program is closed, and a chip saying
whether that process is running. The process table is read off the UI
thread every couple of seconds while the audio tab is open, and the
disk search remembers its misses so a name costs one walk per run.

Settings drops Refresh and Settings from the title bar, where both only
repeated what the screen already shows.
2026-11-16 20:01:59 +01:00
vhaudiquet 3dfef1961d app: give the window a palette and the settings a quick tab
The colours were rune's neutral defaults, so nothing tied the screens
together. app/src/theme.rs now holds the palette: near-black surfaces
tinted blue, brass for what the user acts on, mint and coral kept for
results so champion art stays the loudest thing on screen. A test
fails the build if a colour that carries text drops under 4.5:1 in
either appearance.

Settings lose the empty General tab: Quick holds quality, the audio and
microphone switches, startup and the recordings folder; Recording keeps
the encoder and output; Audio is three cards instead of five; Advanced
absorbs the audio bitrate and reset. The back button moves to the left
of the title bar, where window navigation belongs, and text fields
right-align their value like every other control on the row.

The microphone picker lists the devices with "System default" first,
naming the default endpoint under the row.

Two smaller repairs found on the way: the app picked
record-daemon/target/release before debug, so it talked to a stale
daemon after a debug build (the newest build now wins), and --snap
forwarded its arguments to a running window instead of rendering.
2026-11-16 19:06:36 +01:00
vhaudiquet 227aecb8f6 app: draw champion portraits, a 16:9 player and draggable scroll bars
Cards and the review header showed two initials where a champion
portrait belongs. Data Dragon is fetched from a worker thread and cached
under the user's cache directory, so the first sight of a champion puts
its face on the card and later runs read it from disk; offline, the tile
keeps its initials on the champion's colour.

The review screen put the clip in a small box above two list columns.
The clip now fills the window at 16:9 and the highlights and timeline
open beside it on demand, so nothing shrinks the video by default and
every event still marks the scrubber.

Scroll bars were a thumb drawn over the cards that could not be
dragged. They now sit in a strip the content leaves free, stay visible
while the list overflows, and scroll the viewport when dragged.
2026-11-16 18:24:39 +01:00
vhaudiquet 3d0cad3312 app: open the review once the history has loaded
`--scene review --live` opened the screen before the timelines were read
and stayed on "No game selected". The screen now remembers the request and
opens the first game that has events when the list arrives.
2026-11-15 23:50:02 +01:00
vhaudiquet 560f08cfb9 app: document the many-games scene and grey the unknown tile
A recording with no champion gets a neutral tile instead of a colour
picked from an empty name. The README lists `--scene many`, which repeats
the sample games to fill the list, and says why the scrollbar needs
`--at 1`.
2026-11-15 23:40:57 +01:00
vhaudiquet 17c73925bf app: draw the whole timeline under the review scrubber
Every event in the recording gets a tick: kills and deaths coloured by
whether they were the player's, objectives and LP changes in the accent,
game start and end muted. Highlights sit on the track as bands.

The summoner carries a #TAG that the live client data's KillerName does
not, so involvement never matched and every game showed 0 highlights.
Names are compared without the tag now.
2026-11-15 23:34:23 +01:00
vhaudiquet e7a36c3129 app: put automatic recording at the center of the window
The titlebar offered "Start recording" although the recorder starts with a
game; Settings takes that button's place. The two-tab sidebar becomes a
status bar that also names the encoder, and the blue square beside the name
is gone.

Match cards show a champion tile: initials on a colour derived from the
name until there is an image cache. History, review and settings lists get
a scrollbar that follows the viewport in the same frame.

Settings keeps the one switch a player can act on, launch at startup, and
says in plain words that recording starts with a game. The recorder's own
toggles and the client poll interval move to Advanced.
2026-11-15 23:34:12 +01:00
vhaudiquet 01a92f1edf app: clear the clippy warnings and the vendored ones
Our crate is warning-free under `cargo clippy --all-targets`. The two
vendored crates warned about an unreachable expression and a qualified
path; both are silenced at their crate root so a normal build prints
nothing.
2026-11-15 23:09:15 +01:00
vhaudiquet e351ee588a app: give the sample defeat a lost LP 2026-11-15 22:48:17 +01:00
vhaudiquet b06ec4be7b app: reach the daemon and load the real history
The pipe path was missing a backslash, so every client call went to a
path Windows never resolves and the app reported a dead daemon. With the
path fixed, --probe answers against the running daemon and parses its
settings with the app's model; a recording made through it lands on disk.

Reading a large history (288 timelines, 524 MB of raw API responses) took
eleven seconds, so the files are parsed on up to eight threads now. The
history refresh also runs in headless runs, and `--live` renders a
snapshot from the daemon and the real timelines instead of sample data.
2026-11-15 22:46:49 +01:00
vhaudiquet 8883e93d2b app: edit per-application volume in the audio tab
Each configured source gets a slider that sends updateAudioSource as it
moves, so a change is heard while dragging. The demo data now includes two
application sources and a microphone, which the screenshots use.

Also look the game up by recording id in the review screen, so a refresh
that adds a recording does not change what is open.
2026-11-15 22:14:23 +01:00
vhaudiquet 0377141e4f app: add native rune client for record-daemon
Replaces the Vue/Tauri front end with a rune app that speaks the daemon's
existing IPC protocol: settings (general, recording, audio), match history
and game review with a scrubber, event markers and ffmpeg highlight export.
Includes tray icon, launch at login, single instance, toasts, a headless
snapshot path for checking screens, and a cargo-packager NSIS config.

Rune is pinned to 4ddf696b0f and its three patched crates are vendored under
app/vendor, since a dependency's [patch.crates-io] does not apply to the app.

The daemon's OBS bootstrap never reached its IPC server on this machine, so
the live check is a `--probe` command; the wire format is covered by tests.
2026-11-15 21:53:44 +01:00
vhaudiquet d712c4ea85 add initial plan for the rune app 2026-11-13 01:17:59 +01:00
vhaudiquet ffe3523f26 add native app plan and decisions 2026-11-13 01:16:57 +01:00