feat(server): render MP4 jobs no render node can take as MJPEG, and say so

BRIEF §14.7: the server falls back to managed formats when no node is
available and says so in the job log. An MP4 job waits for render nodes at
least the node timeout, then as long as an online node can encode its codec
at its size; after that the server's engine takes it and writes each output
it cannot encode as MJPEG in AVI at the same size and frame rate, with a job
log line. A job the server started resumes there. Selective acceptance is
asynchronous for that; when node availability cannot be read the job keeps
waiting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 09:39:17 +00:00
1 parent 1e255fb075
commit 4007293833
15 files changed
+247 -48

No files matched your search

@@ -1,10 +1,12 @@
using Titano.Core.Analysis.Deep;
using Titano.Core.Export;
using Titano.Core.Imaging;
using Titano.Core.Model;
using Titano.Core.Render;
using Titano.Core.Video;
using Titano.Core.Video.Managed;
using Titano.Data.Archiving;
using Titano.Protocol;
namespace Titano.Data.Processing;
@@ -40,9 +42,16 @@ public sealed record ProcessingOptions
/// </summary>
public Func<Guid, string, CancellationToken, Task>? SequenceChanged { get; init; }
/// <summary>The server delegates platform codecs to render nodes and never runs them itself.</summary>
/// <summary>The server delegates platform codecs to render nodes (<see cref="AwaitsRenderNode"/>).</summary>
public EncoderHost Host { get; init; } = EncoderHost.Client;
/// <summary>
/// Server: whether a queued render job that needs a platform encoder still waits for a render node (BRIEF §14.7). Once
/// it does not, the server renders it itself, every output only a node could make as MJPEG in AVI at the same size and
/// frame rate, and says so in the job log. Null: such jobs always wait for a node.
/// </summary>
public Func<Job, RenderJobParameters, CancellationToken, Task<bool>>? AwaitsRenderNode { get; init; }
/// <summary>Recorded with every render this host produces (client or server name).</summary>
public string ProducedBy { get; init; } = Environment.MachineName;