Commit Graph
8 Commits
Author SHA1 Message Date
Claude d064719c11 fix(analysis): record nothing for frames that changed while an analysis ran
A light or deep analysis read its frames at the start and, under the
sequence lock, recorded AnalyzedLight, the warning count and the advisor's
Auto values for them whatever happened meanwhile. Frames added by an upload,
an import or a scan's reconcile then kept advice and warnings counted on the
old frame count, over a newer light analysis, and scans never queued another
one because AnalyzedLight was set again.

Under the lock the analysis now compares the row's frames version with the
one it read. When it moved and no light analysis is queued for the
sequence, it records nothing (a deep pass keeps only analysis.json and its
per-frame measurements), and the job logs it and queues a light analysis of
the frames as they are. A queued light analysis replaces what the pass
records, as for image passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-12 21:37:00 +00:00
Claude 4014b0e669 fix(proxies): judge proxies by one rule and record tiers and reports as they stand
- ArchiveImages.IsProxyOf compares capture times to the microsecond the index
  keeps (sidecars and Exif keep 100 ns ticks), and for frames read through
  proxies also applies the policy's size rule, so the proxy pass, uploads,
  thumbnails, renders, analyses, tiers, manifests and downloads agree.
- Proxy headers are cached per file while length and write time are unchanged
  (and the file has settled), so manifests cost a stat per proxy.
- FrameTiers.RecordAsync checks proxy presence when it writes the sidecar and
  returns the sequence's frames as they are, so a deep analysis or render that
  ran while proxies arrived no longer flags the frames preview-only again, and
  the analysis advises from the current flags.
- Server manifests ignore ProxiesBuilt for frames the server cannot decode, so
  frames added since the last proxy pass are asked for their proxies.
- GET /sequences/{id}/analysis/report answers 404 for a report that found
  frames unreadable before their proxies arrived (DeepReports.ReadCurrentAsync).
- The deep checkpoint key marks only frames read from proxies, so checkpoints
  written by earlier versions still resume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-12 16:52:30 +00:00
Claude 5599e4de89 fix(imaging): record only what decoding proves and find GPR JPEGs across sequences
- Preview sizes come from probes and unscaled decodes: a size-limited decode
  picks the smallest preview that reaches its edge (CR3 PRVW 1620x1080), so
  renders and deep passes record its tier without a size and the output cap
  keeps the largest preview's.
- A read error is not an undecodable file: ImageDecoder.Decode throws the
  IOException when a provider could not read the file and none produced
  pixels. Deep passes never flag frames they could not read or that
  vanished, and frames only an interrupted earlier run found undecodable
  are decoded again before they are flagged.
- Renders resolve stand-ins only for frames the pipeline asks for; frames
  the read-ahead meets on the way (skipped by speed-ups) are left alone.
- A GoPro GPR finds its JPEG in the index when an import or upload kept it
  in a sequence of its own (same original stem and capture time), for
  probes, deep analysis, renders, thumbnails, proxies and the editor;
  GPRs whose JPEG is indexed later are probed again.
- Thumbnails judge an embedded preview by its own JPEG header.
- PostgreSQL writes tier fields 1000 frames per statement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-12 11:17:49 +00:00
Claude 4d321a84b0 fix(imaging): record decode tiers per frame and keep undecodable frames out of renders
BRIEF §8.2 tiers 2 and 3 had no writer: PreviewOnly and Undecodable were never set,
so the advisor could not cap the output at the preview size and one unreadable frame
failed a whole render.

- ImageDecoder.Probe names a file's tier without decoding it (JPEG, PNG and TIFF
  without opening the file); the light analysis probes frames whose tier is unknown,
  and the deep analysis, renders from originals and thumbnail/proxy passes record
  what decoding actually found (FrameTiers). Sidecar frames gain "tier", "previewW"
  and "previewH"; the index gains frames.preview_width/height and
  sequences.preview_only_count (migration 0005, SQLite and PostgreSQL).
- SequenceContext takes the preview size from preview-only frames, so the advisor's
  output cap applies; the light analysis reports format tiers (preview-only frames as
  information, undecodable ones as a warning under the deep analysis' key, listed
  once); a sequence that gains undecodable frames warns at once.
- Only a file in a format the host decodes natively is flagged undecodable; files
  beyond the host's decoders keep their tier without the flag, so render nodes and
  proxies can still supply them.
- A frame that stops decoding during a render is replaced by its nearest planned
  neighbour and logged instead of failing the job; the render fails only when no
  planned frame decodes.
- The Library card shows a preview-only chip with the count (local and server
  sequences: SequenceDto.PreviewOnlyCount, FrameDto preview size).
- GoPro GPR decodes through the JPEG the camera writes beside it when that is larger
  than the embedded preview (BRIEF §8.1).
- Thumbnails use a stored embedded preview only when it reaches 320 px; a smaller one
  sends the frame through the host's decoders instead (BRIEF §8.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-12 09:58:36 +00:00
Claude 4007293833 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
2026-10-03 09:39:17 +00:00
Claude c7ca1ef463 fix(processing): concurrent renders keep their own names; analysis status under the lock; server announces changes
A render reserves the output name it picks, so the same preset queued twice
no longer overwrites one output with the other; render rows take ids from
their job and entry, so a resumed job recognises only its own outputs and
never deletes another render's file. A light pass records its status under
the sequence lock and cannot clear a deep pass's. Renders and Auto value
changes made by the server engine publish sequenceChanged events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 23:16:23 +00:00
Claude 14cdbf1f7d feat(processing): selective render claims, analysis follow-ups, per-sequence failures
- JobEngine: ISelectiveJobHandler lets a host decline jobs of a kind it runs;
  declined jobs stay queued for other claimers without holding up the rest.
  JobContext.EnqueueFollowUpAsync queues follow-up work on the same engine.
- Server renders the jobs whose every output a managed encoder produces
  (ManagedRenderJobHandler); MP4 jobs stay for render nodes. Program.cs
  registers ProcessingModule next to ArchiveModule. Server renders ignore a
  client's export folder.
- Light analysis is queued after imports and after scans that indexed new
  sequences, so the advisor's Auto values exist without user action.
- Analysis jobs log a failing sequence and go on; the job then fails and a
  retry analyses only the failed ones. The advised frame rate follows the
  user's fit-to duration.
- ProcessingJobs.RenderEach splits a batch into one job per preset for
  servers; render nodes say which batch presets they did not render, fetch
  each content once and stop on a changed certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 17:01:50 +00:00
Claude fee198f627 wip(processing): analysis and render job handlers, render node client (interrupted)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 16:33:27 +00:00