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
Please free to leave any feedback or suggestions you might have regarding the latest release of PySceneDetect (v0.5). This release includes a significantly refactored Python API as well as a completely redone command-line interface (CLI).
Feedback for both the new API and CLI is requested here.
Thank you all again for your help and support with respect to preparing this release - really appreciate everyone's feedback!
I have been doing some work recently with the 0.5 API and overall, I think the new structure is really well thought out. There is just one minor thing I want to point out. Would it be possible to bring the StatsManager class into the base import scenedetect call? As it is right now, this is what getting ready to analyze a video looks like:
This would be fixed by adding an import statement to scenedetect.__init__.py to import StatsManager along with the VideoManager and SceneManager classes.
This would be a low priority for sure (I said it was minor). Thanks for your hard work!
Note that going forwards, the capabilities of DVR-Scan will be absorbed into PySceneDetect, with the appropriate API changes being made in v0.6 going forwards. There may be some changes to the scene detection algorithm interfaces, but I don't think any of the changes will break existing code, just add new functionality.
That being said, thank you for your input - I've pinned this issue to gain some last minute visibility as I plan what's going to be included in the v0.6 release (the biggest being support of SceneStats).
Random, but API changes to the detectors will be required to implement camera flash suppression. Specifically, a lookahead buffer will be required (of size N frames). My idea is to allow detectors to specify, during construction, the amount of lookahead they require, and will let the SceneManager know. That way, the SceneManager can pre-buffer that many frames and provide them to each detector, rather than one frame at a time (and requiring individual detectors to buffer frames manually, as is done currently).
I would like to apply this in both directions, i.e. allow detectors to search +/- N frames in time from the current frame. This will dramatically increase memory and CPU utilization, so N must be a user tunable parameter, as certain source material will benefit greatly from it, at the expense of processing speed.
[PySceneDetect] Loaded 1 video, framerate: 29.97 FPS, resolution: 1280 x 720
[PySceneDetect] Downscale factor set to 5, effective resolution: 256 x 144
[PySceneDetect] Image output format set: JPEG
[PySceneDetect] Detecting scenes...
100%|████████████████████████████████| 9680/9680 [00:24<00:00, 388.39frames/s]
[PySceneDetect] Processed 9680 frames in 24.9 seconds (average 388.35 FPS).
[PySceneDetect] Detected 9 scenes, average shot length 35.9 seconds.
[PySceneDetect] Comma-separated timecode list:
00:00:00.734,00:00:01.802,00:03:33.146,00:03:38.652,00:04:21.094,00:05:18.752,00:05:19.886,00:05:20.954
[PySceneDetect] Downscale factor set to 1, effective resolution: 1280 x 720
[PySceneDetect] Generating output images (3 per scene)...
0%| | 0/27 [00:00<?, ?images/s]Traceback (most recent call last):
File "/home/santiago/.virtualenvs/videotracking/bin/scenedetect", line 8, in
sys.exit(main())
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/main.py", line 58, in main
cli.main(obj=cli_ctx) # Parse CLI arguments with registered callbacks.
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 792, in main
ctx.exit()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 404, in exit
self.close()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 494, in close
cb()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/cli/context.py", line 397, in process_input
output_dir=self.image_directory)
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/cli/context.py", line 225, in _generate_images
for start, end in scene_list
AttributeError: 'list' object has no attribute 'stop'
0%| | 0/27 [00:00<?, ?images/s]
Good find! It looks like this only affects Python 2.7. Are you able to upgrade to Python 3?
I have filed a new issue (#174) to track the resolution for that. This is definitely a bug - I'll try to roll a fix out promptly (may have to roll out v0.5.4).
Thank you for letting me know, and sorry about the inconvenience!
Thank you all for your feedback and support. All future CLI and API changes will now be targeted for PySceneDetect v0.6. Any additional releases under v0.5.x will strictly be to address any major bugs.
Users wishing to provide feedback on upcoming planned API and CLI changes are free to do so in #177. I especially encourage users using the Python API to review the upcoming changes, and to provide any feedback if a transition plan is required to implement these changes in a non-breaking way. Although most of the planned changes will not break the most widely used APIs, your feedback is important to ensuring that the new changes take into account most potential use cases, support future extensibility, and can be integrated in a way that has minimal impact on existing dependencies.
Any additional bug reports found in existing v0.5 versions should be submitted as a new issue.
Activity
[-]PySceneDetect v0.5 Feedback[/-][+]PySceneDetect v0.5 New CLI & API Feedback[/+]wjs018 commentedon Nov 24, 2018
Hi @Breakthrough,
I have been doing some work recently with the 0.5 API and overall, I think the new structure is really well thought out. There is just one minor thing I want to point out. Would it be possible to bring the
StatsManagerclass into the baseimport scenedetectcall? As it is right now, this is what getting ready to analyze a video looks like:This would be fixed by adding an import statement to
scenedetect.__init__.pyto importStatsManageralong with theVideoManagerandSceneManagerclasses.This would be a low priority for sure (I said it was minor). Thanks for your hard work!
Breakthrough commentedon Jan 7, 2019
Hi @wjs018;
Yes absolutely, good catch. I intended for it to be there, I must have missed adding it.
Thanks for the report, I will definitely include a fix for this in the next release. Likewise, thanks for your interest in the project!
Breakthrough commentedon May 20, 2019
Note that going forwards, the capabilities of DVR-Scan will be absorbed into PySceneDetect, with the appropriate API changes being made in v0.6 going forwards. There may be some changes to the scene detection algorithm interfaces, but I don't think any of the changes will break existing code, just add new functionality.
That being said, thank you for your input - I've pinned this issue to gain some last minute visibility as I plan what's going to be included in the v0.6 release (the biggest being support of SceneStats).
Breakthrough commentedon Jun 27, 2020
Random, but API changes to the detectors will be required to implement camera flash suppression. Specifically, a lookahead buffer will be required (of size N frames). My idea is to allow detectors to specify, during construction, the amount of lookahead they require, and will let the SceneManager know. That way, the SceneManager can pre-buffer that many frames and provide them to each detector, rather than one frame at a time (and requiring individual detectors to buffer frames manually, as is done currently).
I would like to apply this in both directions, i.e. allow detectors to search +/- N frames in time from the current frame. This will dramatically increase memory and CPU utilization, so N must be a user tunable parameter, as certain source material will benefit greatly from it, at the expense of processing speed.
santiagodemierre commentedon Aug 6, 2020
I keep getting an error, just for save-images
scenedetect -i '/home/santiago/Documents/NewConsultoriaMarketing/filename.mkv' detect-content save-images
[PySceneDetect] Loaded 1 video, framerate: 29.97 FPS, resolution: 1280 x 720
[PySceneDetect] Downscale factor set to 5, effective resolution: 256 x 144
[PySceneDetect] Image output format set: JPEG
[PySceneDetect] Detecting scenes...
100%|████████████████████████████████| 9680/9680 [00:24<00:00, 388.39frames/s]
[PySceneDetect] Processed 9680 frames in 24.9 seconds (average 388.35 FPS).
[PySceneDetect] Detected 9 scenes, average shot length 35.9 seconds.
[PySceneDetect] Comma-separated timecode list:
00:00:00.734,00:00:01.802,00:03:33.146,00:03:38.652,00:04:21.094,00:05:18.752,00:05:19.886,00:05:20.954
[PySceneDetect] Downscale factor set to 1, effective resolution: 1280 x 720
[PySceneDetect] Generating output images (3 per scene)...
0%| | 0/27 [00:00<?, ?images/s]Traceback (most recent call last):
File "/home/santiago/.virtualenvs/videotracking/bin/scenedetect", line 8, in
sys.exit(main())
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/main.py", line 58, in main
cli.main(obj=cli_ctx) # Parse CLI arguments with registered callbacks.
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 792, in main
ctx.exit()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 404, in exit
self.close()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/click/core.py", line 494, in close
cb()
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/cli/context.py", line 397, in process_input
output_dir=self.image_directory)
File "/home/santiago/.virtualenvs/videotracking/local/lib/python2.7/site-packages/scenedetect/cli/context.py", line 225, in _generate_images
for start, end in scene_list
AttributeError: 'list' object has no attribute 'stop'
0%| | 0/27 [00:00<?, ?images/s]
Breakthrough commentedon Aug 8, 2020
Hi @santiagodemierre;
Good find! It looks like this only affects Python 2.7. Are you able to upgrade to Python 3?
I have filed a new issue (#174) to track the resolution for that. This is definitely a bug - I'll try to roll a fix out promptly (may have to roll out v0.5.4).
Thank you for letting me know, and sorry about the inconvenience!
Breakthrough commentedon Aug 8, 2020
Thank you all for your feedback and support. All future CLI and API changes will now be targeted for PySceneDetect v0.6. Any additional releases under v0.5.x will strictly be to address any major bugs.
Users wishing to provide feedback on upcoming planned API and CLI changes are free to do so in #177. I especially encourage users using the Python API to review the upcoming changes, and to provide any feedback if a transition plan is required to implement these changes in a non-breaking way. Although most of the planned changes will not break the most widely used APIs, your feedback is important to ensuring that the new changes take into account most potential use cases, support future extensibility, and can be integrated in a way that has minimal impact on existing dependencies.
Any additional bug reports found in existing v0.5 versions should be submitted as a new issue.