acowley / ffmpeg-light

Minimal Haskell bindings to the FFmpeg library
BSD 3-Clause "New" or "Revised" License
67 stars 29 forks source link

Add InputSource for reading custom buffer #54

Open jcberentsen opened 4 years ago

jcberentsen commented 4 years ago

There is an example in the FFmpeg documentation describing how to use a custom buffer as input, instead of a file or device.

Would it be possible to wrap the relevant ffmpeg api-functions used in the example? Perhaps support a new InputSource type, like Buffer ByteString (Lazy, strict or something conduit/pipe/stream-like?)

I would be glad to help, here, as I have a use-case where extracting frames from videos in a streaming fashion is desirable (preferably without touching the disk)

acowley commented 4 years ago

I certainly wouldn’t stand in the way, but I don’t have the personal bandwidth to put much time into it. Do you need help getting started, or are you looking more for code review when nearing completion?