feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
52
tests/Paca.Tests/Core/VideoAspectAutoCropperGateTests.cs
Normal file
52
tests/Paca.Tests/Core/VideoAspectAutoCropperGateTests.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Paca.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Core;
|
||||
|
||||
public class VideoAspectAutoCropperGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gate337_VideoAspectAutoCropper_BuildsCenterCropFilter()
|
||||
{
|
||||
var filter = VideoAspectAutoCropper.BuildReframingFilterArgs(ReframingMode.CenterCrop, 1080, 1920);
|
||||
|
||||
Assert.Contains("crop=ih*9/16:ih", filter);
|
||||
Assert.Contains("scale=1080:1920", filter);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate338_VideoAspectAutoCropper_BuildsBlurredBackgroundFilter()
|
||||
{
|
||||
var filter = VideoAspectAutoCropper.BuildReframingFilterArgs(ReframingMode.BlurredBackground, 1080, 1920);
|
||||
|
||||
Assert.Contains("split[bg][fg]", filter);
|
||||
Assert.Contains("boxblur", filter);
|
||||
Assert.Contains("overlay=(W-w)/2:(H-h)/2", filter);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate339_VideoAspectAutoCropper_BuildsBlackPadFilter()
|
||||
{
|
||||
var filter = VideoAspectAutoCropper.BuildReframingFilterArgs(ReframingMode.BlackPad, 1080, 1920);
|
||||
|
||||
Assert.Contains("pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black", filter);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate340_VideoAspectAutoCropper_BuildsFullCommandLine_WithAudioCopy()
|
||||
{
|
||||
var cmd = VideoAspectAutoCropper.BuildReframingCommandLine(
|
||||
inputPath: "C:\\videos\\horizontal.mp4",
|
||||
outputPath: "C:\\videos\\vertical_shorts.mp4",
|
||||
mode: ReframingMode.CenterCrop,
|
||||
targetWidth: 1080,
|
||||
targetHeight: 1920
|
||||
);
|
||||
|
||||
Assert.Contains("-i \"C:\\videos\\horizontal.mp4\"", cmd);
|
||||
Assert.Contains("-c:v libx264 -crf 20 -preset fast", cmd);
|
||||
Assert.Contains("-c:a copy", cmd);
|
||||
Assert.EndsWith("\"C:\\videos\\vertical_shorts.mp4\" -y", cmd);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue