Breakthrough / DVR-Scan

:vhs: Tool for extracting scenes with motion from videos (e.g. security camera or DVR footage). Written in Python, uses OpenCV.
http://www.dvr-scan.com/
Other
371 stars 49 forks source link

Install documentation appears to be missing #125

Closed stevegilbert23 closed 1 year ago

stevegilbert23 commented 1 year ago

Bug/Issue Description: When following the "Install Guide" link at https://github.com/Breakthrough/DVR-Scan/README.md which points to https://dvr-scan.readthedocs.io/en/latest/guide/installing/ the resulting page shows "404 Page Not Found" in the bottom third of the page. The same page is displayed when following the "Install" link from https://dvr-scan.readthedocs.io/en/latest/

Required Information: In description.

Expected Behavior: The install documentation shown.

Breakthrough commented 1 year ago

Thanks for bringing this to my attention, fixed that up.

stevegilbert23 commented 1 year ago

When I view https://dvr-scan.readthedocs.io/en/latest/guide/installing/ I am still seeing "404 Page Not Found" in the bottom third of the page. I opened it with an incognito window to ensure there isn't any odd caching or cookie thing going on.

Similarly, on https://dvr-scan.readthedocs.io/en/latest/download/ there is a link "Installing & Updating" that points to https://dvr-scan.readthedocs.io/en/latest/download/guide/installing.md that when followed appears to be the same page as noted above, with the 404 message on it.

stevegilbert23 commented 1 year ago

Looking at the source files for the docs, it appears the installing.md file has been removed. There are multiple links pointing to this file still in the docs.

I have been on 1.4 and it appears things have changed significantly and upgrading is non-trivial on a linux system. The download.md file implies that upgrading consists of extracting, running "python -m build" and then installing with pip. I assume the same instructions for a pip install documented at the top of that page apply.

The installing.md file that was removed documented the dependencies, IIRC. If that information has moved to another file, I cannot find it.

stevegilbert23 commented 1 year ago

I could not get the build to work as stated. I also tried "dvr_scan" and that ran but failed, perhaps because of a missing dependency? My python knowledge is very limited but I wanted to try to get through this today, so I am hacking.

I realize this information probably does not belong in this issue, but I am hoping my problems are related to not being able to reference that removed doc file.

Here is the output from my commands for reference:

sg@G7:~/dvrscan/extract_151/dvr-scan-1.5.1$ python3 -m build
/usr/bin/python3: No module named build
sg@G7:~/dvrscan/extract_151/dvr-scan-1.5.1$ python3 -m dvr_scan
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/sg/dvrscan/extract_151/dvr-scan-1.5.1/dvr_scan/__init__.py", line 44, in <module>
    from dvr_scan.platform import init_logger
  File "/home/sg/dvrscan/extract_151/dvr-scan-1.5.1/dvr_scan/platform.py", line 28, in <module>
    from scenedetect.platform import get_and_create_path
ModuleNotFoundError: No module named 'scenedetect'
stevegilbert23 commented 1 year ago

I eventually did get 'python3 -m build' to work by installing scenedetect and upgrading numpy. Perhaps consider requiring minimum versions for the dependencies to avoid strange behavior. The result was a tgz file identical to the one I downloaded, so I concluded "build" was probably not what I should be running to install.

I attempted to run the program in place, but ran into a claimed circular dependency. I have the latest versions of numpy and scenedetect as shown from pip:

sg@G7:~/dvrscan/extract_151/dvr-scan-1.5.1$ python3 dvr_scan
Traceback (most recent call last):
  File "/home/sg/.local/lib/python3.8/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/home/sg/.local/lib/python3.8/site-packages/numpy/core/__init__.py", line 100, in <module>
    from . import _add_newdocs_scalars
  File "/home/sg/.local/lib/python3.8/site-packages/numpy/core/_add_newdocs_scalars.py", line 9, in <module>
    import platform
  File "/home/sg/dvrscan/extract_151/dvr-scan-1.5.1/dvr_scan/platform.py", line 28, in <module>
    from scenedetect.platform import get_and_create_path
  File "/home/sg/.local/lib/python3.8/site-packages/scenedetect/__init__.py", line 40, in <module>
    from scenedetect.scene_manager import SceneManager, save_images
  File "/home/sg/.local/lib/python3.8/site-packages/scenedetect/scene_manager.py", line 50, in <module>
    from scenedetect.video_stream import VideoStream
  File "/home/sg/.local/lib/python3.8/site-packages/scenedetect/video_stream.py", line 33, in <module>
    from numpy import ndarray
ImportError: cannot import name 'ndarray' from partially initialized module 'numpy' (most likely due to a circular import) (/home/sg/.local/lib/python3.8/site-packages/numpy/__init__.py)
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/sg/dvrscan/extract_151/dvr-scan-1.5.1/dvr_scan/__main__.py", line 19, in <module>
    from dvr_scan.cli.controller import run_dvr_scan
  File "/home/sg/.local/lib/python3.8/site-packages/dvr_scan/__init__.py", line 41, in <module>
    import dvr_scan.opencv_loader as _
  File "/home/sg/.local/lib/python3.8/site-packages/dvr_scan/opencv_loader.py", line 34, in <module>
    import cv2 as _
ImportError: numpy.core.multiarray failed to import
sg@G7:~/dvrscan/extract_151/dvr-scan-1.5.1$ pip list |egrep -i '(numpy|scene)'
numpy                  1.23.4
scenedetect            0.6.0.3
Breakthrough commented 1 year ago

Thanks for providing that output - this issue was raised in Breakthrough/PySceneDetect#350 but I haven't had a chance to look into it yet. I assume the issue might be importing ndarray from numpy rather than just importing numpy itself. Feel free to post any follow-ups on Breakthrough/PySceneDetect#350, and thanks for the output again.