import cv2
vcap = cv2.VideoCapture(filename)
res, im_ar = vcap.read()
while im_ar.mean() < threshold and res:
res, im_ar = vcap.read()
im_ar = cv2.resize(im_ar, (thumb_width, thumb_height), 0, 0, cv2.INTER_LINEAR)
#to save we have two options
#1) save on a file
cv2.imwrite(save_on_filename, im_ar)
#2)save on a buffer for direct transmission
res, thumb_buf = cv2.imencode('.png', im_ar)
# '.jpeg' etc are permitted
#get the bytes content
bt = thumb_buf.tostring()
"threshold" is an integer. When you get a video frame it can be very black, white etc to get some good thumbnail you can specify the mean value of all the pixel in the frame.