Bring the Video tab closer to Shorts with 4K preview stills and crop modes (none, auto, center, plus the visual editor). Settings store a default source folder so Find videos can collect output.avi sequences. Cap the FFmpeg log with auto-scroll, hide repeat spam, and show a Windows notification when a video or short finishes or fails.
55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
namespace AmiReel.Models;
|
|
|
|
public enum EncoderMode
|
|
{
|
|
Auto,
|
|
NvidiaNvenc,
|
|
CpuX264
|
|
}
|
|
|
|
/// <summary>
|
|
/// One render job's parameters. Uses named init properties rather than a positional
|
|
/// constructor: TrimStart/FadeSeconds/EndCardHoldSeconds are three consecutive
|
|
/// <see langword="double"/> members (and Width/Height/FramesPerSecond/ThumbnailWidth/
|
|
/// ThumbnailHeight five consecutive <see langword="int"/> members), so a positional
|
|
/// record would let arguments be silently transposed at a call site without the
|
|
/// compiler catching it.
|
|
/// </summary>
|
|
public sealed record RenderSettings
|
|
{
|
|
public required IReadOnlyList<string> InputFiles { get; init; }
|
|
public required string EndCardPath { get; init; }
|
|
public required string OutputDirectory { get; init; }
|
|
public required string OutputName { get; init; }
|
|
public required string FfmpegPath { get; init; }
|
|
public required string FfprobePath { get; init; }
|
|
public required EncoderMode Encoder { get; init; }
|
|
public required double TrimStart { get; init; }
|
|
public required double FadeSeconds { get; init; }
|
|
public required double EndCardHoldSeconds { get; init; }
|
|
public required int ThumbnailInterval { get; init; }
|
|
public bool MoveSourcesToOriginals { get; init; } = true;
|
|
public ShortSourceCropMode SourceCropMode { get; init; } = ShortSourceCropMode.Auto;
|
|
public int CropLeft { get; init; }
|
|
public int CropRight { get; init; }
|
|
public int CropTop { get; init; }
|
|
public int CropBottom { get; init; }
|
|
public int Width { get; init; } = 3840;
|
|
public int Height { get; init; } = 2160;
|
|
public int FramesPerSecond { get; init; } = 50;
|
|
public int ThumbnailWidth { get; init; } = 1280;
|
|
public int ThumbnailHeight { get; init; } = 720;
|
|
}
|
|
|
|
public sealed record RenderProgress(double Percent, string Stage, string Message);
|
|
|
|
/// <summary>Which moment of a long-form video a preview still represents.</summary>
|
|
public enum VideoPreviewShot
|
|
{
|
|
Opening,
|
|
Closing,
|
|
}
|
|
|
|
/// <summary>PNG stills of the cropped 4K source look and the end card.</summary>
|
|
public sealed record VideoPreviewFrames(string OpeningPath, string ClosingPath);
|