Skip to content

Zhujunnan/shotdetect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shot Detect

The algorithm aims to pick key-frames of a video.

Requirement

Make sure you have python 2.7+ and opencv 3.3+,

Usage

from shotdetect import shotDetector

video_path = '/Your_video_dir/test.mp4'
detector = shotDetector(video_path)
detector.run()
detector.pick_frame('/The_Dir_To_Save_Frames', "File_name_prefix")

Then you can get files in the directory you have specified above. These files are in format 'File_name_prefix@starttime-endtime.jpg'.

If you use opencv2, then you must change 'cv2.cv.CV_CAP_PROP_FRAME_COUNT' and 'cv2.cv.CV_CAP_PROP_FPS' to 'cv2.CAP_PROP_FRAME_COUNT' and 'cv2.CAP_PROP_FPS' respectively.

About

To find the key frame of a video

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages