views:

505

answers:

3

I need to create thumbnails for a video file once I've uploaded to a webapp running python.

How would I go about this... I need a library that can basically either do this for me, or that can read the image frames out of video files (of several formats) automatically.

A: 

Look into PythonMagick, a Python interface to ImageMagick. That should have what you need. (Disclaimer: I haven't used the Python interface before, but I know ImageMagick is good mojo.)

perimosocordiae
+2  A: 

A simple combination of PyMedia and PIL would do the trick for AVI, ASF, or MPEG files. PyMedia lets you extract the frames (using the decoder() routine), while PIL has a simple thumbnail() routine.

Peter Hansen
Much appreciated.
Alterlife
+1  A: 

You could use the Youtube API for storage and transcoding and grab the feed thumbnails for free. Honestly, that's the easiest way to handle online video and I'm not just shilling a 3rd party service, I'm a very happy user of that API and the internal video paths I was able to delete thanks to it.

ironfroggy