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.
I could not install ffvideo on OSX Sierra so i decided to work with ffmpeg.
OSX:
brew install ffmpeg
Linux:
apt-get install ffmpeg
Python 3 Code:
import subprocess
video_input_path = '/your/video.mp4'
img_output_path = '/your/image.jpg'
subprocess.call(['ffmpeg', '-i', video_input_path, '-ss', '00:00:00.000', '-vframes', '1', img_output_path])