diff --git a/i18n/en/Editor.resx b/i18n/en/Editor.resx
index 243ae6ed..4e0abcf9 100644
--- a/i18n/en/Editor.resx
+++ b/i18n/en/Editor.resx
@@ -13,6 +13,10 @@
AspectHorizontal centreVertical centre
+ Crop bottom
+ Crop left
+ Crop right
+ Crop topKeyframesKeyframe {0} of {1} · {2}{0} keyframe
@@ -22,18 +26,30 @@
Remove keyframeZoomcloud cover %
+ Flicker
+ change after correction
+ frame-to-frame change
+ 0 %
+ 100 %
+ 50 %
+ Luminancemeasured luminanceNot analysed yethorizontal pathvertical path
+ video frames per photosky regionstars per Mpxexposure steps as received
+ Charttarget curve
+ Waveform
+ luma of frame {0}Pick a sequence in the LibraryThis sequence is no longer in the archive.longJobs cannot run until the archive index is open.longThe settings of this sequence cannot be read.long
+ The settings of this sequence were changed elsewhere at the same time.longabout {0}Add to queueBatch…
@@ -64,6 +80,7 @@
Render nowResolutionResult
+ show fileSave toSequence exports/Estimated size
@@ -116,6 +133,7 @@
Set heroWarningsOpening sequence
+ Cut: pause or gapKeyframeExposure step {0} EVStep {0} EV not received
@@ -138,23 +156,30 @@
Preview 10 sCompareCrop mask
+ Crop resultExit full screenFull screenoutput {0}{0} of {1}
+ PausePlayRegionsShot data
+ This frame cannot be read.Vectorsoriginal | correctedAutoHorizonLuminanceRender · {0}
+ Render finishedRender queued
+ Show in folderRenderResetBack to Auto
+ Changes not saved
+ RetrySectionsf/{0}invariant{0} mminvariant
@@ -170,6 +195,7 @@
{0:N0} frame{0:N0} frames{0} s interval
+ source {0}{0} warning{0} warningsCamera
@@ -185,13 +211,19 @@
output {0} %{0:N0} frame → {1} · {2} fpslong{0:N0} frames → {1} · {2} fpslong
+ Render planPlayback ratesource {0} %AdaptiveConstantInterpolatedRemapped
+ Discard change
+ Keep editing
+ The last change to {0} could not be saved: {1}long
+ Unsaved changeCentred
+ {0}°invariant{0} EVinvariant{0} fpsinvariant{0:N0} frame
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 4709ec9f..80309c18 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -15,7 +15,9 @@
DismissOpen the folder with the log filesReturn to the advisor's value
- Read every frame again and refresh the analysis; runs as a background job
+ Read every frame again and refresh the analysis · Ctrl+Shift+A
+ Read every frame again and refresh the analysis · about {0} · Ctrl+Shift+A
+ An analysis of this sequence is already queued or runningAuto: no advice yet, the engine’s default applies; Analyse lets the advisor decideBack to LibraryAn analysis or render of this sequence is running; settings wait until it ends
@@ -23,14 +25,25 @@
Output aspect ratio; a preset with a fixed size uses its ownHorizontal centre of the selected keyframe’s viewVertical centre of the selected keyframe’s view
+ Cuts this share of the frame on that side; aspect and placement then apply inside the crop
+ Zoom keyframes over the sequence: double-click adds · drag moves · Delete removes · arrows nudge
+ This frame already has a keyframe; select it on the curve to edit itVirtual-camera keyframes: zoom and framing at chosen frames, eased in between
+ Select a keyframe on the curve firstMoves the crop left or right inside the frameMoves the crop up or down inside the frameRemove the selected keyframeZoom of the selected keyframe; 1 shows the whole crop, more zooms in and softens
+ Frame-to-frame brightness change before and after the correction
+ Measured luminance against the target curve, sky region and exposure steps
+ Video frames each photo is shown for, cuts marked · click shows that frame
+ Click or drag to show that frame
+ Luma waveform of the frame on screen: exposure and clipping at a glance
+ Luma of the corrected frame across the picture: white at the top, black at the bottomAdd this render to the queue and keep editingApply this sequence preset to every section · {0}Queue every ticked preset as one job; the sequence is prepared once
+ Tick presets on the cards firstAverage bit rate; more keeps detail and gradients, files growVideo or image codec; 10-bit HEVC keeps sky gradients cleanRec.709 colour; 10-bit avoids banding in skies, HDR is not offered
@@ -41,7 +54,7 @@
Auto: the preset’s {0} fpsReturn to the preset’s frame rateOutput height in pixels; empty follows the width · Enter applies, Esc reverts
- Open Jobs to see the renders of this sequence
+ Open Jobs filtered on this sequenceInclude this preset when Batch queues the renderTokens: {date} {title} {preset} {codec} {width} {height} {fps} · Enter applies, Esc revertsRender with {0}; editing a value makes it Custom
@@ -58,10 +71,12 @@
Frames over which each ISO, shutter or aperture step is spread; 0 keeps the stepsSmooths the colour ratios so auto white balance stops flickering while the sunset drift staysFrames used to estimate the flicker-free curve; too short leaves flicker, too long flattens real light changes
+ Click or drag to show a frame; markers show exposure steps, warnings and keyframesLeave this frame out of every render; the photo is not deletedShow the first frame concerned
- Use the frame as the sequence thumbnail
+ Make this the hero frame; the editor opens on itUse this frame in renders again
+ Sort by this column; click again to reverseClick a row to show the frameAdds blur along the motion like a slower shutter; costs optical flow on every frameOptical flow precision for blur and synthesised frames; Best is the slowest
@@ -85,15 +100,24 @@
Show pixels at 1:1 without interpolation · Ctrl+1; Ctrl+0 fitsPlay ten seconds of the video’s frames with the current settingsWipe compare: original on the left, corrected on the right; drag the line
+ Dim what the output cuts (what I lose)Show the whole frame and darken what the output will cut
+ Hide what the output cuts (how it will look)Close full screen · EscFull screen at native resolution · Esc closesShow the sky and landscape boundary used by region deflickerShow or hide the shot dataOverlay the motion to the next frame measured by the engine
+ Drag the line to compare · drag to pan · wheel zooms · double-click 1:1Render with the selected preset; progress in the job bar · Ctrl+R
+ Fix the file name first: {0}
+ Every frame is excluded: include some in the Frames tab
+ The frame size is unknown: the frames could not be read
+ Working out the render; ready in a moment
+ Show the rendered file in ExplorerChoose another presetReturn every control of this section to Auto · Ctrl+Z undoes
+ Try to save now; saving is also retried automaticallyFrames combined into each output frame; trails and smoothing grow with itMedian and mean remove noise and moving things; star trails keep the brightest pixelsCrop, aspect, virtual camera moves
@@ -103,9 +127,12 @@
Motion blur, optical flow, stabilisationMedian and star-trail stackingFrame rate, timing mode, speed curve
+ Output time to source position: double-click adds a point · drag moves · Delete removes · arrows nudgeScales the timing so the video lasts this long; off keeps the playback rateConstant: one frame per photo; Adaptive: follows capture time; Interpolated: fills gaps; Remapped: follows the curvePhotos shown per second of video; more plays the sequence faster
+ Close without the change; the stored settings stay as they were
+ Stay in the editor; saving is retried in the backgroundStop this job; Retry continues later from its last checkpointHide finished jobs from the list; they stay in the historyEvery job
diff --git a/i18n/it/Editor.it.resx b/i18n/it/Editor.it.resx
index b4b30d0c..2d7f8f68 100644
--- a/i18n/it/Editor.it.resx
+++ b/i18n/it/Editor.it.resx
@@ -12,6 +12,10 @@
FormatoCentro orizzontaleCentro verticale
+ Ritaglio in basso
+ Ritaglio a sinistra
+ Ritaglio a destra
+ Ritaglio in altoFotogrammi chiaveChiave {0} di {1} · {2}{0} chiave
@@ -21,18 +25,30 @@
Rimuovi chiaveZoomcopertura nuvolosa %
+ Sfarfallio
+ variazione dopo la correzione
+ variazione tra fotogrammi
+ 0%
+ 100%
+ 50%
+ Luminanzaluminanza misurataNon ancora analizzatapercorso orizzontalepercorso verticale
+ fotogrammi video per fotoregione del cielostelle per Mpxsalti di esposizione ricevuti
+ Graficocurva obiettivo
+ Forma d’onda
+ luma del fotogramma {0}Scegli una sequenza in LibreriaQuesta sequenza non è più nell’archivio.I lavori non possono partire finché l’indice dell’archivio non è aperto.Le impostazioni di questa sequenza non sono leggibili.
+ Le impostazioni di questa sequenza sono state modificate altrove nello stesso momento.circa {0}Metti in codaIn serie…
@@ -43,7 +59,7 @@
EncoderAutoNome file
- Fotogrammi al secondo
+ Fotogrammi/shardwareAltezzaRender precedenti: {0} · ultimo {1}
@@ -59,6 +75,7 @@
Renderizza oraRisoluzioneRisultato
+ mostra fileSalva inexports/ della sequenzaDimensione stimata
@@ -75,7 +92,7 @@
IntensitàTemperatura coloreTransizioni
- Bilanciamento del bianco
+ Bilanciamento uniformeFinestra deflickerPellicolaBilanciata
@@ -108,6 +125,7 @@
Imposta copertinaAvvisiApertura sequenza
+ Taglio: pausa o vuotoFotogramma chiaveSalto di esposizione {0} EVSalto {0} EV non ricevuto
@@ -128,23 +146,30 @@
Anteprima 10 sConfrontaMaschera ritaglio
+ Risultato ritaglioEsci da schermo interoSchermo interouscita {0}{0} di {1}
+ PausaRiproduciRegioniDati di scatto
+ Questo fotogramma non si può leggere.Vettorioriginale | correttoAutoOrizzonteLuminanzaRenderizza · {0}
+ Render completatoRender in coda
+ Mostra nella cartellaRenderizzaRipristinaTorna ad Auto
+ Modifiche non salvate
+ RiprovaSezioniLunghezzaMedia
@@ -156,6 +181,7 @@
{0:N0} fotogramma{0:N0} fotogrammiintervallo {0} s
+ sorgente {0}{0} avviso{0} avvisiInquadratura
@@ -171,12 +197,17 @@
uscita {0} %{0:N0} fotogramma → {1} · {2} fps{0:N0} fotogrammi → {1} · {2} fps
+ Piano di renderVelocitàsorgente {0} %AdattivoCostanteInterpolatoSu curva
+ Scarta modifica
+ Continua a modificare
+ L’ultima modifica a {0} non è stata salvata: {1}
+ Modifica non salvataCentrato{0:N0} fotogramma{0:N0} fotogrammi
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index eda5c4e9..37ddddd5 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -15,7 +15,9 @@
ChiudiApri la cartella dei file di logTorna al valore consigliato
- Rilegge ogni fotogramma e aggiorna l’analisi; gira come lavoro in background
+ Rilegge ogni fotogramma e aggiorna l’analisi · Ctrl+Maiusc+A
+ Rilegge ogni fotogramma e aggiorna l’analisi · circa {0} · Ctrl+Maiusc+A
+ Un’analisi di questa sequenza è già in coda o in corsoAuto: ancora nessun consiglio, vale il valore predefinito; Analizza lascia decidere al consulenteTorna alla LibreriaÈ in corso un’analisi o un render di questa sequenza; le impostazioni attendono la fine
@@ -23,14 +25,25 @@
Formato dell’uscita; un preset con dimensioni fisse usa il proprioCentro orizzontale dell’inquadratura della chiave sceltaCentro verticale dell’inquadratura della chiave scelta
+ Taglia questa parte del fotogramma su quel lato; formato e posizione valgono poi dentro il ritaglio
+ Fotogrammi chiave dello zoom: doppio clic aggiunge · trascina sposta · Canc rimuove · le frecce spostano di poco
+ Questo fotogramma ha già un fotogramma chiave; selezionalo sulla curva per modificarloChiavi della camera virtuale: zoom e inquadratura in fotogrammi scelti, raccordati tra loro
+ Seleziona prima un fotogramma chiave sulla curvaSposta il ritaglio a sinistra o a destra nel fotogrammaSposta il ritaglio in alto o in basso nel fotogrammaRimuove la chiave selezionataZoom della chiave scelta; 1 mostra tutto il ritaglio, di più ingrandisce e ammorbidisce
- Mette in coda questo render e continui a modificare
+ Variazione di luminosità tra fotogrammi prima e dopo la correzione
+ Luminanza misurata rispetto alla curva obiettivo, regione del cielo e salti di esposizione
+ Fotogrammi video per ogni foto, con i tagli segnati · un clic mostra quel fotogramma
+ Clic o trascina per mostrare quel fotogramma
+ Forma d’onda della luma del fotogramma a schermo: esposizione e clipping a colpo d’occhio
+ Luma del fotogramma corretto lungo l’immagine: bianco in alto, nero in basso
+ Mette in coda questo render; puoi continuare a modificareApplica questo preset di sequenza a tutte le sezioni · {0}Mette in coda i preset spuntati come un unico lavoro; la sequenza si prepara una volta
+ Spunta prima i preset sulle schedeBit rate medio; di più conserva dettagli e sfumature, i file cresconoCodec video o immagine; HEVC a 10 bit mantiene pulite le sfumature del cieloColore Rec.709; 10 bit evitano il banding nel cielo, l’HDR non è disponibile
@@ -41,7 +54,7 @@
Auto: i {0} fps del presetTorna ai fotogrammi al secondo del presetAltezza in pixel; vuoto segue la larghezza · Invio applica, Esc annulla
- Apre Lavori per vedere i render di questa sequenza
+ Apre Lavori filtrati su questa sequenzaInclude questo preset quando In serie mette in coda il renderSegnaposto: {date} {title} {preset} {codec} {width} {height} {fps} · Invio applica, Esc annullaRenderizza con {0}; modificare un valore lo rende Personalizzato
@@ -58,10 +71,12 @@
Fotogrammi su cui si distribuisce ogni salto di ISO, tempo o diaframma; 0 lascia i saltiSmussa i rapporti di colore: il bilanciamento automatico smette di sfarfallare e la deriva del tramonto restaFotogrammi usati per stimare la curva senza sfarfallio; troppo corta lo lascia, troppo lunga appiattisce i veri cambi di luce
+ Clic o trascina per mostrare un fotogramma; i segni indicano salti di esposizione, avvisi e fotogrammi chiaveLascia fuori questo fotogramma da ogni render; la foto non viene eliminataMostra il primo fotogramma interessato
- Usa il fotogramma come copertina della sequenza
+ Rende questo fotogramma la copertina; l’editor si apre quiUsa di nuovo questo fotogramma nei render
+ Ordina per questa colonna; un altro clic inverteFai clic su una riga per mostrare il fotogrammaAggiunge mosso lungo il movimento come un tempo più lungo; richiede il flusso ottico su ogni fotogrammaPrecisione del flusso ottico per mosso e fotogrammi sintetici; Massima è la più lenta
@@ -85,15 +100,24 @@
Mostra i pixel 1:1 senza interpolazione · Ctrl+1; Ctrl+0 adattaRiproduce dieci secondi dei fotogrammi del video con le impostazioni attualiConfronto a tendina: originale a sinistra, corretto a destra; trascina la linea
+ Scurisce ciò che l’uscita taglia (cosa perdo)Mostra tutto il fotogramma e scurisce ciò che l’uscita taglierà
+ Nasconde ciò che l’uscita taglia (come apparirà)Chiudi schermo intero · EscSchermo intero alla risoluzione nativa · Esc chiudeMostra il confine tra cielo e paesaggio usato dal deflicker per regioniMostra o nasconde i dati di scattoSovrappone il movimento verso il fotogramma successivo misurato dal motore
+ Trascina la linea per confrontare · trascina per spostare · la rotellina ingrandisce · doppio clic 1:1Renderizza con il preset scelto; avanzamento nella barra dei lavori · Ctrl+R
+ Correggi prima il nome del file: {0}
+ Tutti i fotogrammi sono esclusi: includine alcuni nella scheda Fotogrammi
+ La dimensione dei fotogrammi è sconosciuta: non è stato possibile leggerli
+ Calcolo del render in corso; pronto tra un attimo
+ Mostra il file del render in Esplora fileScegli un altro presetRiporta in Auto ogni controllo di questa sezione · Ctrl+Z annulla
+ Prova a salvare ora; il salvataggio viene anche ritentato da soloFotogrammi combinati in ogni fotogramma d’uscita; scie e levigatura crescono con essoMediana e media tolgono rumore e ciò che si muove; le scie stellari tengono i pixel più luminosiRitaglio, formato, movimenti della camera virtuale
@@ -102,10 +126,13 @@
Tabella dei fotogrammi, avvisi, esclusioniMosso, flusso ottico, stabilizzazioneStacking a mediana e scie stellari
- Velocità, modo dei tempi, curva di velocità
+ Frequenza fotogrammi, modo dei tempi, curva di velocità
+ Tempo del video verso posizione nella sequenza: doppio clic aggiunge un punto · trascina sposta · Canc rimuove · le frecce spostano di pocoScala i tempi perché il video duri così; spento mantiene la velocitàCostante: un fotogramma per foto; Adattivo: segue l’ora di scatto; Interpolato: riempie i vuoti; Su curva: segue la curvaFoto mostrate per secondo di video; di più accelera la sequenza
+ Chiude senza la modifica; le impostazioni salvate restano com’erano
+ Resta nell’editor; il salvataggio viene ritentato in backgroundFerma questa attività; Riprova la continua più tardi dall'ultimo punto di ripresaNasconde le attività concluse dall'elenco; restano nella cronologiaTutte le attività
diff --git a/src/Titano.App/Editor/CameraTab.cs b/src/Titano.App/Editor/CameraTab.cs
index dd52d241..0d0f1841 100644
--- a/src/Titano.App/Editor/CameraTab.cs
+++ b/src/Titano.App/Editor/CameraTab.cs
@@ -8,18 +8,34 @@ using Titano.Core.Localization;
using Titano.Core.Mathematics;
using Titano.Core.Project;
using Titano.Ui.Mvvm;
+using Titano.Ui.Visuals;
namespace Titano.App.Editor;
+/// Margins of the free crop, in the order of CameraTab.Margins (opposites differ in the lowest bit).
+public enum CropSide
+{
+ Left,
+ Right,
+ Top,
+ Bottom,
+}
+
///
-/// Camera (BRIEF §12.3): output aspect and crop placement, and virtual-camera keyframes edited as a zoom curve over the
-/// sequence (X = frame, Y = zoom) with the selected keyframe's framing below.
+/// Camera (BRIEF §12.3): the free crop of the frame (margins), the output aspect and its placement inside the crop, and
+/// virtual-camera keyframes edited as a zoom curve over the sequence (X = frame, Y = zoom) with the selected keyframe's
+/// framing below.
///
public sealed class CameraTab : EditorTab
{
/// Zoom at the top of the curve editor.
public const double MaxZoom = 4;
+ /// Largest crop margin; opposite margins together leave at least of the frame.
+ public const double MaxCropMargin = 0.45;
+
+ public const double MinCropSize = 0.1;
+
private int _selectedKey = -1;
public CameraTab(EditorViewModel editor)
@@ -28,6 +44,10 @@ public sealed class CameraTab : EditorTab
var s = editor.Session;
Rows =
[
+ CropRow(s, CropSide.Left, "Editor.Camera.CropLeft"),
+ CropRow(s, CropSide.Right, "Editor.Camera.CropRight"),
+ CropRow(s, CropSide.Top, "Editor.Camera.CropTop"),
+ CropRow(s, CropSide.Bottom, "Editor.Camera.CropBottom"),
new AutoChoiceRow(s, EditorSettings.Aspect, "Editor.Camera.Aspect", "Tooltips.Editor.Camera.Aspect",
[
new Choice("source", "Editor.Aspect.Source"), new Choice("16:9", "Editor.Aspect.Ratio", "16:9"), new Choice("21:9", "Editor.Aspect.Ratio", "21:9"),
@@ -35,9 +55,9 @@ public sealed class CameraTab : EditorTab
new Choice("9:16", "Editor.Aspect.Ratio", "9:16"), new Choice("4:5", "Editor.Aspect.Ratio", "4:5"),
]),
new NumberRow(s, "Editor.Camera.OffsetX", "Tooltips.Editor.Camera.OffsetX", -1, 1, 0.05, p => p.Camera.OffsetX,
- (p, v) => p with { Camera = p.Camera with { OffsetX = v } }, Placement),
+ (p, v) => p with { Camera = p.Camera with { OffsetX = v } }, EditorText.Placement),
new NumberRow(s, "Editor.Camera.OffsetY", "Tooltips.Editor.Camera.OffsetY", -1, 1, 0.05, p => p.Camera.OffsetY,
- (p, v) => p with { Camera = p.Camera with { OffsetY = v } }, Placement),
+ (p, v) => p with { Camera = p.Camera with { OffsetY = v } }, EditorText.Placement),
];
AddKeyCommand = new RelayCommand(AddKey, () => !Editor.IsBusy && Keys.All(k => k.Frame != Editor.CurrentIndex));
RemoveKeyCommand = new RelayCommand(RemoveKey, () => !Editor.IsBusy && SelectedKey >= 0);
@@ -96,6 +116,12 @@ public sealed class CameraTab : EditorTab
public ICommand RemoveKeyCommand { get; }
+ /// What Add keyframe does, or why it cannot run now.
+ public string AddKeyToolTip => Loc.L(Editor.IsBusy ? "Tooltips.Editor.Busy"
+ : Keys.Any(k => k.Frame == Editor.CurrentIndex) ? "Tooltips.Editor.Camera.KeyExists" : "Tooltips.Editor.Camera.AddKey");
+
+ public string RemoveKeyToolTip => Loc.L(Editor.IsBusy ? "Tooltips.Editor.Busy" : HasSelectedKey ? "Tooltips.Editor.Camera.RemoveKey" : "Tooltips.Editor.Camera.NoKey");
+
/// Run by the curve editor after each finished edit.
public ICommand CommitCurveCommand { get; }
@@ -130,9 +156,38 @@ public sealed class CameraTab : EditorTab
Editor.Session.Edit(p => p with { Camera = p.Camera with { Keyframes = [.. keys.DistinctBy(k => k.Frame)] } });
}
- public void OnCurrentFrameChanged() => OnPropertyChanged(nameof(Playhead));
+ public override void OnCurrentFrameChanged()
+ {
+ OnPropertyChanged(nameof(Playhead));
+ OnPropertyChanged(nameof(AddKeyToolTip));
+ }
- private static string Placement(double value) => value == 0 ? Loc.L("Editor.Value.Centred") : value.ToString("+0.00;−0.00", Loc.Culture);
+ public override void OnBusyChanged()
+ {
+ base.OnBusyChanged();
+ OnPropertyChanged(nameof(AddKeyToolTip));
+ OnPropertyChanged(nameof(RemoveKeyToolTip));
+ }
+
+ /// A margin of the free crop (, normalised x, y, width, height); all zero = the whole frame.
+ private static NumberRow CropRow(EditorSession session, CropSide side, string headerKey) => new(session, headerKey, "Tooltips.Editor.Camera.Crop", 0,
+ MaxCropMargin, 0.01, p => Margins(p.Camera.Crop)[(int)side], (p, v) => p with { Camera = p.Camera with { Crop = WithMargin(p.Camera.Crop, side, v) } },
+ v => Formatting.Percent(v));
+
+ /// Left, right, top and bottom margins of a crop rectangle.
+ private static double[] Margins(double[]? crop) => crop is [var x, var y, var w, var h] && new[] { x, y, w, h }.All(double.IsFinite)
+ ? [double.Clamp(x, 0, 1), double.Clamp(1 - x - w, 0, 1), double.Clamp(y, 0, 1), double.Clamp(1 - y - h, 0, 1)]
+ : [0, 0, 0, 0];
+
+ private static double[]? WithMargin(double[]? crop, CropSide side, double value)
+ {
+ var margins = Margins(crop);
+ var opposite = (int)side ^ 1;
+ margins[(int)side] = double.Clamp(value, 0, double.Min(MaxCropMargin, 1 - MinCropSize - margins[opposite]));
+ if (margins.All(m => m == 0)) return null;
+ var (left, right, top, bottom) = (margins[0], margins[1], margins[2], margins[3]);
+ return [left, top, 1 - left - right, 1 - top - bottom];
+ }
private Point ToPoint(CameraKey key) => new(Editor.FrameCount > 1 ? (double)key.Frame / (Editor.FrameCount - 1) : 0, (key.Zoom - 1) / (MaxZoom - 1));
@@ -166,6 +221,7 @@ public sealed class CameraTab : EditorTab
private void OnSelectedKeyChanged()
{
OnPropertyChanged(nameof(HasSelectedKey));
+ OnPropertyChanged(nameof(RemoveKeyToolTip));
OnPropertyChanged(nameof(SelectedCenterX));
OnPropertyChanged(nameof(SelectedCenterY));
OnPropertyChanged(nameof(SelectedZoom));
@@ -175,13 +231,16 @@ public sealed class CameraTab : EditorTab
}
///
-/// Time (BRIEF §12.3): timing mode, playback rate, fit-to duration and the time-remap curve (output time → source
-/// position, Fritsch–Carlson as the render evaluates it), with the plan in numbers.
+/// Time (BRIEF §12.3): timing mode, playback rate, fit-to duration, the plan chart (video frames each photo gets, cuts
+/// marked, the plan in numbers) and the time-remap curve (output time → source position, Fritsch–Carlson as the render
+/// evaluates it).
///
public sealed class TimeTab : EditorTab
{
private Func? _evaluator;
private string? _planText;
+ private IReadOnlyList _planSeries = [];
+ private IReadOnlyList _planMarkers = [];
public TimeTab(EditorViewModel editor)
: base(editor, "Time", AdvisorSection.Timing)
@@ -216,6 +275,16 @@ public sealed class TimeTab : EditorTab
/// "3,600 frames → 2 min 30 s · 24 fps".
public string? PlanText { get => _planText; private set => Set(ref _planText, value); }
+ /// Video frames each photo is shown for (0 = skipped by a speed-up, gap = excluded), over the sequence.
+ public IReadOnlyList PlanSeries { get => _planSeries; private set => Set(ref _planSeries, value); }
+
+ /// Cuts of the plan (deliberate pauses, gaps, long exclusion runs).
+ public IReadOnlyList PlanMarkers { get => _planMarkers; private set => Set(ref _planMarkers, value); }
+
+ public IReadOnlyList PlanLegend { get; } = [new(Loc.L("Editor.Chart.Shown"), "Brush.Accent")];
+
+ public Func PlanFormatter { get; } = v => v.ToString("0.#", Loc.Culture);
+
public double Playhead => Editor.FrameCount > 1 ? (double)Editor.CurrentIndex / (Editor.FrameCount - 1) : double.NaN;
public Func XFormatter { get; } = x => Loc.L("Editor.Time.Output", (x * 100).ToString("0", Loc.Culture));
@@ -240,11 +309,23 @@ public sealed class TimeTab : EditorTab
if (Editor.Plan is not { } plan)
{
PlanText = null;
+ PlanSeries = [];
+ PlanMarkers = [];
return;
}
var render = plan.Setup.Plan;
PlanText = Loc.Plural("Editor.Time.Plan", render.Frames.Count, Formatting.Duration(TimeSpan.FromSeconds(render.DurationSeconds)),
EditorText.FrameRate(render.FrameRate));
+ var shown = new double[Editor.FrameCount];
+ Array.Fill(shown, double.NaN);
+ foreach (var index in render.IncludedFrames) shown[index] = 0;
+ foreach (var frame in render.Frames)
+ {
+ var index = int.Clamp((int)double.Round(frame.SourcePosition), 0, shown.Length - 1);
+ shown[index] = (double.IsNaN(shown[index]) ? 0 : shown[index]) + frame.Slots;
+ }
+ PlanSeries = [new ChartSeries(Loc.L("Editor.Chart.Shown"), shown, "Brush.Accent")];
+ PlanMarkers = [.. render.IncludedFrames.Where(render.IsCutBefore).Select(i => new TimelineMarker(i, MarkerKind.Warning, Loc.L("Editor.Marker.Cut")))];
}
/// The curve editor finished an edit: the points become the remap curve, and the timing mode follows it.
@@ -261,7 +342,7 @@ public sealed class TimeTab : EditorTab
});
}
- public void OnCurrentFrameChanged() => OnPropertyChanged(nameof(Playhead));
+ public override void OnCurrentFrameChanged() => OnPropertyChanged(nameof(Playhead));
private static Func? Spline(IReadOnlyList points)
{
diff --git a/src/Titano.App/Editor/CardColumns.cs b/src/Titano.App/Editor/CardColumns.cs
new file mode 100644
index 00000000..c64190e2
--- /dev/null
+++ b/src/Titano.App/Editor/CardColumns.cs
@@ -0,0 +1,17 @@
+using System.Globalization;
+using System.Windows.Data;
+
+namespace Titano.App.Editor;
+
+/// Columns of the Export tab's preset grid: as many as fit at (four at 1440 px, three at 1200 px).
+public sealed class CardColumns : IValueConverter
+{
+ public const double MinCardWidth = 200;
+
+ public static CardColumns Instance { get; } = new();
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture) =>
+ value is double width && double.IsFinite(width) ? int.Max(1, (int)(width / MinCardWidth)) : 4;
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotSupportedException();
+}
diff --git a/src/Titano.App/Editor/EditorImages.cs b/src/Titano.App/Editor/EditorImages.cs
index 95ce23bb..ce709f30 100644
--- a/src/Titano.App/Editor/EditorImages.cs
+++ b/src/Titano.App/Editor/EditorImages.cs
@@ -19,6 +19,21 @@ public static class EditorImages
bitmap.Freeze();
return bitmap;
}
+
+ /// A waveform as an opacity mask (white, alpha = density) so the view paints it in a theme brush.
+ public static BitmapSource ToMask(LumaWaveform waveform)
+ {
+ ArgumentNullException.ThrowIfNull(waveform);
+ var pixels = new byte[waveform.Density.Length * 4];
+ for (var i = 0; i < waveform.Density.Length; i++)
+ {
+ var alpha = waveform.Density[i];
+ pixels[4 * i] = pixels[4 * i + 1] = pixels[4 * i + 2] = pixels[4 * i + 3] = alpha;
+ }
+ var bitmap = BitmapSource.Create(waveform.Columns, waveform.Rows, 96, 96, PixelFormats.Pbgra32, null, pixels, waveform.Columns * 4);
+ bitmap.Freeze();
+ return bitmap;
+ }
}
///
diff --git a/src/Titano.App/Editor/EditorMeasures.xaml b/src/Titano.App/Editor/EditorMeasures.xaml
index 21d43e4f..18fd29c6 100644
--- a/src/Titano.App/Editor/EditorMeasures.xaml
+++ b/src/Titano.App/Editor/EditorMeasures.xaml
@@ -5,25 +5,81 @@
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
xmlns:e="clr-namespace:Titano.App.Editor">
+
+
+
+ CurrentIndex="{Binding Editor.CurrentIndex, Mode=TwoWay}" ToolTip="{l:Loc Tooltips.Editor.Chart.Seek}" AutomationProperties.Name="{Binding Header}" />
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -35,7 +91,7 @@
-
+
@@ -43,7 +99,7 @@
-
+
@@ -56,14 +112,22 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -122,30 +186,43 @@
+ IsEnabled="{Binding Editor.IsEditable}" ToolTip="{l:Loc Tooltips.Editor.Camera.Curve}" ToolTipService.ShowOnDisabled="True"
+ AutomationProperties.Name="{l:Loc Editor.Camera.Curve}" />
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -153,16 +230,19 @@
@@ -187,9 +187,11 @@
+ Command="{Binding AddKeyCommand}" ToolTip="{Binding AddKeyToolTip}" ToolTipService.ShowOnDisabled="True"
+ AutomationProperties.Name="{l:Loc Editor.Camera.AddKey}" />
+ Command="{Binding RemoveKeyCommand}" ToolTip="{Binding RemoveKeyToolTip}" ToolTipService.ShowOnDisabled="True"
+ AutomationProperties.Name="{l:Loc Editor.Camera.RemoveKey}" />
@@ -274,9 +276,9 @@
-
-
-
+
+
-
+
@@ -305,15 +310,15 @@
-
+
-
+
-
+
@@ -329,7 +334,7 @@
-
+
@@ -346,7 +351,7 @@
Visibility="{Binding IsFrameRateAuto, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
-
+
@@ -361,7 +366,7 @@
Visibility="{Binding IsQualityApplicable, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
-
+
@@ -369,20 +374,30 @@
-
+
+
+
+
+
-
+
-
+
-
+
diff --git a/src/Titano.App/Editor/EditorSession.cs b/src/Titano.App/Editor/EditorSession.cs
index 8c0a2358..7cad9de9 100644
--- a/src/Titano.App/Editor/EditorSession.cs
+++ b/src/Titano.App/Editor/EditorSession.cs
@@ -1,4 +1,5 @@
using Titano.Core.Advice;
+using Titano.Core.Diagnostics;
using Titano.Core.Export;
using Titano.Core.Project;
using Titano.Core.Video;
@@ -35,7 +36,7 @@ public sealed class EditorSession : IAsyncDisposable
History = new ProjectHistory(content.Project);
History.Changed += OnProjectChanged;
_saver = new ProjectSaver(SaveAsync, saveDelay ?? DefaultSaveDelay);
- _saver.Failed += ex => SaveFailed?.Invoke(ex);
+ _saver.Failed += OnSaveFailed;
(Content, Context, Advice, Presets) = Analyse(content, _codecs);
}
@@ -45,7 +46,7 @@ public sealed class EditorSession : IAsyncDisposable
/// The sequence was read again (after an analysis): frames, reports, advice and presets.
public event Action? ContentChanged;
- /// Saving the project failed; the next change tries again.
+ /// Saving the project failed (raised once per run of failures; the save is retried until it succeeds).
public event Action? SaveFailed;
public ISequenceSource Source { get; }
@@ -64,9 +65,12 @@ public sealed class EditorSession : IAsyncDisposable
public ProjectSettings Project => History.Current;
- /// A change is waiting for its save or being saved.
+ /// A change is waiting for its save, being saved, or waiting for a retry after a failed save.
public bool HasPendingSave => _saver.HasPendingChanges;
+ /// Why the pending change could not be stored; null when the last save succeeded.
+ public Exception? LastSaveError => _saver.LastError;
+
/// Applies as an undoable step; false when it changes nothing.
/// Consecutive edits with the same key are one undo step (a slider drag).
public bool Edit(Func change, string? mergeKey = null)
@@ -75,6 +79,9 @@ public sealed class EditorSession : IAsyncDisposable
return History.Apply(change(Project), mergeKey);
}
+ /// The drag or key press behind a run of merged edits ended ().
+ public void EndEditRun() => History.EndRun();
+
public bool Undo() => History.Undo();
public bool Redo() => History.Redo();
@@ -146,13 +153,14 @@ public sealed class EditorSession : IAsyncDisposable
ContentChanged?.Invoke();
}
- /// Stores pending changes now.
- public Task FlushAsync() => _saver.FlushAsync();
+ /// Stores pending changes now; false when the save failed (the change stays pending and is retried).
+ public Task FlushAsync() => _saver.FlushAsync();
+ /// Stores what is pending one last time and releases the source; callers that must not lose an edit flush and ask first.
public async ValueTask DisposeAsync()
{
History.Changed -= OnProjectChanged;
- await _saver.FlushAsync();
+ if (!await _saver.FlushAsync()) Log.Warning("editor", $"The last change of {Content.Sequence.DisplayTitle} was not saved", _saver.LastError);
await Source.DisposeAsync();
}
@@ -177,6 +185,12 @@ public sealed class EditorSession : IAsyncDisposable
return changes;
}
+ private void OnSaveFailed(Exception ex, int failures)
+ {
+ Log.Warning("editor", $"Saving the project of {Content.Sequence.DisplayTitle} failed (attempt {failures})", ex);
+ if (failures == 1) SaveFailed?.Invoke(ex);
+ }
+
private void OnProjectChanged()
{
_saver.Schedule(Project);
diff --git a/src/Titano.App/Editor/EditorStyles.xaml b/src/Titano.App/Editor/EditorStyles.xaml
index a1d903dc..dd4dbb9e 100644
--- a/src/Titano.App/Editor/EditorStyles.xaml
+++ b/src/Titano.App/Editor/EditorStyles.xaml
@@ -12,29 +12,50 @@
9*12*320
+
+ 96
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/src/Titano.App/Editor/EditorTab.cs b/src/Titano.App/Editor/EditorTab.cs
index 99fa5247..ef8314ed 100644
--- a/src/Titano.App/Editor/EditorTab.cs
+++ b/src/Titano.App/Editor/EditorTab.cs
@@ -39,7 +39,10 @@ public abstract class EditorTab : LocalizedViewModel
public virtual bool CanReset => true;
- public string OptimiseToolTip => Loc.L(CanOptimise ? "Tooltips.Editor.OptimiseSection" : "Tooltips.Editor.OptimiseNone");
+ /// What Optimise section does, or why it cannot run now.
+ public string OptimiseToolTip => Loc.L(!CanOptimise ? "Tooltips.Editor.OptimiseNone" : Editor.IsBusy ? "Tooltips.Editor.Busy" : "Tooltips.Editor.OptimiseSection");
+
+ public string ResetToolTip => Loc.L(Editor.IsBusy ? "Tooltips.Editor.Busy" : "Tooltips.Editor.ResetSection");
public ICommand OptimiseCommand { get; }
@@ -64,6 +67,23 @@ public abstract class EditorTab : LocalizedViewModel
{
}
+ /// The frame on screen changed (playheads, the frame table, keyframe commands).
+ public virtual void OnCurrentFrameChanged()
+ {
+ }
+
+ /// A job of this sequence started or ended: commands and their tooltips follow.
+ public virtual void OnBusyChanged()
+ {
+ OnPropertyChanged(nameof(OptimiseToolTip));
+ OnPropertyChanged(nameof(ResetToolTip));
+ }
+
+ /// Raises the enabled state of the tab's asynchronous commands (the others follow the command manager).
+ public virtual void RefreshCommands()
+ {
+ }
+
public override void Dispose()
{
foreach (var row in Rows) row.Dispose();
diff --git a/src/Titano.App/Editor/EditorText.cs b/src/Titano.App/Editor/EditorText.cs
index c47c97e4..b9830240 100644
--- a/src/Titano.App/Editor/EditorText.cs
+++ b/src/Titano.App/Editor/EditorText.cs
@@ -1,7 +1,11 @@
+using System.Collections;
+using System.Globalization;
using Titano.App.Infrastructure;
+using Titano.Core.Advice;
using Titano.Core.Export;
using Titano.Core.Localization;
using Titano.Core.Model;
+using Titano.Core.Project;
using Titano.Core.Video;
namespace Titano.App.Editor;
@@ -24,6 +28,24 @@ public static class EditorText
return string.Join(Separator, parts);
}
+ /// "3,600 frames · 24 fps · 2 min 30 s · 3840×2160 · source 8192×5464": what the export makes of the sequence (Export.html header).
+ public static string OutputSummary(SequenceContent content, ExportPlan plan)
+ {
+ ArgumentNullException.ThrowIfNull(content);
+ ArgumentNullException.ThrowIfNull(plan);
+ var render = plan.Setup.Plan;
+ var settings = plan.Setup.Encoder.Settings;
+ var parts = new List
+ {
+ Loc.Plural("Editor.Summary.Frames", content.Count),
+ Loc.L("Editor.Value.Fps", FrameRate(render.FrameRate)),
+ Formatting.Duration(TimeSpan.FromSeconds(render.DurationSeconds)),
+ };
+ if (settings.Width > 0 && settings.Height > 0) parts.Add(Size(settings.Width, settings.Height));
+ if (content.SourceWidth > 0 && content.SourceHeight > 0) parts.Add(Loc.L("Editor.Summary.Source", Size(content.SourceWidth, content.SourceHeight)));
+ return string.Join(Separator, parts);
+ }
+
/// "0413 / 3,600 · 18:02:11 · 1/8 s · f/8 · ISO 400 · 24 mm".
public static string Shot(Frame frame, int index, int count)
{
@@ -100,5 +122,72 @@ public static class EditorText
_ => Loc.L("Export.Codec." + codec),
};
+ /// "+1.0", "−0.7" (EV with a sign).
+ public static string Ev(double ev) => ev.ToString("+0.0;−0.0;0.0", Loc.Culture);
+
+ /// "01:17.2" (minutes, seconds and tenths of a video position).
+ public static string Clock(double seconds)
+ {
+ var t = TimeSpan.FromSeconds(double.Max(0, seconds));
+ return ((int)t.TotalMinutes).ToString("00", Loc.Culture) + ":" + t.Seconds.ToString("00", Loc.Culture) + Loc.Culture.NumberFormat.NumberDecimalSeparator
+ + (t.Milliseconds / 100).ToString(Loc.Culture);
+ }
+
+ /// "Centred", "+0.25" (crop placement −1…1).
+ public static string Placement(double value) => value == 0 ? Loc.L("Editor.Value.Centred") : value.ToString("+0.00;−0.00", Loc.Culture);
+
+ /// The label of an advisor parameter as its control shows it.
+ public static string ParameterLabel(string parameter) => parameter switch
+ {
+ AdvisorParameters.Hero => Loc.L("Editor.Frames.HeroLabel"),
+ AdvisorParameters.Excluded => Loc.L("Editor.Frames.ExcludedLabel"),
+ AdvisorParameters.TimingMode => Loc.L("Editor.Time.Mode"),
+ AdvisorParameters.FrameRate => Loc.L("Editor.Time.Rate"),
+ AdvisorParameters.FitToSeconds => Loc.L("Editor.Time.Fit"),
+ AdvisorParameters.Deflicker => Loc.L("Editor.Exposure.Deflicker"),
+ AdvisorParameters.DeflickerWindow => Loc.L("Editor.Exposure.Window"),
+ AdvisorParameters.DeflickerStrength => Loc.L("Editor.Exposure.Strength"),
+ AdvisorParameters.Regions => Loc.L("Editor.Exposure.Regions"),
+ AdvisorParameters.HolyGrail => Loc.L("Editor.Exposure.HolyGrail"),
+ AdvisorParameters.TransitionLength => Loc.L("Editor.Exposure.Transitions"),
+ AdvisorParameters.WhiteBalanceSmoothing => Loc.L("Editor.Exposure.WhiteBalance"),
+ AdvisorParameters.MotionBlur => Loc.L("Editor.Motion.Blur"),
+ AdvisorParameters.TargetShutterAngle => Loc.L("Editor.Motion.Shutter"),
+ AdvisorParameters.FlowQuality => Loc.L("Editor.Motion.Flow"),
+ AdvisorParameters.Stabilize => Loc.L("Editor.Motion.Stabilize"),
+ AdvisorParameters.StabilizeSmoothing => Loc.L("Editor.Motion.Smoothing"),
+ AdvisorParameters.Aspect => Loc.L("Editor.Camera.Aspect"),
+ AdvisorParameters.OffsetY => Loc.L("Editor.Camera.OffsetY"),
+ AdvisorParameters.ExportPreset => Loc.L("Editor.Export.Preset"),
+ AdvisorParameters.Resolution => Loc.L("Editor.Export.Resolution"),
+ _ => parameter,
+ };
+
+ /// A value of an advisor parameter as its control shows it (the "what changed" toast of Optimise).
+ public static string Value(string parameter, object? value) => (parameter, value) switch
+ {
+ (_, null) => Loc.L("Editor.Value.None"),
+ (AdvisorParameters.Hero, int frame) => Loc.L("Editor.Frames.HeroValue", (frame + 1).ToString("D4", Loc.Culture)),
+ (AdvisorParameters.Aspect, "source") => Loc.L("Editor.Aspect.Source"),
+ (AdvisorParameters.FrameRate, string rate) when FrameRateText.TryParse(rate, out var parsed) => Loc.L("Editor.Value.Fps", FrameRate(parsed)),
+ (AdvisorParameters.FitToSeconds, double seconds) => Formatting.Duration(TimeSpan.FromSeconds(seconds)),
+ (AdvisorParameters.DeflickerWindow or AdvisorParameters.TransitionLength, int frames) => Loc.Plural("Editor.Value.Frames", frames),
+ (AdvisorParameters.DeflickerStrength, double strength) => strength.ToString("0.00", Loc.Culture),
+ (AdvisorParameters.TargetShutterAngle, double degrees) => Loc.L("Editor.Value.Degrees", degrees.ToString("0", Loc.Culture)),
+ (AdvisorParameters.StabilizeSmoothing, double sigma) => Loc.Plural("Editor.Value.Frames", (long)double.Round(sigma)),
+ (AdvisorParameters.OffsetY, double offset) => Placement(offset),
+ (AdvisorParameters.Resolution, string size) => size.Replace('x', '×'),
+ (_, bool on) => Loc.L(on ? "Editor.Value.On" : "Editor.Value.Off"),
+ (_, TimingMode mode) => Loc.L("Editor.Timing." + mode),
+ (_, RegionMode mode) => mode == RegionMode.Off ? Loc.L("Editor.Value.Off") : Loc.L("Editor.Regions." + mode),
+ (_, FlowQualitySetting quality) => Loc.L("Editor.Flow." + quality),
+ (_, string id) when ExportPresets.Find(id) is { } preset => Loc.L(preset.NameKey),
+ (_, string text) => text,
+ (_, double number) => number.ToString("0.##", Loc.Culture),
+ (_, IEnumerable list) => Loc.Plural("Editor.Value.Frames", list.Cast