You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define minimum and maximum number of splits in split-video #393
I have a question regarding the split-video functionality (scenedetect -i video.mp4 split-video). Is there a way to control the number of scenes or split? Like, set a minimum or maximum number of splits? Otherwise could you please suggest an alternative?
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:
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!
Activity
Breakthrough commentedon Apr 23, 2024
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:
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!