Python script for generating thumbnails from video files using ffmpeg