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.
Probably fixed it in the latest release v4.0.1 release. If the crash still occurs, you can try using the GetFrame method overload to write the bitmap directly to a Span<byte>.
I noticed that iterating over some files doesn't work. Maybe it's problem with current frame reader implementation, that's not work for some files?
First video successfully extract first 8 frames and throw unknown exception(System.ExecutionEngineException).
https://user-images.githubusercontent.com/1738743/104822578-9aa60200-5854-11eb-9617-9e8c12e97a6c.mp4
Second video is works fine.
https://user-images.githubusercontent.com/1738743/104822571-79451600-5854-11eb-88cf-777575ef23ce.mp4
All files have same container and contains same video codec. We can take first code sample for testing.
UPD: A System.ExecutionEngineException randomly throws here