mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 10:05:44 +00:00
Merge pull request #585 from rosenbjerg/fix-fps-handling-in-join-image-sequence
Fix fps handling in JoinImageSequence
This commit is contained in:
commit
a599c48511
5 changed files with 7 additions and 7 deletions
|
|
@ -766,7 +766,7 @@ public class VideoTest
|
|||
Assert.IsTrue(success);
|
||||
var result = FFProbe.Analyse(outputFile);
|
||||
|
||||
Assert.AreEqual(1, result.Duration.Seconds);
|
||||
Assert.AreEqual(3, result.Duration.Seconds);
|
||||
Assert.AreEqual(imageAnalysis.PrimaryVideoStream!.Width, result.PrimaryVideoStream!.Width);
|
||||
Assert.AreEqual(imageAnalysis.PrimaryVideoStream!.Height, result.PrimaryVideoStream.Height);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ namespace FFMpegCore.Arguments;
|
|||
|
||||
public class GifPaletteArgument : IArgument
|
||||
{
|
||||
private readonly int _fps;
|
||||
|
||||
private readonly double _fps;
|
||||
private readonly Size? _size;
|
||||
private readonly int _streamIndex;
|
||||
|
||||
public GifPaletteArgument(int streamIndex, int fps, Size? size)
|
||||
public GifPaletteArgument(int streamIndex, double fps, Size? size)
|
||||
{
|
||||
_streamIndex = streamIndex;
|
||||
_fps = fps;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,8 @@ public static class FFMpeg
|
|||
}
|
||||
|
||||
return FFMpegArguments
|
||||
.FromFileInput(Path.Combine(tempFolderName, $"%09d{fileExtension}"), false)
|
||||
.FromFileInput(Path.Combine(tempFolderName, $"%09d{fileExtension}"), false, options => options
|
||||
.WithFramerate(frameRate))
|
||||
.OutputToFile(output, true, options => options
|
||||
.ForcePixelFormat("yuv420p")
|
||||
.Resize(width!.Value, height!.Value)
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ public class FFMpegArgumentOptions : FFMpegArgumentsBase
|
|||
return WithArgument(new ID3V2VersionArgument(id3v2Version));
|
||||
}
|
||||
|
||||
public FFMpegArgumentOptions WithGifPaletteArgument(int streamIndex, Size? size, int fps = 12)
|
||||
public FFMpegArgumentOptions WithGifPaletteArgument(int streamIndex, Size? size, double fps = 12)
|
||||
{
|
||||
return WithArgument(new GifPaletteArgument(streamIndex, fps, size));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public static class SnapshotArgumentBuilder
|
|||
TimeSpan? captureTime = null,
|
||||
TimeSpan? duration = null,
|
||||
int? streamIndex = null,
|
||||
int fps = 12)
|
||||
double fps = 12)
|
||||
{
|
||||
var defaultGifOutputSize = new Size(480, -1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue