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.
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
namespace AmiReel.Services;
|
|
|
|
/// <summary>
|
|
/// Recognizes the FFmpeg/FFprobe startup banner and stream-info boilerplate that both the
|
|
/// live log filter (<see cref="ProcessRunner"/>) and the error summarizer
|
|
/// (<see cref="UserFacingErrors"/>) want to hide — the version/library banner, input/output
|
|
/// stream dumps, and the final size/duration summary line are never useful to a user.
|
|
/// </summary>
|
|
public static class FfmpegOutputFilter
|
|
{
|
|
private static readonly string[] BoilerplatePrefixes =
|
|
[
|
|
"ffmpeg version ",
|
|
"built with ",
|
|
"configuration:",
|
|
"libavutil",
|
|
"libavcodec",
|
|
"libavformat",
|
|
"libavdevice",
|
|
"libavfilter",
|
|
"libswscale",
|
|
"libswresample",
|
|
"Input #",
|
|
"Output #",
|
|
"Stream mapping:",
|
|
"Stream #",
|
|
"Metadata:",
|
|
"Duration:",
|
|
"Press [q] to stop",
|
|
"video:",
|
|
"audio:",
|
|
"subtitle:",
|
|
"other streams:",
|
|
"global headers:",
|
|
"muxing overhead:",
|
|
"Last message repeated",
|
|
];
|
|
|
|
public static bool IsBoilerplateLine(string line) =>
|
|
BoilerplatePrefixes.Any(prefix => line.StartsWith(prefix, StringComparison.OrdinalIgnoreCase));
|
|
}
|