Replies: 2 comments
-
here is code: private async Task<MemoryStream> DoAnimatedMeme(Stream data)
{
using var imageCollection = new MagickImageCollection(data, MagickFormat.Mp4);
var framesCount = imageCollection.Count;
for (var i = 0; i < framesCount; i++)
{
var frame = imageCollection[i];
var oldHeight = frame.Height;
var oldWidth = frame.Width;
var percentage = new Percentage(100 - CalcPercentage(i + 1, framesCount, 70));
frame.LiquidRescale(percentage);
frame.Resize(oldWidth, oldHeight);
}
var mem = new MemoryStream();
await imageCollection.WriteAsync(mem).ConfigureAwait(false);
mem.Position = 0;
return mem;
} PS: need to work with streams because downloading file stream from the internet, process this file and upload back |
Beta Was this translation helpful? Give feedback.
0 replies
-
When running on Linux you will need to use the ffmpeg executable that was compiled on that platform. Starting with the next version |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Don't have any ideas how to fix this:
Tried:
ffmpeg.exe
around my app exe (...\bin\Debug\netcoreapp3.1
)ffmpeg.exe
into path7.22.2.2
to7.22.0.0
because of thisPackages related to Magick.NET installed:
Environment:
>dotnet --list-sdks 2.1.807 [C:\Program Files\dotnet\sdk] 3.1.301 [C:\Program Files\dotnet\sdk] 3.1.302 [C:\Program Files\dotnet\sdk] 5.0.100 [C:\Program Files\dotnet\sdk]
On linux machine (debian 10) it's failing with another error:
ffmpeg version 4.1.6-1~deb10u1
Note: Project was rebuilded on linux machine
Another note: planning to develop on windows but run on linux
Beta Was this translation helpful? Give feedback.
All reactions