Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python video thumbnails but with easily available libraries (no PyMedia!)

I want to include video thumbnails as part of my python app. However, I want to distribute it easily for use on Ubuntu mainly (plus other distros, of course, but Ubuntu is my main target).

However! PyMedia, which is often suggested, is not available as far as I'm aware in the default repositories. So, is there an alternative? I've noticed that nautilus makes screenshots so there has to be a way.


1 Answers

MoviePy can do thumbnail generation very easily:

from moviepy.editor import *
clip = VideoFileClip("example.mp4")
clip.save_frame("thumbnail.jpg",t=1.00)

http://zulko.github.io/moviepy/index.html

like image 161
Jeremiah Rose Avatar answered Oct 27 '25 03:10

Jeremiah Rose



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!