I would suggest ffmpeg as an alternative -- it peels, it slices and it dices. It will definitely convert a range of a video file to gif while adding subtitles, and you won't have to frankenstein things together..
Totally agree, although the author's use of vlc definitely qualifies as a clever hack.
I want more hackers to realize how insanely easy it is to programmatically generate video with ffmpeg. Just write a program that dumps raw RGB frames to stdout! You can turn that into any video format conceivable, including gif.
Here's a little demo I wrote. Generates a video of the Mandelbrot set coming into focus:
Interesting! At work I hacked together a video writer that compiles still frames to a movie using OpenCV. But it is slow --ungodly slow. I'll have to check out ffmpeg!
You must have a very different experience of email than I do. That sounds absolutely terrible to me. Am I missing some reason that this would be useful, or is this just a case of wildly diverging preferences?
Our product (Interactly) is virtual video interactions, so our main value prop is being able to see real people respond.
In that context we figured it would be interesting to see if we could include a 5 second GIF intro right into the notification email; mostly out of curiosity just to see if it would technically be possible.
I was surprised to find out it was mostly feasible, but you're right that it doesn't make sense beyond the fact that it would be a cool gimmick.
Indeed, I have to vouch for ffmpeg as a the best solution. When I built GifMachine[0], it's pretty much just a web interface and automation layer to ffmpeg/imagemagick. Imagemagic and ffmpeg I found to be easy to use, fast, and delightfully scriptable. Using them together also produces the prettiest results.
The arguments to the gstreamer binary are encoders,decoders,filters and i/o piped together like commands in a shell (with the ! operator). For example, this is a shell command to show a h264 network stream on a raspberry pi: