Done. This gets last frame of each m4v file in the "m4v" directory and puts it in the "out" directory.
import os, shutil
TMPDIR = "blahfuck"
OUTDIR = "out"
for fn in os.listdir("m4v"):
for del_fn in os.listdir(TMPDIR): os.unlink("%s/%s" % (TMPDIR, del_fn))
os.system(r"ffmpeg -i m4v/" + fn + r" " + TMPDIR + r"/%d.png")
last = sorted(map(lambda x:int(x.replace(".png", "")), os.listdir(TMPDIR)))[-1]
outpath = "%s/%s" % (OUTDIR, fn.replace("m4v", "png"))
shutil.copyfile("%s/%s.png" % (TMPDIR, last), outpath)
Idea of getting the characters through SVG seems like a good one, but I can't start doing that now. So what to do instead? Maybe learn about how to post to Facebook. Nice, this SDK seems very easy to integrate. Comes with a simple demo app that posts to facebook stream. Adding this to my project also got me a neat JSON library. I will enjoy it.
Facebook login almost works, but do I really need it to post to the stream? Can't I just invoke the stream post dialog without this login hassle, I remember seeing it in some other app. But time to sleep now ...