Skip to content
Advertisement

Creating thumbnails from video files with Python

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.

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement