Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The performance of detecting shot changes is poor #370

Open
xiao-keeplearning opened this issue Jan 25, 2024 · 5 comments
Open

The performance of detecting shot changes is poor #370

xiao-keeplearning opened this issue Jan 25, 2024 · 5 comments

Comments

@xiao-keeplearning
Copy link

Problem/Use Case

I found that the performance of detecting shot changes using PySceneDetect is not as effective as Adobe Premiere Pro. Could you please provide a parameter adjustment solution to achieve results comparable to Premiere Pro?

@Breakthrough
Copy link
Owner

If you are using high-framerate material (60+ FPS), you may want to experiment with the frame skip option. You might also want to increase the downscale factor if performance is a concern.

Are you exporting scenes to individual clips, or just using shot detection alone? Could you provide some additional detail about how you are using the project (e.g. are you using the command line program or the Python API)?

@xiao-keeplearning
Copy link
Author

Thanks your reply.
I am using the python api to process videos at 25fps. I use code for processing, which uses scene_manager.add_detector(ContentDetector()) to detect scene changes and do video clipping.
Do you have any suggestions to improve performance?

@Breakthrough
Copy link
Owner

You can remove use of stats_manager to save some processing time, and you can also experiment with raising downscale here:
https://www.scenedetect.com/docs/latest/api/scene_manager.html#scenedetect.scene_manager.SceneManager.downscale

Also note instead of VideoManager you should use the scenedetect.open_video function, e.g.:

from scenedetect import SceneManager, ContentDetector, open_video
video = open_video(test_video_file)
scene_manager = SceneManager()
scene_manager.add_detector(ContentDetector())
scene_manager.detect_scenes(video=video)

Do you know how fast it is versus Adobe Premiere?

@xiao-keeplearning
Copy link
Author

Sorry, I didn't explain it clearly and you misunderstood it.
I don't care about algorithm processing time, I'm more concerned about accuracy. I found that the current Python API cannot effectively detect scene changes, especially in videos where the background does not change much and the speaker's speech is edited and spliced. Adobe Premiere can basically effectively detect all scene changes.

@Breakthrough
Copy link
Owner

Using audio to detect splices is definitely something I would be interested in adding at some point. Do you have any samples you could share that exhibit poor performance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants