Hi! Just to clarify - Butterflow isn't my code, it's an open source tool someone else (dthpham) wrote, my only contributions thus far have been bug reports
The scripts in my animate-earth repository you linked to just construct parameters for it and call it as one step of a pipeline. Anyway, to answer your questions:
#1 As JohnVV mentioned, it only takes video files - but it's easy to make a lossless video file from a folder of jpg's with ffmpeg:
CODE
ffmpeg -framerate 30 -pattern_type glob -i 'imgDir/*.jpg' -c:v libx264 -preset ultrafast -qp 0 -r 30 -pix_fmt yuv420p output.mp4
imgDir is your input path, and you can change the '30's to the desired framerate of your video - though it doesn't matter too much since Butterflow can change the playback rate & framerate as well. Note that this is optimized for speed, not file size, so files will be very big - you can replace 'ultrafast' with 'veryslow' to save space at the expense of time.
As for #2, Butterflow is strictly a command line tool which takes a video file and outputs an interpolated video file. So if your favorite scripting language can run a shell command, you can use it in that manner (as I am doing). However, it's not really a library/API with bindings to other languages. But there are a couple possibilities if you want to explore this route. One is to fork Butterflow and modify it to do what you want it to do - it's an open source git repository.
Another is to go deeper use the underlying algorithm in your own code instead. Butterflow is mostly just a wrapper for OpenCV's implementation of the Farneback optical flow algorithm. It does all the annoying steps of decoding/encoding the video file and passing each pair of frames to the function with the right parameters, etc. But if you wanted to handle this yourself, you could write your own wrapper around this implementation, which is also open source. OpenCV is written in C++ and has bindings for Java, Python and Matlab, with some community support of varying quality for C#, Ruby, Perl, and Javascript. No IDL or Fortran though, I'm afraid.
For experimenting with Butterflow, I definitely recommend reading
all the docs in this folder and following the "Install from Source Guide" rather than using any kind of package manager. FFMpeg and OpenCL are the main external dependencies. I have had success installing it on newer Macs as well as Ubuntu 15.04.
And as for my scripts, there's a lot there you probably don't need, but the main "interesting" thing I'm doing is accounting for missing images in the Himawari data. Butterflow can take a parameter which is a list of segments that should be interpolated at different rates - so I look through each day's images, look for gaps, and construct a segment parameter for Butterflow that interpolates more frames during the gaps, according to how many frames are missing. I'm using a pretty rudimentary method which only works because I get data that is always timestamped neatly on the :10's, even after missing frames, so it's easy math to figure out how many frames are missing/expected. It wouldn't be too hard to generalize this to account for "messy" timed datasets, which may have a good average framerate, but high variance in the timing between the frames.
Anyway, hope that helps you and any others interested in giving it a try. Happy to answer more questions if you have them.