Make thumbnails easily with opencv from the erotic video folder

import cv
import os
import sys

f = open('./Sites/a.html', 'w')

n=0
file_list=os.listdir("/Volumes/a/new/")
for file in file_list:
 capture=cv.CaptureFromFile("/Volumes/a/new/"+file)
 cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_POS_FRAMES,1000)
 image=cv.QueryFrame(capture)
 cv.SaveImage("./Sites/img/"+str(n)+"_0.jpg ",image)
 capture=cv.CaptureFromFile("/Volumes/a/new/"+file)
 cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_POS_FRAMES,2000)
 image=cv.QueryFrame(capture)
 cv.SaveImage("./Sites/img/"+str(n)+"_1.jpg ",image)
 capture=cv.CaptureFromFile("/Volumes/a/new/"+file)
 cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_POS_FRAMES,3000)
 image=cv.QueryFrame(capture)
 cv.SaveImage("./Sites/img/"+str(n)+"_2.jpg ",image)
 capture=cv.CaptureFromFile("/Volumes/a/new/"+file)
 cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_POS_FRAMES,4000)
 image=cv.QueryFrame(capture)
 cv.SaveImage("./Sites/img/"+str(n)+"_3.jpg ",image)

 f.write('<img src="./img/'+str(n)+'_0.jpg " width=200><img src="./img/'+str(n)+'_1.jpg " width=200><img src="./img/'+str(n)+'_2.jpg " width=200><img src="./img/'+str(n)+'_3.jpg " width=200><br>'+file+'<br>')
 n+=1

f.close()

Recommended Posts

Make thumbnails easily with opencv from the erotic video folder
Make a video player with PySimpleGUI + OpenCV
Make OpenCV3 available from python3 installed with pyenv
Loop video loading with opencv
I tried face recognition from the video (OpenCV: python version)
Cut out frames from video by 1 second with Python + OpenCV
Make an effector for video conferencing with Spout + OpenCV + dlib (Part 1)
Finding the simplest mistakes with OpenCV
Try blurring the image with opencv2
Try to separate the background and moving object of the video with OpenCV
Save video frame by frame with Python OpenCV
Try using the camera with Python's OpenCV
Image acquisition from camera with Python + OpenCV
Make a GIF animation with folder monitoring
Make the library created by Eigen in C ++ available from Python with Boost.Numpy.