radek-k / FFMediaToolkit

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.
MIT License
352 stars 56 forks source link

Encoding ImageData into a stream #121

Open behzad62 opened 2 years ago

behzad62 commented 2 years ago

Hello, I need to convert Images to a video stream but instead of writing the output to a file I need to write it to a .net Stream. Is that possible using your library? Can you please give me a hint how to implement that. Thanks. Edit... I figured out I can use ffmpeg.avio_alloc_context. But, I started to get System.ExceutionException after few seconds of encoding which I guess is due to bad interoperability with native APIs. Decided to use ffmpeg exe directly through piping.