Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theplasmak/average-shot-length
Get the average shot length of a video file.
https://github.com/theplasmak/average-shot-length
Last synced: about 1 month ago
JSON representation
Get the average shot length of a video file.
- Host: GitHub
- URL: https://github.com/theplasmak/average-shot-length
- Owner: ThePlasmak
- License: mit
- Created: 2023-09-16T14:51:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-16T16:07:39.000Z (over 1 year ago)
- Last Synced: 2023-09-17T01:18:50.717Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
This simple Python script allows you to get the average shot length of a video file through FFmpeg's scene change detection. It could be helpful to anyone studying film!
# Prerequisites
1. Install [FFmpeg](https://ffmpeg.org/download.html) and place it on your PATH.
2. Install [Python](https://www.python.org/downloads/).# Instructions
1. Clone or download the repo.
2. Place a video file in the root directory of the repo.
3. Open `average_shot_length.py` in a code editor.
4. Change the `input_video` variable to the name of your video file.
5. Run the script.
6. Check the cut timings printed by the script against the actual cut timings in the video, and adjust `scene_change_detection_score` if necessary.# Notes
Using machine learning to detect scene changes may be more accurate, but I haven't looked into this method yet.