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
As identified in #151, there is no example in the API documentation for how to use a callback, e.g. for processing a live video stream. An example should clearly document and demonstrate this use case, e.g.:
Also note that the callback API is still unstable, so if you are using this in production you should pin your scenedetect package to < 0.7.
This arose from the following comment:
A usage example:
cam=cv2.VideoCapture(0)
scene_manager.add_detector(ContentDetector())
scene_manager.detect_scenes(frame_source=cam, callback=lambdaframe: print("a new scene: ", len(frame)))
when i tried this on a live video input, it throws error,
scene_manager.detect_scenes(frame_source=cam, callback=lambda frame: print("a new scene: ", len(frame)))
File "/usr/local/lib/python3.6/dist-packages/scenedetect/scene_manager.py", line 752, in detect_scenes
self._base_timecode = video.base_timecode
AttributeError: 'cv2.VideoCapture' object has no attribute 'base_timecode'
```
any idea why is this happening?
This is better suited for devices/pipes as opposed to VideoStreamCv2,
which now focuses on files/image sequences/network streams. (#276)
Add tests demonstrating use of a callback when detecting scenes (#273).
As identified in #151, there is no example in the API documentation for how to use a callback, e.g. for processing a live video stream. An example should clearly document and demonstrate this use case, e.g.:
Also note that the callback API is still unstable, so if you are using this in production you should pin your
scenedetect
package to < 0.7.This arose from the following comment:
Originally posted by @research-boy in #151 (comment)
The text was updated successfully, but these errors were encountered: