Skip to content
项目

joelibaceta/video-keyframe-detector

在 GitHub 查看

关于

It is a simple python tool to extract key-frames from a video file using peak estimation from frame difference.

设计与媒体

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

header

A Key Frame is a location on a video timeline which marks the beginning or end of a smooth transition throughout the fotograms, Key Frame Detector try to look for the most representative and significant frames that can describe the movement or main events in a video using peakutils peak detection functions.



Installation

Requirements

  • python3
  • numpy
  • opencv
  • peakutils
  • matplotlib
  • PIL
pip install video-keyframe-detector

Command-Line Usage

After installing the package (see Installation section), you can run the keyframe detector from the terminal:

# After installation, run the detector with your video file:
video-keyframe-detector -s "path/to/your/video.mp4" -d output/ -t 0.3

# Or if running from source:
# git clone https://github.com/joelibaceta/video-keyframe-detector
# cd video-keyframe-detector
# pip install -r requirements.txt
# python3 cli.py -s "videos/acrobacia.mp4" -d output/ -t 0.3

Python API Usage

You can also use the detector directly in your Python code:

from KeyFrameDetector.key_frame_detector import keyframeDetection

source_video = "videos/acrobacia.mp4"
output_dir = "output"
threshold = 0.3

keyframeDetection(
    source=source_video,
    dest=output_dir,
    Thres=threshold,
    max_keyframes=5,      
    plotMetrics=True,     
    verbose=True         
)

探索相关项目

加载中…