I'm using FFmpeg.AutoGen to decrypt video and save the frames as bitmaps. Code is using dotnet core and I'd like to get it working for both Windows and Linux.
The code is similar to the example provided: https://github.com/Ruslan-B/FFmpeg.AutoGen/blob/db9bcd4b9dfad5d117ffd71fe1a2d073e96a3520/FFmpeg.AutoGen.Example/Program.cs
AVFrame convertedFrame = this.converter.Convert(frame);
Bitmap image = new Bitmap(convertedFrame.width, convertedFrame.height, convertedFrame.linesize[0], PixelFormat.Format24bppRgb, (IntPtr)convertedFrame.data[0]);
When saving the image using:
image.Save($"returned-image-{DateTime.Now.Ticks}.png", ImageFormat.Bmp);
The image looks fine on Windows, but is corrupted in Linux.
I would try to use different version of FFmpeg libraries. Also check the latest Open issue from FFmpeg.Autogen, might be that.