Skip to content

Retrying a failed render uses the FFmpeg you picked in Settings (#1658) - #1676

Open
ccoventry wants to merge 6 commits into
devfrom
fix/retry-rereads-ffmpeg-path-1658
Open

ccoventry wants to merge 6 commits into
devfrom
fix/retry-rereads-ffmpeg-path-1658

Conversation

@ccoventry

@ccoventry ccoventry commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Release note: Fixed: Retrying a failed render now uses the FFmpeg you picked in Settings; if the picked FFmpeg file is missing, renders use the bundled or PATH one and say so (log and a toast), or fail naming the path.

Closes #1658

A render batch kept the FFmpeg path resolved when its takes were queued, so after fixing the setting Retry and Reset kept failing "FFmpeg not found" until Clear Queue and a rescan.

  • render_live_ffmpeg.rs (new): LiveFfmpegPath follows the saved setting like the export folders do. Start reads it again, and the scheduler follows it once per pass, outside the jobs lock, so every job of a pass runs the same FFmpeg and a Retry in a running batch runs the new one. A job keeps one FFmpeg from start to end. resolve_ffmpeg moved here (no ceiling raise).
  • One rule (choose) for the queue, a recovered batch, Start and the follower: a picked file as it is, a one-word name (ffmpeg.exe) found on the PATH, else a missing pick falls back to the bundled or PATH FFmpeg. A missing pick is never silent: one activity-log line and one toast (8 seconds) per distinct setting value, so Render While Capturing's per-clip Start does not repeat it (the Render tab listens for render_ffmpeg_missing). With no fallback the render fails "FFmpeg not found at: . Pick it again in Configuration > Paths."
  • Start makes one choice, off the async worker, and seeds the scheduler's follower with it, so a save or a pick that goes missing between Start and the first pass is taken and said. A one-word name and "ffmpeg" in any case follow the PATH rules. save_settings hands the value over under the settings lock, before validation can refuse the save.
  • Setup's FFmpeg row names a missing picked path ("there is no file at ...") instead of the PATH message.
  • Activity log: [settings] FFmpeg path now ... on a change, [render] FFmpeg changed since the takes were queued: was X, now Y plus the new version line when a batch swaps.

Other baked settings

Codec, fps and custom args are per job by design. Export folders and Resumable renders were already live. No other instance found.

Test done

cargo test -p desktop-studio -p source-checks (527) and -p native renderer pass; clippy -D warnings and fmt 1.98.1 clean; Vitest 1999 pass (Setup row text, toast string, listener). New tests: follower changes once, save between Start and first pass, missing pick falls back and is reported, one-word name via PATH, stale setting is not a change since queueing, log lines. Mutation checks (each fails a test): Start not saying a missing pick; apply_logged not saying it; the fallback ignored; no once-per-value dedupe. Not covered by a test: the save_settings wiring and the one-line apply_for/start_for wrappers. Live Studio steps are filed in #1686 (not run here). Not tested in-game.

Decisions

Previews, Combine and the OBS test still call resolve_ffmpeg (same fallback, minus the one-word PATH lookup). Review rounds are in the PR's findings comments.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ccoventry and others added 2 commits December 3, 2026 23:45
… the reason (#1658)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…le failing clearly (#1658)

Review round: the scheduler follows the setting once per pass outside the jobs
lock and logs the swap and the new FFmpeg's version line; a picked file that is
gone fails naming it instead of falling back; the live value is updated before
a save can refuse; resolve_ffmpeg moved into render_live_ffmpeg.rs so the
render_manager.rs ceiling raise is dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Review findings

Review of head 92050e1 (Fable). Fix commit 4e5e582. Rows 8-9 and 10-12 are the review's live steps; none was run (no live Studio run fits the time, and 10-12 need the game), they are filed together as #1686.

# Finding Severity Outcome
1 Mid-batch FFmpeg switch not logged, a picked file that goes missing falls back silently medium Fixed in 4e5e582: the scheduler follows the setting once per pass (FfmpegInUse, like the export folders), logs old and new path plus the version line on change, and a picked path is used as it is so a missing file fails naming it, test a_path_picked_after_queueing_reaches_the_next_pass_once and a_picked_file_that_is_missing_is_used_as_it_is
2 The scheduler line and the settings wiring have no test low Fixed in 4e5e582: PerJob no longer carries the path; the follower writes it into the config every job is built from, test a_job_started_after_the_ffmpeg_setting_changes_runs_the_new_one (mutation checks in row 13). The scheduler's single apply_logged call and the save_settings call are not unit-testable, filed in #1686
3 Disk stats while locks are held low Fixed in 4e5e582: setting cloned out before any work, resolved once per pass before the jobs lock, last_config let-bound before refresh, test a_path_picked_after_queueing_reaches_the_next_pass_once
4 A failed settings save leaves the live path stale while the form shows the new one low Fixed in 4e5e582: save_settings hands the value over before validate and save can refuse; no unit test (it is inside the Tauri command), live step in #1686
5 The ceiling raise is avoidable low Fixed in 4e5e582: resolve_ffmpeg moved into render_live_ffmpeg.rs, callers updated, ceiling back at 2100, test hot_files_stay_under_their_ceiling
6 Comments describe the old behaviour nit Fixed in 4e5e582: start_queued_render doc, RenderBatchPayload.ffmpeg_path and ipc_bridge.js reworded to say Settings is read at Start and followed
7 Settings log line names the raw setting, not what renders run nit Fixed in 4e5e582: the line says "not found: renders fail until the file is there" for a missing file, test the_ffmpeg_setting_line_says_when_the_file_is_missing
8 Not tested: the issue's own case live (Retry and Reset after picking FFmpeg) medium Filed #1686
9 Not tested: switching FFmpeg while a batch runs medium Filed #1686
10 Not tested: Render While Capturing low Filed #1686
11 Not tested: a recovered batch low Filed #1686
12 Not tested: a resumable render resumed on a different FFmpeg low Filed #1686
13 Not tested: mutation checks on the tests low Fixed in 4e5e582: run once each. Deleting the refresh in start_config fails start_uses_the_ffmpeg_settings_have_now_not_the_one_queued_with; deleting the config write in apply fails a_path_picked_after_queueing_reaches_the_next_pass_once and a_job_started_after_the_ffmpeg_setting_changes_runs_the_new_one; deleting the scheduler's apply_logged call fails nothing (the async loop has no unit test), covered by the live steps in #1686

Note: a typo in the FFmpeg field now fails renders naming the path instead of quietly running the bundled or PATH FFmpeg at Start, by the reviewer's instruction to fail clearly; queue time still falls back.

…verywhere (#1658)

Round 2 of the review: a picked FFmpeg path whose file is gone falls back to
the bundled or PATH FFmpeg and is said once per batch (activity log and one
toast); only with no fallback does the render fail, naming the path and where
to pick it again. The queue, a recovered batch and Start use one rule, a
one-word name goes through the PATH lookup, the follower compares on its first
pass so a save between Start and the scheduler is not missed, the live value
is handed over under the settings lock, and Setup's FFmpeg row names a missing
picked path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Review findings

Round 2. Review of head 4e5e582; fix commit 99b4664. Per the owner's "warn, don't restrict" preference, a picked FFmpeg that is missing now falls back (bundled, then PATH) with a visible warning instead of failing renders. Live Studio steps 9-11 are not run, they are in #1686.

# Finding Severity Outcome
1 A stale FFmpeg setting fails renders that used to work, with no notice medium Fixed in 99b4664: a missing pick falls back to the bundled or PATH FFmpeg, one log line per batch and change and one toast per batch, and with no fallback the render fails "FFmpeg not found at: . Pick it again in Configuration > Paths."; Setup's row names the missing path; PR body and Release note rewritten; test a_missing_picked_file_falls_back_and_is_reported and the_missing_ffmpeg_line_names_the_path_and_what_runs_instead (the toast and Setup row have no unit test, live steps in #1686)
2 A setting saved between Start and the scheduler's first pass is missed low Fixed in 99b4664: the follower compares on its first pass, test a_save_between_start_and_the_first_pass_is_not_missed
3 A one-word name other than ffmpeg now fails while Setup says fine low Fixed in 99b4664: a one-word name goes through the PATH lookup, test a_one_word_name_is_looked_up_on_the_path_and_no_override_means_bundled_or_path
4 The setting means two things, and the "was ffmpeg when queued" line misleads low Fixed in 99b4664: the queue, a recovered batch, Start and the follower share one rule and the line now reads "changed since the takes were queued", test a_stale_setting_does_not_read_as_a_change_since_queueing
5 Two overlapping saves can leave the live path different from the file low Fixed in 99b4664: the value is handed over under the settings lock before validation, no unit test (inside the Tauri command), live step 5 in #1686
6 The scheduler's apply_logged call has no test low Filed #1686
7 FfmpegInUse has two impl blocks nit Fixed in 99b4664: merged into one, no test needed (structure only)
8 The live-checks issue names this PC's FFmpeg folder nit Fixed in 99b4664: issue #1686 rewritten with made-up paths
9 Not tested: switching FFmpeg while a batch runs low Filed #1686
10 Not tested: a stale setting as on the owner's PC low Filed #1686
11 Not tested: never set a path, two quick saves low Filed #1686
12 Not tested: mutation checks low Fixed in 99b4664: run, each fails a test: no refresh in start_config fails start_uses_the_ffmpeg_settings_have_now_not_the_one_queued_with; apply not writing the config fails a_path_picked_after_queueing_reaches_the_next_pass_once and two more; a missing pick not reported fails a_missing_picked_file_falls_back_and_is_reported; the old follow-time count fails a_save_between_start_and_the_first_pass_is_not_missed

ccoventry and others added 2 commits December 4, 2026 01:00
…the async worker (#1658)

Round 3 of the review: the warning is remembered per distinct choice so Render
While Capturing's per-clip Start does not repeat it; Start makes one choice off
the async worker and seeds the follower with it (a pick that goes missing
before the first pass is reported); the fallback rule and the announce
decisions are pure and tested on any machine; "ffmpeg" in any case is no
override; the toast stays 8 seconds; Vitest covers the Setup row text, the
toast string and the listener.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Review findings

Round 3. Review of head 99b4664; fix commit 3740827 (branch merged with dev first). Live Studio steps 9-11 are not run, they are in #1686 (steps 3, 10, 11 added).

# Finding Severity Outcome
1 Under Render While Capturing the warning fires once per clip medium Fixed in 3740827: the warning is remembered per distinct choice in LiveFfmpegPath (once per value, again after a fix then a new break), test start_says_a_stale_pick_once_across_many_starts and a_stale_value_is_announced_once_however_many_starts
2 A pick that goes missing between Start and the first pass is silent, and Start looks twice low Fixed in 3740827: Start makes one choice and seeds the follower with it, test a_pick_that_goes_missing_after_start_is_reported_though_the_ffmpeg_is_the_same
3 The fallback rule and the announce are not pinned by machine-independent tests low Fixed in 3740827: choose_with takes the fallback and PATH lookup, pure announce decision, Vitest for the Setup row, the toast string and the listener, test a_missing_pick_falls_back_and_is_reported_or_stays_when_there_is_no_fallback and the new ffmpeg_missing_toast.test.js
4 The toast stays 3 seconds low Fixed in 3740827: 8000 ms, test the_listener_toasts_a_warning_for_8_seconds in ffmpeg_missing_toast.test.js
5 A "pick is now missing" change logs "was F, now F" and a second version line nit Fixed in 3740827: the changed and version lines are written only when the FFmpeg that runs changed, test a_pick_that_goes_missing_mid_batch_is_said_once
6 One-word names: log says no file, "FFmpeg" in another case, bundled order nit Fixed in 3740827: ffmpeg_found comes from choose, "ffmpeg" in any case is no override (bundled first as on dev), test nothing_picked_or_the_default_name_is_the_fallback_in_any_case
7 start_queued_render's doc says two things nit Fixed in 3740827: doc reworded, no test needed (comment only)
8 Start stats the disk and walks PATH on an async worker low Fixed in 3740827: the choice is made in spawn_blocking, once per Start, covered by the Start tests and live step 11 in #1686
9 Not tested: Render While Capturing with a stale FFmpeg setting low Filed #1686
10 Not tested: stale setting by hand, both ways low Filed #1686
11 Not tested: a picked path on a drive that is asleep or unplugged low Filed #1686
12 Not tested: mutation checks low Fixed in 3740827: run, each fails a test: Start not saying a missing pick fails start_says_a_stale_pick_once_across_many_starts; apply_logged not saying it fails a_pick_that_goes_missing_mid_batch_is_said_once; the fallback ignored fails a_missing_pick_falls_back_and_is_reported_or_stays_when_there_is_no_fallback; no dedupe fails a_stale_value_is_announced_once_however_many_starts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retrying a failed render keeps the FFmpeg path it was queued with

1 participant