mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
made test resize the output
This commit is contained in:
parent
82cc9715dc
commit
7697e2767d
1 changed files with 5 additions and 5 deletions
|
@ -484,14 +484,14 @@ public void Video_Snapshot_PersistSnapshot()
|
||||||
public void Video_Snapshot_Rotated_PersistSnapshot()
|
public void Video_Snapshot_Rotated_PersistSnapshot()
|
||||||
{
|
{
|
||||||
using var outputPath = new TemporaryFile("out.png");
|
using var outputPath = new TemporaryFile("out.png");
|
||||||
var input = FFProbe.Analyse(TestResources.Mp4VideoRotationNegative);
|
|
||||||
|
|
||||||
FFMpeg.Snapshot(TestResources.Mp4VideoRotationNegative, outputPath);
|
var size = new Size(360, 0); // half the size of original video, keeping height 0 for keeping aspect ratio
|
||||||
|
FFMpeg.Snapshot(TestResources.Mp4VideoRotationNegative, outputPath, size);
|
||||||
|
|
||||||
var analysis = FFProbe.Analyse(outputPath);
|
var analysis = FFProbe.Analyse(outputPath);
|
||||||
// height and width should be swapped
|
Assert.AreEqual(size.Width, analysis.PrimaryVideoStream!.Width);
|
||||||
Assert.AreEqual(input.PrimaryVideoStream!.Height, analysis.PrimaryVideoStream!.Width);
|
Assert.AreEqual(1280/2, analysis.PrimaryVideoStream!.Height);
|
||||||
Assert.AreEqual(input.PrimaryVideoStream.Width, analysis.PrimaryVideoStream!.Height);
|
Assert.AreEqual(0, analysis.PrimaryVideoStream!.Rotation);
|
||||||
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue