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.
51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using AmiReel.Services;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace AmiReel.Tests.Services;
|
|
|
|
[TestClass]
|
|
public class FfmpegOutputFilterTests
|
|
{
|
|
[TestMethod]
|
|
[DataRow("ffmpeg version 6.0-full_build-www.gyan.dev")]
|
|
[DataRow("built with gcc 12.2.0")]
|
|
[DataRow("configuration: --enable-gpl")]
|
|
[DataRow("libavutil 58. 2.100 / 58. 2.100")]
|
|
[DataRow("Input #0, avi, from 'clip.avi':")]
|
|
[DataRow("Output #0, mp4, to 'out.mp4':")]
|
|
[DataRow("Stream #0:0: Video: mjpeg")]
|
|
[DataRow("Duration: 00:01:00.00, start: 0.000000, bitrate: 128 kb/s")]
|
|
[DataRow("video:1024kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.5%")]
|
|
[DataRow("Last message repeated 1 times")]
|
|
[DataRow("Last message repeated 24 times")]
|
|
public void IsBoilerplateLine_WithKnownFfmpegBanner_ReturnsTrue(string line)
|
|
{
|
|
// Act
|
|
bool result = FfmpegOutputFilter.IsBoilerplateLine(line);
|
|
|
|
// Assert
|
|
Assert.IsTrue(result);
|
|
}
|
|
|
|
[TestMethod]
|
|
[DataRow("Error while opening encoder for output stream #0:0")]
|
|
[DataRow("Cannot load nvcuda.dll")]
|
|
[DataRow("Unknown encoder 'h264_nvenc'")]
|
|
public void IsBoilerplateLine_WithRealErrorText_ReturnsFalse(string line)
|
|
{
|
|
// Act
|
|
bool result = FfmpegOutputFilter.IsBoilerplateLine(line);
|
|
|
|
// Assert
|
|
Assert.IsFalse(result);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void IsBoilerplateLine_IsCaseInsensitive()
|
|
{
|
|
// Act & Assert
|
|
Assert.IsTrue(FfmpegOutputFilter.IsBoilerplateLine("DURATION: 00:00:01.00"));
|
|
Assert.IsTrue(FfmpegOutputFilter.IsBoilerplateLine("duration: 00:00:01.00"));
|
|
}
|
|
}
|