Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break video into images for processing

I have recently found friday, a image processing library for haskell and it seems pretty nice so far, but I would like to be able to load videos and break them up into images. Is there such a library available for haskell?

like image 691
fakedrake Avatar asked Oct 19 '25 01:10

fakedrake


1 Answers

I do not know whether such a library exists, but I suspect not. Video codecs are pretty complicated. If something for haskell exists, it would most likely be an ffmpeg wrapper. Anyway, I would use the ffmpeg command line tool directly if you only need to extract the frames from some videos. Or use a system call to do it dynamically.

The ffmpeg command is pretty simple for this task:

ffmpeg -i "input.mov" -an -f image2 "output_%05d.jpg"

https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence

like image 139
P.R. Avatar answered Oct 22 '25 03:10

P.R.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!