FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
I found this project helpful and interesting, however while encoding videos from images i have found a problem that my animation was somehow translated in such a way that it seems to be a parallelogram with upper left somewhere in middle. After some debugging i found out that it might be problem with stride calculation. I have images with following details:
Width: 1890 Pixels
Height: 1512 Pixels
PixelFormat: 24bppRgb
Stride from ImageData = 5670
whereas from my calculation of stride it should be 5672
I have calculated stride with following formula as given in msdn forums
Stride = 4 (Bitmap.Width BitsPerPixel + 31)/32)
I found this project helpful and interesting, however while encoding videos from images i have found a problem that my animation was somehow translated in such a way that it seems to be a parallelogram with upper left somewhere in middle. After some debugging i found out that it might be problem with stride calculation. I have images with following details: Width: 1890 Pixels Height: 1512 Pixels PixelFormat: 24bppRgb Stride from ImageData = 5670 whereas from my calculation of stride it should be 5672 I have calculated stride with following formula as given in msdn forums Stride = 4 (Bitmap.Width BitsPerPixel + 31)/32)