Closed teyou closed 11 months ago
To quote @Breakthrough:
You can set start_in_scene=True to always get at least one scene back 🙂 This happens by default when using the CLI, but must be explicit when using the Python API.
https://www.scenedetect.com/docs/latest/api.html#module-scenedetect
Ah, I see you're building the SceneManager directly, rather than using the detect()
method thats available. In that case you should update your call to get_scene_list()
to get_scene_list(start_in_scene=True)
oh great, thanks @fullstackfool for your input!
For anyone who want to find the doc, here's the link : https://www.scenedetect.com/docs/latest/api/scene_manager.html#scenedetect.scene_manager.SceneManager.get_scene_list
Description:
There is an inconsistency between the output from CLI and python code while executing the same logic. It is expected to return 1 scene instead of 0 from running via python code
Command:
CLI
Its output as below
Python Code
Output as blow
Environment:
Media/Files:
https://github.com/Breakthrough/PySceneDetect/assets/1115155/5b69d477-03ff-42ac-9232-7f34172051b0