Comments (1)
Hi @hanoonaR;
Controlling the number of splits would require some kind of resolution method to determine both where to add missing cuts, and also where to remove them. With the Python API this is certainly possible, since you can do whatever you would like with the resulting scene list before the video is split:
from scenedetect import detect, ContentDetector, split_video_ffmpeg
scene_list = detect('my_video.mp4', ContentDetector())
# modify scene_list here
split_video_ffmpeg('my_video.mp4', scene_list)
As an example, you could combine the shortest scenes together until you have the desired amount.
You could also use minimum scene length and detect only a certain portion of the video to limit the maximum number of scenes. For example if you set minimum scene length to 1 second and limit the processing duration to 10s, there can never be more than 10 scenes detected.
To add this as an official feature however, we need to look into how it will be used, so the right method can be chosen. There are also some open questions. For example, where should the cuts be placed if we didn't find any? Could you share more about your use case?
Thanks for the comment/idea, glad you're finding the project useful!
from pyscenedetect.
Related Issues (20)
- No output to list-scenes HOT 3
- horizontal wipe cuts
- ffmpeg segment_times options HOT 4
- QP file output HOT 6
- Can't get save_images to work HOT 1
- 'Error splitting video (ffmpeg returned 1) ' occurs while using 'split_video_ffmpeg' HOT 11
- Extend image_name_template to allow timestamp HOT 1
- Add Project Gallery to Website
- CITATION.cff file for citing repository HOT 1
- Return SyntaxWarning errors HOT 2
- Remove downscaling for perceptual hash
- Support histograms/hashes with AdaptiveDetector
- Group similar scenes together HOT 3
- The speed at which different backends run. HOT 2
- Two-Phase Command Architecture
- `min_scene_len` parameter isn't respected with AdaptiveDetector HOT 5
- Find start and end of black frame sequences HOT 1
- Get the progress in real time for scene_manager.detect_scenes HOT 2
- Import scenedetect package will have pop-up window HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscenedetect.